author | Claus Gittinger <cg@exept.de> |
Thu, 29 Apr 1999 22:07:39 +0200 | |
changeset 1892 | 110a6e458b5a |
parent 1882 | c042adbad29e |
child 1954 | dc1e397855dc |
permissions | -rw-r--r-- |
0 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1991 by Claus Gittinger |
0 | 3 |
All Rights Reserved |
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
Toggle subclass:#RadioButton |
|
1882 | 14 |
instanceVariableNames:'buttonStyle buttonOnLevel buttonOffLevel buttonOffImage |
15 |
buttonOnImage' |
|
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
16 |
classVariableNames:'DefaultButtonStyle DefaultActiveLevel DefaultPassiveLevel |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
17 |
MotifCheckBotForm MotifCheckTopForm Round3DCheckBotForm |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
18 |
Round3DCheckTopForm RoundHalfLightForm RoundOffForm RoundOnForm' |
585 | 19 |
poolDictionaries:'' |
20 |
category:'Views-Interactors' |
|
0 | 21 |
! |
22 |
||
38 | 23 |
!RadioButton class methodsFor:'documentation'! |
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1991 by Claus Gittinger |
|
28 |
All Rights Reserved |
|
0 | 29 |
|
38 | 30 |
This software is furnished under a license and may be used |
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
39 |
documentation |
|
40 |
" |
|
41 |
like a Toggle, but do not turn off when pressed again, instead only |
|
42 |
turn off when another RadioButton is pressed (see RadioButtonGroup). |
|
43 |
||
44 |
written fall 91 by claus |
|
585 | 45 |
|
46 |
[author:] |
|
47 |
Claus Gittinger |
|
38 | 48 |
" |
86 | 49 |
! |
50 |
||
51 |
examples |
|
52 |
" |
|
119 | 53 |
See more examples in RadioButtonGroup class>>examples |
54 |
||
55 |
example1: one on behavior (using RadioButtons) |
|
593 | 56 |
[exBegin] |
86 | 57 |
|top panel b group| |
58 |
||
59 |
top := StandardSystemView new. |
|
60 |
top extent:200@200. |
|
61 |
||
62 |
panel := HorizontalPanelView |
|
593 | 63 |
origin:0.0@0.0 |
64 |
corner:1.0@1.0 |
|
65 |
in:top. |
|
86 | 66 |
|
67 |
group := RadioButtonGroup new. |
|
68 |
||
69 |
b := RadioButton label:'am' in:panel. |
|
70 |
group add:b. |
|
71 |
||
72 |
b := RadioButton label:'fm' in:panel. |
|
73 |
group add:b. |
|
74 |
||
75 |
b := RadioButton label:'off' in:panel. |
|
76 |
group add:b. |
|
77 |
||
1087 | 78 |
group value:1. |
86 | 79 |
top open |
593 | 80 |
[exEnd] |
105 | 81 |
|
82 |
||
119 | 83 |
example2: zero or one on behavior (using Toggles) |
593 | 84 |
[exBegin] |
105 | 85 |
|top panel b group| |
86 |
||
87 |
top := StandardSystemView new. |
|
88 |
top extent:200@200. |
|
89 |
||
90 |
panel := HorizontalPanelView |
|
593 | 91 |
origin:0.0@0.0 |
92 |
corner:1.0@1.0 |
|
93 |
in:top. |
|
105 | 94 |
|
95 |
group := RadioButtonGroup new. |
|
96 |
||
97 |
b := Toggle label:'am' in:panel. |
|
98 |
group add:b. |
|
99 |
||
100 |
b := Toggle label:'fm' in:panel. |
|
101 |
group add:b. |
|
102 |
||
103 |
b := Toggle label:'off' in:panel. |
|
104 |
group add:b. |
|
105 |
||
1087 | 106 |
group value:1. |
105 | 107 |
top open |
593 | 108 |
[exEnd] |
1087 | 109 |
|
110 |
||
111 |
a selectionInListView and a group displaying the same value: |
|
112 |
[exBegin] |
|
113 |
|top top2 panel b sv group selectionInList| |
|
114 |
||
115 |
top := StandardSystemView extent:200@200. |
|
116 |
||
117 |
panel := HorizontalPanelView |
|
118 |
origin:0.0@0.0 corner:1.0@1.0 in:top. |
|
119 |
||
120 |
group := RadioButtonGroup new. |
|
121 |
selectionInList := SelectionInList new. |
|
122 |
selectionInList list:#('am' 'fm' 'off'). |
|
123 |
selectionInList selectionIndexHolder:group. |
|
124 |
||
125 |
b := Toggle label:'am' in:panel. |
|
126 |
group add:b. |
|
127 |
||
128 |
b := Toggle label:'fm' in:panel. |
|
129 |
group add:b. |
|
130 |
||
131 |
b := Toggle label:'off' in:panel. |
|
132 |
group add:b. |
|
133 |
||
134 |
group value:1. |
|
135 |
top open. |
|
136 |
||
137 |
top2 := StandardSystemView extent:200@200. |
|
138 |
sv := SelectionInListView in:top2. |
|
139 |
sv model:selectionInList. |
|
140 |
sv origin:0.0@0.0 corner:1.0@1.0. |
|
141 |
top2 open. |
|
142 |
||
143 |
[exEnd] |
|
86 | 144 |
" |
38 | 145 |
! ! |
0 | 146 |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
147 |
!RadioButton class methodsFor:'defaults'! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
148 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
149 |
motifCheckBotForm |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
150 |
MotifCheckBotForm isNil ifTrue:[ |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
151 |
MotifCheckBotForm := Form |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
152 |
width:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
153 |
height:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
154 |
fromArray:#[2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
155 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
156 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
157 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
158 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
159 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
160 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
161 |
2r00000000 2r00001110 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
162 |
2r01110000 2r00011100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
163 |
2r00111000 2r00111000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
164 |
2r00011100 2r01110000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
165 |
2r00001110 2r11100000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
166 |
2r00000111 2r11000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
167 |
2r00000011 2r10000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
168 |
2r00000001 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
169 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
170 |
MotifCheckBotForm := MotifCheckBotForm onDevice:Display. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
171 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
172 |
^ MotifCheckBotForm |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
173 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
174 |
"Created: / 3.11.1997 / 12:06:45 / cg" |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
175 |
"Modified: / 30.7.1998 / 21:27:53 / cg" |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
176 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
177 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
178 |
motifCheckTopForm |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
179 |
MotifCheckTopForm isNil ifTrue:[ |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
180 |
MotifCheckTopForm := Form |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
181 |
width:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
182 |
height:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
183 |
fromArray:#[2r00000001 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
184 |
2r00000011 2r10000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
185 |
2r00000111 2r11000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
186 |
2r00001110 2r11100000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
187 |
2r00011100 2r01110000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
188 |
2r00111000 2r00111000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
189 |
2r01110000 2r00011100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
190 |
2r11100000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
191 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
192 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
193 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
194 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
195 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
196 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
197 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
198 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
199 |
MotifCheckTopForm := MotifCheckTopForm onDevice:Display |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
200 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
201 |
^ MotifCheckTopForm |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
202 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
203 |
"Created: / 3.11.1997 / 12:06:45 / cg" |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
204 |
"Modified: / 30.7.1998 / 21:28:45 / cg" |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
205 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
206 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
207 |
round3DCheckBotForm |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
208 |
Round3DCheckBotForm isNil ifTrue:[ |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
209 |
Round3DCheckBotForm := Form |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
210 |
width:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
211 |
height:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
212 |
fromArray:#[2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
213 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
214 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
215 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
216 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
217 |
2r00000000 2r00000010 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
218 |
2r00000000 2r00000010 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
219 |
2r00000000 2r00000110 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
220 |
2r00000000 2r00000110 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
221 |
2r00000000 2r00000110 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
222 |
2r00000000 2r00001110 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
223 |
2r01110000 2r00011100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
224 |
2r01111000 2r00111100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
225 |
2r00111111 2r11111000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
226 |
2r00001111 2r11100000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
227 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
228 |
Round3DCheckBotForm := Round3DCheckBotForm onDevice:Display. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
229 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
230 |
^ Round3DCheckBotForm |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
231 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
232 |
"Created: / 3.11.1997 / 14:29:37 / cg" |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
233 |
"Modified: / 30.7.1998 / 21:29:57 / cg" |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
234 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
235 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
236 |
round3DCheckTopForm |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
237 |
Round3DCheckTopForm isNil ifTrue:[ |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
238 |
Round3DCheckTopForm := Form |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
239 |
width:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
240 |
height:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
241 |
fromArray:#[2r00000011 2r10000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
242 |
2r00011110 2r11110000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
243 |
2r00111000 2r00011000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
244 |
2r01110000 2r00001100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
245 |
2r01100000 2r00001100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
246 |
2r11000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
247 |
2r11000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
248 |
2r11000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
249 |
2r11000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
250 |
2r11000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
251 |
2r01100000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
252 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
253 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
254 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
255 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
256 |
]. |
1394
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
257 |
"/ fromArray:#[2r00000111 2r11000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
258 |
"/ 2r00011110 2r11110000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
259 |
"/ 2r00111000 2r00111000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
260 |
"/ 2r01110000 2r00011100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
261 |
"/ 2r01100000 2r00001100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
262 |
"/ 2r11000000 2r00000100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
263 |
"/ 2r11000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
264 |
"/ 2r11000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
265 |
"/ 2r11000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
266 |
"/ 2r11000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
267 |
"/ 2r01100000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
268 |
"/ 2r00000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
269 |
"/ 2r00000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
270 |
"/ 2r00000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
271 |
"/ 2r00000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
272 |
"/ ] |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
273 |
|
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
274 |
Round3DCheckTopForm := Round3DCheckTopForm onDevice:Display. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
275 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
276 |
^ Round3DCheckTopForm |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
277 |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
278 |
"Created: / 3.11.1997 / 14:29:45 / cg" |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
279 |
"Modified: / 30.7.1998 / 21:30:47 / cg" |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
280 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
281 |
|
1393 | 282 |
roundHalfLightForm |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
283 |
RoundHalfLightForm isNil ifTrue:[ |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
284 |
RoundHalfLightForm := Form |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
285 |
width:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
286 |
height:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
287 |
fromArray:#[2r00001100 2r01100000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
288 |
2r00110000 2r00010000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
289 |
2r01100000 2r00001000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
290 |
2r01000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
291 |
2r11000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
292 |
2r10000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
293 |
2r10000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
294 |
2r10000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
295 |
2r10000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
296 |
2r10000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
297 |
2r11000000 2r00001000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
298 |
2r00110000 2r00010000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
299 |
2r00011000 2r00110000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
300 |
2r00000111 2r11000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
301 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
302 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
303 |
|
1394
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
304 |
"/ fromArray:#[2r00000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
305 |
"/ 2r00000011 2r10000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
306 |
"/ 2r00001000 2r00100000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
307 |
"/ 2r00010000 2r00010000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
308 |
"/ 2r00100000 2r00001000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
309 |
"/ 2r00000000 2r00000100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
310 |
"/ 2r01000000 2r00000100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
311 |
"/ 2r01000000 2r00000100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
312 |
"/ 2r01000000 2r00000100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
313 |
"/ 2r00000000 2r00000100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
314 |
"/ 2r00100000 2r00001000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
315 |
"/ 2r00010000 2r00010000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
316 |
"/ 2r00001000 2r00100000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
317 |
"/ 2r00000011 2r10000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
318 |
"/ 2r00000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
319 |
"/ ] |
1393 | 320 |
|
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
321 |
RoundHalfLightForm := RoundHalfLightForm onDevice:Display. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
322 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
323 |
^ RoundHalfLightForm |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
324 |
|
1393 | 325 |
"Created: / 3.11.1997 / 18:26:40 / cg" |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
326 |
"Modified: / 30.7.1998 / 21:31:55 / cg" |
1393 | 327 |
! |
328 |
||
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
329 |
roundOffForm |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
330 |
RoundOffForm isNil ifTrue:[ |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
331 |
RoundOffForm := Form |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
332 |
width:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
333 |
height:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
334 |
fromArray:#[2r00000011 2r10000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
335 |
2r00001100 2r01100000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
336 |
2r00010000 2r00010000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
337 |
2r00100000 2r00001000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
338 |
2r01000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
339 |
2r01000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
340 |
2r10000000 2r00000010 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
341 |
2r10000000 2r00000010 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
342 |
2r10000000 2r00000010 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
343 |
2r01000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
344 |
2r01000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
345 |
2r00100000 2r00001000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
346 |
2r00010000 2r00010000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
347 |
2r00001100 2r01100000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
348 |
2r00000011 2r10000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
349 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
350 |
|
1394
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
351 |
"/ fromArray:#[2r00000011 2r10000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
352 |
"/ 2r00001111 2r11100000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
353 |
"/ 2r00111100 2r01111000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
354 |
"/ 2r00110000 2r00011000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
355 |
"/ 2r01100000 2r00001100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
356 |
"/ 2r01100000 2r00001100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
357 |
"/ 2r11000000 2r00000110 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
358 |
"/ 2r11000000 2r00000110 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
359 |
"/ 2r11000000 2r00000110 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
360 |
"/ 2r01100000 2r00001100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
361 |
"/ 2r01100000 2r00001100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
362 |
"/ 2r00110000 2r00011000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
363 |
"/ 2r00111100 2r01111000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
364 |
"/ 2r00001111 2r11100000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
365 |
"/ 2r00000011 2r10000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
366 |
"/ ] |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
367 |
RoundOffForm := RoundOffForm onDevice:Display. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
368 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
369 |
^ RoundOffForm |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
370 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
371 |
"Created: / 3.11.1997 / 12:41:13 / cg" |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
372 |
"Modified: / 30.7.1998 / 21:33:03 / cg" |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
373 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
374 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
375 |
roundOnForm |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
376 |
RoundOnForm isNil ifTrue:[ |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
377 |
RoundOnForm := Form |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
378 |
width:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
379 |
height:15 |
1405 | 380 |
"/ fromArray:#[2r00000000 2r00000000 |
381 |
"/ 2r00000000 2r00000000 |
|
382 |
"/ 2r00000000 2r00000000 |
|
383 |
"/ 2r00000111 2r11000000 |
|
384 |
"/ 2r00001111 2r11100000 |
|
385 |
"/ 2r00011111 2r11110000 |
|
386 |
"/ 2r00011111 2r11110000 |
|
387 |
"/ 2r00011111 2r11110000 |
|
388 |
"/ 2r00011111 2r11110000 |
|
389 |
"/ 2r00011111 2r11110000 |
|
390 |
"/ 2r00001111 2r11100000 |
|
391 |
"/ 2r00000111 2r11000000 |
|
392 |
"/ 2r00000000 2r00000000 |
|
393 |
"/ 2r00000000 2r00000000 |
|
394 |
"/ 2r00000000 2r00000000 |
|
395 |
"/ ] |
|
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
396 |
fromArray:#[2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
397 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
398 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
399 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
400 |
2r00000011 2r10000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
401 |
2r00000111 2r11000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
402 |
2r00001111 2r11100000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
403 |
2r00001111 2r11100000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
404 |
2r00001111 2r11100000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
405 |
2r00000111 2r11000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
406 |
2r00000011 2r10000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
407 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
408 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
409 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
410 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
411 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
412 |
RoundOnForm := RoundOnForm onDevice:Display. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
413 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
414 |
^ RoundOnForm |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
415 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
416 |
"Created: / 3.11.1997 / 12:41:17 / cg" |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
417 |
"Modified: / 30.7.1998 / 21:33:39 / cg" |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
418 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
419 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
420 |
updateStyleCache |
1882 | 421 |
<resource: #style (#'radioButton.style' |
422 |
#'radioButton.activeLevel' |
|
423 |
#'radioButton.passiveLevel' |
|
424 |
#'radioButton.activeImageFile' |
|
425 |
#'radioButton.activeImage' |
|
426 |
#'radioButton.passiveImageFile' |
|
427 |
#'radioButton.passiveImage')> |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
428 |
|
1882 | 429 |
|l f| |
430 |
||
431 |
DefaultButtonStyle := StyleSheet at:#'radioButton.style'. |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
432 |
l := -1. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
433 |
DefaultButtonStyle == #round2D ifTrue:[l := 0]. |
1882 | 434 |
DefaultActiveLevel := StyleSheet at:#'radioButton.activeLevel' default:l. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
435 |
DefaultButtonStyle == #motif ifTrue:[l := 1]. |
1882 | 436 |
DefaultPassiveLevel := StyleSheet at:#'radioButton.passiveLevel' default:l. |
437 |
||
438 |
RoundOnForm := nil. |
|
439 |
f := StyleSheet at:#'radioButton.activeImageFile'. |
|
440 |
f notNil ifTrue:[ |
|
441 |
f := Image fromFile:f. |
|
442 |
] ifFalse:[ |
|
443 |
f := StyleSheet at:#'radioButton.activeImage'. |
|
444 |
]. |
|
445 |
f notNil ifTrue:[ |
|
446 |
RoundOnForm := f onDevice:Display |
|
447 |
]. |
|
448 |
||
449 |
RoundOffForm := nil. |
|
450 |
f := StyleSheet at:#'radioButton.passiveImageFile'. |
|
451 |
f notNil ifTrue:[ |
|
452 |
f := Image fromFile:f. |
|
453 |
] ifFalse:[ |
|
454 |
f := StyleSheet at:#'radioButton.passiveImage'. |
|
455 |
]. |
|
456 |
f notNil ifTrue:[ |
|
457 |
RoundOffForm := f onDevice:Display |
|
458 |
]. |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
459 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
460 |
" |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
461 |
self updateStyleCache |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
462 |
" |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
463 |
|
1882 | 464 |
"Modified: / 28.4.1999 / 13:59:00 / cg" |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
465 |
! ! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
466 |
|
1583
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
467 |
!RadioButton methodsFor:'accessing'! |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
468 |
|
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
469 |
forceRadioButtonStyle |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
470 |
"force the radioButton to be displayed as round/motif radio button - |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
471 |
even if the styleSheet defaults differently. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
472 |
(as in IRIS style)" |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
473 |
|
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
474 |
buttonStyle isNil ifTrue:[ |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
475 |
styleSheet is3D ifTrue:[ |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
476 |
buttonStyle := #round3D. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
477 |
activeBgColor := bgColor. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
478 |
activeFgColor := fgColor. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
479 |
] ifFalse:[ |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
480 |
buttonStyle := #round2D. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
481 |
activeFgColor := fgColor. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
482 |
activeBgColor := bgColor. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
483 |
]. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
484 |
buttonOnLevel := DefaultActiveLevel. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
485 |
buttonOffLevel := DefaultPassiveLevel. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
486 |
onLevel := offLevel := 0. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
487 |
self level:0 |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
488 |
] |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
489 |
|
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
490 |
"Modified: / 18.6.1998 / 21:19:01 / cg" |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
491 |
"Created: / 18.6.1998 / 21:23:58 / cg" |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
492 |
! ! |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
493 |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
494 |
!RadioButton methodsFor:'drawing'! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
495 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
496 |
drawToggleImage |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
497 |
"drawing of the radio image is done here." |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
498 |
|
1882 | 499 |
|x y clrTop clrBot img1 img2 imgH imgOn threeD lvl |
500 |
isActive| |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
501 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
502 |
buttonStyle isNil ifTrue:[ |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
503 |
^ super drawToggleImage |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
504 |
]. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
505 |
|
1882 | 506 |
isActive := controller pressed. |
507 |
||
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
508 |
threeD := true. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
509 |
buttonStyle == #motif ifTrue:[ |
1882 | 510 |
img1 := self class motifCheckTopForm. |
511 |
img2 := self class motifCheckBotForm. |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
512 |
] ifFalse:[ |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
513 |
buttonStyle == #round3D ifTrue:[ |
1882 | 514 |
img1 := self class round3DCheckTopForm. |
515 |
img2 := self class round3DCheckBotForm. |
|
516 |
imgH := self class roundHalfLightForm. |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
517 |
buttonOnLevel == buttonOffLevel ifTrue:[ |
1882 | 518 |
isActive ifTrue:[ |
519 |
imgOn := self class roundOnForm. |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
520 |
] |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
521 |
]. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
522 |
] ifFalse:[ |
1882 | 523 |
buttonStyle == #image ifTrue:[ |
524 |
img1 := buttonOffImage. |
|
525 |
isActive ifTrue:[ |
|
526 |
imgOn := buttonOnImage. |
|
527 |
]. |
|
528 |
] ifFalse:[ |
|
529 |
img1 := self class roundOffForm. |
|
530 |
isActive ifTrue:[ |
|
531 |
imgOn := self class roundOnForm. |
|
532 |
]. |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
533 |
]. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
534 |
threeD := false. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
535 |
] |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
536 |
]. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
537 |
|
1882 | 538 |
img1 notNil ifTrue:[img1 := img1 onDevice:device]. |
539 |
img2 notNil ifTrue:[img2 := img2 onDevice:device]. |
|
540 |
imgH notNil ifTrue:[imgH := imgH onDevice:device]. |
|
541 |
imgOn notNil ifTrue:[imgOn := imgOn onDevice:device]. |
|
542 |
||
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
543 |
x := hSpace + margin. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
544 |
y := (height - img1 height) // 2. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
545 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
546 |
threeD ifFalse:[ |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
547 |
self paint:fgColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
548 |
self displayForm:img1 x:x y:y. |
1882 | 549 |
isActive ifTrue:[ |
550 |
self paint:(lampColor ? activeFgColor). |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
551 |
self displayForm:imgOn x:x y:y |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
552 |
] |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
553 |
] ifTrue:[ |
1882 | 554 |
lvl := isActive ifTrue:[buttonOnLevel] |
555 |
ifFalse:[buttonOffLevel]. |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
556 |
lvl < 0 ifTrue:[ |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
557 |
clrTop := shadowColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
558 |
clrBot := lightColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
559 |
] ifFalse:[ |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
560 |
clrTop := lightColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
561 |
clrBot := shadowColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
562 |
]. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
563 |
self paint:clrTop. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
564 |
self displayForm:img1 x:x y:y. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
565 |
self paint:clrBot. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
566 |
self displayForm:img2 x:x y:y. |
1393 | 567 |
(imgH notNil and:[halfShadowColor notNil]) ifTrue:[ |
568 |
self paint:halfShadowColor. |
|
569 |
self displayForm:imgH x:x y:y |
|
570 |
]. |
|
1882 | 571 |
isActive ifTrue:[ |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
572 |
imgOn notNil ifTrue:[ |
1469 | 573 |
self paint:lampColor. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
574 |
self displayForm:imgOn x:x y:y |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
575 |
] |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
576 |
] |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
577 |
] |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
578 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
579 |
"Created: / 3.11.1997 / 12:16:30 / cg" |
1882 | 580 |
"Modified: / 28.4.1999 / 14:02:00 / cg" |
1696
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
581 |
! |
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
582 |
|
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
583 |
drawWin95FocusFrame |
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
584 |
"redefined to draw the focus frame around the string-only" |
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
585 |
|
1892 | 586 |
|x y m1| |
1696
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
587 |
|
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
588 |
x := labelOriginX. " margin + 1. " |
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
589 |
y := labelOriginY. " margin + 1. " |
1892 | 590 |
m1 := margin + 1. |
1696
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
591 |
self |
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
592 |
displayDottedRectangleX:x |
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
593 |
y:y |
1892 | 594 |
width:(width - x - m1) |
595 |
height:(height - y - m1). |
|
1696
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
596 |
|
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
597 |
"Created: / 17.9.1998 / 14:16:46 / cg" |
1892 | 598 |
"Modified: / 29.4.1999 / 21:51:00 / cg" |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
599 |
! ! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
600 |
|
105 | 601 |
!RadioButton methodsFor:'initialization'! |
0 | 602 |
|
105 | 603 |
defaultControllerClass |
604 |
^ RadioButtonController |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
605 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
606 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
607 |
initStyle |
1882 | 608 |
<resource: #style (#'radioButton.showLamp')> |
609 |
||
1583
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
610 |
buttonStyle isNil ifTrue:[ |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
611 |
buttonStyle := DefaultButtonStyle. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
612 |
]. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
613 |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
614 |
super initStyle. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
615 |
|
1814
bbeeed65ec84
do not highlight when entering (unless explicitely set)
Claus Gittinger <cg@exept.de>
parents:
1809
diff
changeset
|
616 |
enteredBgColor := bgColor. |
bbeeed65ec84
do not highlight when entering (unless explicitely set)
Claus Gittinger <cg@exept.de>
parents:
1809
diff
changeset
|
617 |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
618 |
buttonStyle isNil ifTrue:[ |
1882 | 619 |
showLamp := styleSheet at:#'radioButton.showLamp' default:showLamp. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
620 |
^ self |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
621 |
]. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
622 |
|
1392 | 623 |
adjust := #left. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
624 |
showLamp := true. |
1469 | 625 |
lampColor := Color black. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
626 |
buttonOnLevel := DefaultActiveLevel. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
627 |
buttonOffLevel := DefaultPassiveLevel. |
1583
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
628 |
onLevel := offLevel := 0. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
629 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
630 |
self level:0. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
631 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
632 |
(buttonStyle == #motif |
1882 | 633 |
or:[buttonStyle == #round3D |
634 |
or:[buttonStyle == #image]]) ifTrue:[ |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
635 |
activeBgColor := bgColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
636 |
activeFgColor := fgColor. |
1882 | 637 |
buttonStyle == #image ifTrue:[ |
638 |
buttonOnImage := self class roundOnForm onDevice:device. |
|
639 |
buttonOffImage := self class roundOffForm onDevice:device. |
|
640 |
] |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
641 |
] ifFalse:[ |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
642 |
buttonStyle == #round2D ifTrue:[ |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
643 |
activeFgColor := fgColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
644 |
activeBgColor := bgColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
645 |
] |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
646 |
] |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
647 |
|
1882 | 648 |
"Modified: / 28.4.1999 / 14:05:35 / cg" |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
649 |
! ! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
650 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
651 |
!RadioButton methodsFor:'private'! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
652 |
|
1392 | 653 |
computeLabelOrigin |
654 |
super computeLabelOrigin. |
|
1469 | 655 |
buttonStyle notNil ifTrue:[ |
656 |
labelOriginX := hSpace + 15 + hSpace |
|
1392 | 657 |
] |
658 |
||
659 |
"Modified: / 3.11.1997 / 18:17:58 / cg" |
|
660 |
! |
|
661 |
||
1469 | 662 |
computeLabelSize |
663 |
"compute the extent needed to hold the label plus the lamp" |
|
664 |
||
665 |
super computeLabelSize. |
|
666 |
buttonStyle notNil ifTrue:[ |
|
667 |
labelWidth := labelWidth + 15 |
|
668 |
] |
|
669 |
! |
|
670 |
||
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
671 |
lampImageHeight |
1391 | 672 |
buttonStyle isNil ifTrue:[^ super lampImageHeight]. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
673 |
^ 15 |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
674 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
675 |
"Created: / 3.11.1997 / 14:27:27 / cg" |
1391 | 676 |
"Modified: / 3.11.1997 / 18:10:39 / cg" |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
677 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
678 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
679 |
lampImageWidth |
1391 | 680 |
buttonStyle isNil ifTrue:[^ super lampImageWidth]. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
681 |
^ 15 |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
682 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
683 |
"Created: / 3.11.1997 / 14:27:23 / cg" |
1391 | 684 |
"Modified: / 3.11.1997 / 18:10:50 / cg" |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
685 |
! ! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
686 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
687 |
!RadioButton methodsFor:'queries'! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
688 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
689 |
is3D |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
690 |
buttonStyle == #round2D ifTrue:[^ false.]. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
691 |
^ super is3D |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
692 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
693 |
"Created: / 3.11.1997 / 14:39:36 / cg" |
0 | 694 |
! ! |
695 |
||
205 | 696 |
!RadioButton class methodsFor:'documentation'! |
697 |
||
698 |
version |
|
1892 | 699 |
^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.29 1999-04-29 20:07:39 cg Exp $' |
205 | 700 |
! ! |