author | Claus Gittinger <cg@exept.de> |
Sun, 10 May 2015 01:05:46 +0200 | |
changeset 5348 | bd5cf96b87fd |
parent 5127 | fcd696f9f401 |
child 5540 | 7818c14b6026 |
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 |
" |
|
2583
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
12 |
"{ Package: 'stx:libwidg' }" |
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
13 |
|
0 | 14 |
Toggle subclass:#RadioButton |
3746 | 15 |
instanceVariableNames:'buttonStyle buttonOnLevel buttonOffLevel offImage onImage |
16 |
buttonOffImage buttonOnImage disabledOnImage disabledOffImage |
|
17 |
enteredOnImage enteredOffImage' |
|
4505 | 18 |
classVariableNames:'DefaultButtonStyle DefaultBorderWidth DefaultActiveLevel |
19 |
DefaultPassiveLevel DefaultForegroundColor DefaultBackgroundColor |
|
2583
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
20 |
DefaultActiveForegroundColor DefaultActiveBackgroundColor |
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
21 |
MotifCheckBotForm MotifCheckTopForm MotifCheckInnerForm |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
22 |
Round3DCheckBotForm Round3DCheckTopForm Round3DCheckInnerForm |
3746 | 23 |
RoundHalfLightForm RoundOffForm RoundOnForm PassiveForm |
24 |
ActiveForm EnteredPassiveForm EnteredActiveForm |
|
25 |
DisabledActiveForm DisabledPassiveForm' |
|
585 | 26 |
poolDictionaries:'' |
27 |
category:'Views-Interactors' |
|
0 | 28 |
! |
29 |
||
38 | 30 |
!RadioButton class methodsFor:'documentation'! |
31 |
||
32 |
copyright |
|
33 |
" |
|
34 |
COPYRIGHT (c) 1991 by Claus Gittinger |
|
35 |
All Rights Reserved |
|
0 | 36 |
|
38 | 37 |
This software is furnished under a license and may be used |
38 |
only in accordance with the terms of that license and with the |
|
39 |
inclusion of the above copyright notice. This software may not |
|
40 |
be provided or otherwise made available to, or used by, any |
|
41 |
other person. No title to or ownership of the software is |
|
42 |
hereby transferred. |
|
43 |
" |
|
44 |
! |
|
45 |
||
46 |
documentation |
|
47 |
" |
|
48 |
like a Toggle, but do not turn off when pressed again, instead only |
|
49 |
turn off when another RadioButton is pressed (see RadioButtonGroup). |
|
50 |
||
51 |
written fall 91 by claus |
|
585 | 52 |
|
53 |
[author:] |
|
54 |
Claus Gittinger |
|
38 | 55 |
" |
86 | 56 |
! |
57 |
||
58 |
examples |
|
59 |
" |
|
119 | 60 |
See more examples in RadioButtonGroup class>>examples |
61 |
||
62 |
example1: one on behavior (using RadioButtons) |
|
593 | 63 |
[exBegin] |
86 | 64 |
|top panel b group| |
65 |
||
66 |
top := StandardSystemView new. |
|
67 |
top extent:200@200. |
|
68 |
||
69 |
panel := HorizontalPanelView |
|
593 | 70 |
origin:0.0@0.0 |
71 |
corner:1.0@1.0 |
|
72 |
in:top. |
|
86 | 73 |
|
74 |
group := RadioButtonGroup new. |
|
75 |
||
76 |
b := RadioButton label:'am' in:panel. |
|
77 |
group add:b. |
|
78 |
||
79 |
b := RadioButton label:'fm' in:panel. |
|
80 |
group add:b. |
|
81 |
||
82 |
b := RadioButton label:'off' in:panel. |
|
83 |
group add:b. |
|
3748 | 84 |
b enabled:false. |
86 | 85 |
|
1087 | 86 |
group value:1. |
86 | 87 |
top open |
593 | 88 |
[exEnd] |
105 | 89 |
|
90 |
||
119 | 91 |
example2: zero or one on behavior (using Toggles) |
593 | 92 |
[exBegin] |
105 | 93 |
|top panel b group| |
94 |
||
95 |
top := StandardSystemView new. |
|
96 |
top extent:200@200. |
|
97 |
||
98 |
panel := HorizontalPanelView |
|
593 | 99 |
origin:0.0@0.0 |
100 |
corner:1.0@1.0 |
|
101 |
in:top. |
|
105 | 102 |
|
103 |
group := RadioButtonGroup new. |
|
104 |
||
105 |
b := Toggle label:'am' in:panel. |
|
106 |
group add:b. |
|
107 |
||
108 |
b := Toggle label:'fm' in:panel. |
|
109 |
group add:b. |
|
110 |
||
111 |
b := Toggle label:'off' in:panel. |
|
112 |
group add:b. |
|
113 |
||
1087 | 114 |
group value:1. |
105 | 115 |
top open |
593 | 116 |
[exEnd] |
1087 | 117 |
|
118 |
||
119 |
a selectionInListView and a group displaying the same value: |
|
120 |
[exBegin] |
|
121 |
|top top2 panel b sv group selectionInList| |
|
122 |
||
123 |
top := StandardSystemView extent:200@200. |
|
124 |
||
125 |
panel := HorizontalPanelView |
|
126 |
origin:0.0@0.0 corner:1.0@1.0 in:top. |
|
127 |
||
128 |
group := RadioButtonGroup new. |
|
129 |
selectionInList := SelectionInList new. |
|
130 |
selectionInList list:#('am' 'fm' 'off'). |
|
131 |
selectionInList selectionIndexHolder:group. |
|
132 |
||
133 |
b := Toggle label:'am' in:panel. |
|
134 |
group add:b. |
|
135 |
||
136 |
b := Toggle label:'fm' in:panel. |
|
137 |
group add:b. |
|
138 |
||
139 |
b := Toggle label:'off' in:panel. |
|
140 |
group add:b. |
|
141 |
||
142 |
group value:1. |
|
143 |
top open. |
|
144 |
||
145 |
top2 := StandardSystemView extent:200@200. |
|
146 |
sv := SelectionInListView in:top2. |
|
147 |
sv model:selectionInList. |
|
148 |
sv origin:0.0@0.0 corner:1.0@1.0. |
|
149 |
top2 open. |
|
150 |
||
151 |
[exEnd] |
|
86 | 152 |
" |
38 | 153 |
! ! |
0 | 154 |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
155 |
!RadioButton class methodsFor:'defaults'! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
156 |
|
3746 | 157 |
activeForm |
158 |
ActiveForm isNil ifTrue:[ |
|
159 |
self updateStyleCache. |
|
160 |
]. |
|
161 |
^ ActiveForm |
|
162 |
||
163 |
" |
|
164 |
ActiveForm := nil. |
|
165 |
self updateStyleCache |
|
166 |
" |
|
167 |
! |
|
168 |
||
169 |
disabledActiveForm |
|
170 |
DisabledActiveForm isNil ifTrue:[ |
|
171 |
self updateStyleCache. |
|
172 |
]. |
|
173 |
^ DisabledActiveForm |
|
174 |
||
175 |
" |
|
176 |
DisabledActiveForm := nil. |
|
177 |
self updateStyleCache |
|
178 |
" |
|
179 |
! |
|
180 |
||
181 |
disabledPassiveForm |
|
182 |
DisabledPassiveForm isNil ifTrue:[ |
|
183 |
self updateStyleCache. |
|
184 |
]. |
|
185 |
^ DisabledPassiveForm |
|
186 |
||
187 |
" |
|
188 |
DisabledPassiveForm := nil. |
|
189 |
self updateStyleCache |
|
190 |
" |
|
191 |
! |
|
192 |
||
193 |
enteredActiveForm |
|
194 |
EnteredActiveForm isNil ifTrue:[ |
|
195 |
self updateStyleCache. |
|
196 |
]. |
|
197 |
^ EnteredActiveForm |
|
198 |
||
199 |
" |
|
200 |
EnteredActiveForm := nil. |
|
201 |
self updateStyleCache |
|
202 |
" |
|
203 |
! |
|
204 |
||
205 |
enteredPassiveForm |
|
206 |
EnteredPassiveForm isNil ifTrue:[ |
|
207 |
self updateStyleCache. |
|
208 |
]. |
|
209 |
^ EnteredPassiveForm |
|
210 |
||
211 |
" |
|
212 |
EnteredPassiveForm := nil. |
|
213 |
self updateStyleCache |
|
214 |
" |
|
215 |
! |
|
216 |
||
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
217 |
motifCheckBotForm |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
218 |
MotifCheckBotForm isNil ifTrue:[ |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
219 |
MotifCheckBotForm := Form |
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
220 |
width:15 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
221 |
height:15 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
222 |
fromArray:#[2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
223 |
2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
224 |
2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
225 |
2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
226 |
2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
227 |
2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
228 |
2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
229 |
2r00000000 2r00001110 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
230 |
2r01110000 2r00011100 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
231 |
2r00111000 2r00111000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
232 |
2r00011100 2r01110000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
233 |
2r00001110 2r11100000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
234 |
2r00000111 2r11000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
235 |
2r00000011 2r10000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
236 |
2r00000001 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
237 |
]. |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
238 |
MotifCheckBotForm := MotifCheckBotForm onDevice:Display. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
239 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
240 |
^ MotifCheckBotForm |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
241 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
242 |
"Created: / 3.11.1997 / 12:06:45 / cg" |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
243 |
"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
|
244 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
245 |
|
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
246 |
motifCheckInnerForm |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
247 |
MotifCheckInnerForm isNil ifTrue:[ |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
248 |
MotifCheckInnerForm := Form |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
249 |
width:15 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
250 |
height:15 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
251 |
fromArray:#[2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
252 |
2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
253 |
2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
254 |
2r00000001 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
255 |
2r00000011 2r10000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
256 |
2r00000111 2r11000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
257 |
2r00001111 2r11100000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
258 |
2r00011111 2r11110000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
259 |
2r00001111 2r11100000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
260 |
2r00000111 2r11000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
261 |
2r00000011 2r10000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
262 |
2r00000001 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
263 |
2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
264 |
2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
265 |
2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
266 |
]. |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
267 |
MotifCheckInnerForm := MotifCheckInnerForm onDevice:Display |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
268 |
]. |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
269 |
^ MotifCheckInnerForm |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
270 |
|
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
271 |
"Created: / 3.11.1997 / 12:06:45 / cg" |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
272 |
"Modified: / 30.7.1998 / 21:28:45 / cg" |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
273 |
! |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
274 |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
275 |
motifCheckTopForm |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
276 |
MotifCheckTopForm isNil ifTrue:[ |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
277 |
MotifCheckTopForm := Form |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
278 |
width:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
279 |
height:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
280 |
fromArray:#[2r00000001 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
281 |
2r00000011 2r10000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
282 |
2r00000111 2r11000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
283 |
2r00001110 2r11100000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
284 |
2r00011100 2r01110000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
285 |
2r00111000 2r00111000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
286 |
2r01110000 2r00011100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
287 |
2r11100000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
288 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
289 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
290 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
291 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
292 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
293 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
294 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
295 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
296 |
MotifCheckTopForm := MotifCheckTopForm onDevice:Display |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
297 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
298 |
^ MotifCheckTopForm |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
299 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
300 |
"Created: / 3.11.1997 / 12:06:45 / cg" |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
301 |
"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
|
302 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
303 |
|
3746 | 304 |
passiveForm |
305 |
PassiveForm isNil ifTrue:[ |
|
306 |
self updateStyleCache. |
|
307 |
]. |
|
308 |
^ PassiveForm |
|
309 |
||
310 |
" |
|
311 |
PassiveForm := nil. |
|
312 |
self updateStyleCache |
|
313 |
" |
|
314 |
! |
|
315 |
||
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
316 |
round3DCheckBotForm |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
317 |
Round3DCheckBotForm isNil ifTrue:[ |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
318 |
Round3DCheckBotForm := Form |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
319 |
width:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
320 |
height:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
321 |
fromArray:#[2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
322 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
323 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
324 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
325 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
326 |
2r00000000 2r00000010 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
327 |
2r00000000 2r00000010 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
328 |
2r00000000 2r00000110 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
329 |
2r00000000 2r00000110 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
330 |
2r00000000 2r00000110 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
331 |
2r00000000 2r00001110 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
332 |
2r01110000 2r00011100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
333 |
2r01111000 2r00111100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
334 |
2r00111111 2r11111000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
335 |
2r00001111 2r11100000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
336 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
337 |
Round3DCheckBotForm := Round3DCheckBotForm onDevice:Display. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
338 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
339 |
^ Round3DCheckBotForm |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
340 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
341 |
"Created: / 3.11.1997 / 14:29:37 / cg" |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
342 |
"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
|
343 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
344 |
|
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
345 |
round3DCheckInnerForm |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
346 |
Round3DCheckInnerForm isNil ifTrue:[ |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
347 |
Round3DCheckInnerForm := Form |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
348 |
width:15 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
349 |
height:15 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
350 |
fromArray:#[2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
351 |
2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
352 |
2r00000111 2r11000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
353 |
2r00001111 2r11100000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
354 |
2r00011111 2r11110000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
355 |
2r00111111 2r11111000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
356 |
2r00111111 2r11111000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
357 |
2r00111111 2r11111000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
358 |
2r00111111 2r11111000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
359 |
2r00111111 2r11111000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
360 |
2r00011111 2r11110000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
361 |
2r00001111 2r11100000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
362 |
2r00000111 2r11000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
363 |
2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
364 |
2r00000000 2r00000000 |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
365 |
]. |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
366 |
|
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
367 |
Round3DCheckInnerForm := Round3DCheckInnerForm onDevice:Display. |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
368 |
]. |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
369 |
^ Round3DCheckInnerForm |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
370 |
|
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
371 |
"Created: / 3.11.1997 / 14:29:45 / cg" |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
372 |
"Modified: / 30.7.1998 / 21:30:47 / cg" |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
373 |
! |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
374 |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
375 |
round3DCheckTopForm |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
376 |
Round3DCheckTopForm isNil ifTrue:[ |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
377 |
Round3DCheckTopForm := 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 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
380 |
fromArray:#[2r00000011 2r10000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
381 |
2r00011110 2r11110000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
382 |
2r00111000 2r00011000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
383 |
2r01110000 2r00001100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
384 |
2r01100000 2r00001100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
385 |
2r11000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
386 |
2r11000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
387 |
2r11000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
388 |
2r11000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
389 |
2r11000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
390 |
2r01100000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
391 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
392 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
393 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
394 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
395 |
]. |
1394
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
396 |
"/ fromArray:#[2r00000111 2r11000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
397 |
"/ 2r00011110 2r11110000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
398 |
"/ 2r00111000 2r00111000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
399 |
"/ 2r01110000 2r00011100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
400 |
"/ 2r01100000 2r00001100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
401 |
"/ 2r11000000 2r00000100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
402 |
"/ 2r11000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
403 |
"/ 2r11000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
404 |
"/ 2r11000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
405 |
"/ 2r11000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
406 |
"/ 2r01100000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
407 |
"/ 2r00000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
408 |
"/ 2r00000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
409 |
"/ 2r00000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
410 |
"/ 2r00000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
411 |
"/ ] |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
412 |
|
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
413 |
Round3DCheckTopForm := Round3DCheckTopForm onDevice:Display. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
414 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
415 |
^ Round3DCheckTopForm |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
416 |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
417 |
"Created: / 3.11.1997 / 14:29:45 / cg" |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
418 |
"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
|
419 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
420 |
|
1393 | 421 |
roundHalfLightForm |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
422 |
RoundHalfLightForm isNil ifTrue:[ |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
423 |
RoundHalfLightForm := Form |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
424 |
width:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
425 |
height:15 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
426 |
fromArray:#[2r00001100 2r01100000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
427 |
2r00110000 2r00010000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
428 |
2r01100000 2r00001000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
429 |
2r01000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
430 |
2r11000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
431 |
2r10000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
432 |
2r10000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
433 |
2r10000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
434 |
2r10000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
435 |
2r10000000 2r00000100 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
436 |
2r11000000 2r00001000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
437 |
2r00110000 2r00010000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
438 |
2r00011000 2r00110000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
439 |
2r00000111 2r11000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
440 |
2r00000000 2r00000000 |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
441 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
442 |
|
1394
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
443 |
"/ fromArray:#[2r00000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
444 |
"/ 2r00000011 2r10000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
445 |
"/ 2r00001000 2r00100000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
446 |
"/ 2r00010000 2r00010000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
447 |
"/ 2r00100000 2r00001000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
448 |
"/ 2r00000000 2r00000100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
449 |
"/ 2r01000000 2r00000100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
450 |
"/ 2r01000000 2r00000100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
451 |
"/ 2r01000000 2r00000100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
452 |
"/ 2r00000000 2r00000100 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
453 |
"/ 2r00100000 2r00001000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
454 |
"/ 2r00010000 2r00010000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
455 |
"/ 2r00001000 2r00100000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
456 |
"/ 2r00000011 2r10000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
457 |
"/ 2r00000000 2r00000000 |
7db0ce820be2
beautified 3D bitmaps (OS/2 style)
Claus Gittinger <cg@exept.de>
parents:
1393
diff
changeset
|
458 |
"/ ] |
1393 | 459 |
|
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
460 |
RoundHalfLightForm := RoundHalfLightForm onDevice:Display. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
461 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
462 |
^ RoundHalfLightForm |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
463 |
|
1393 | 464 |
"Created: / 3.11.1997 / 18:26:40 / cg" |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
465 |
"Modified: / 30.7.1998 / 21:31:55 / cg" |
1393 | 466 |
! |
467 |
||
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
468 |
roundOffForm |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
469 |
RoundOffForm isNil ifTrue:[ |
3693 | 470 |
"DSVColumnView>>updateStyleCache calls us before our style |
471 |
cache has been initialized" |
|
3688 | 472 |
self updateStyleCache. |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
473 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
474 |
^ RoundOffForm |
3688 | 475 |
! |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
476 |
|
3688 | 477 |
roundOffForm_old |
478 |
^ Form |
|
479 |
width:16 |
|
480 |
height:16 |
|
481 |
fromArray:#[ |
|
482 |
2r00000011 2r10000000 |
|
483 |
2r00001100 2r01100000 |
|
484 |
2r00010000 2r00010000 |
|
485 |
2r00100000 2r00001000 |
|
486 |
2r01000000 2r00000100 |
|
487 |
2r01000000 2r00000100 |
|
488 |
2r10000000 2r00000010 |
|
489 |
2r10000000 2r00000010 |
|
490 |
2r10000000 2r00000010 |
|
491 |
2r01000000 2r00000100 |
|
492 |
2r01000000 2r00000100 |
|
493 |
2r00100000 2r00001000 |
|
494 |
2r00010000 2r00010000 |
|
495 |
2r00001100 2r01100000 |
|
496 |
2r00000011 2r10000000 |
|
497 |
2r00000000 2r00000000 |
|
498 |
]. |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
499 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
500 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
501 |
roundOnForm |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
502 |
RoundOnForm isNil ifTrue:[ |
3693 | 503 |
"DSVColumnView>>updateStyleCache calls us before our style |
504 |
cache has been initialized" |
|
3688 | 505 |
self updateStyleCache. |
1629
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
506 |
]. |
21481cd942f9
cache forms - avoid recreation.
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
507 |
^ RoundOnForm |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
508 |
|
3688 | 509 |
" |
510 |
RoundOnForm := nil. |
|
511 |
self updateStyleCache |
|
512 |
" |
|
513 |
! |
|
514 |
||
515 |
roundOnForm_old |
|
516 |
^ Form |
|
517 |
width:16 |
|
518 |
height:16 |
|
519 |
fromArray:#[ |
|
520 |
2r00000000 2r00000000 |
|
521 |
2r00000000 2r00000000 |
|
522 |
2r00000000 2r00000000 |
|
523 |
2r00000000 2r00000000 |
|
524 |
2r00000011 2r10000000 |
|
525 |
2r00000111 2r11000000 |
|
526 |
2r00001111 2r11100000 |
|
527 |
2r00001111 2r11100000 |
|
528 |
2r00001111 2r11100000 |
|
529 |
2r00000111 2r11000000 |
|
530 |
2r00000011 2r10000000 |
|
531 |
2r00000000 2r00000000 |
|
532 |
2r00000000 2r00000000 |
|
533 |
2r00000000 2r00000000 |
|
534 |
2r00000000 2r00000000 |
|
535 |
2r00000000 2r00000000 |
|
536 |
]. |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
537 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
538 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
539 |
updateStyleCache |
1882 | 540 |
<resource: #style (#'radioButton.style' |
541 |
#'radioButton.activeLevel' |
|
542 |
#'radioButton.passiveLevel' |
|
543 |
#'radioButton.activeImageFile' |
|
544 |
#'radioButton.activeImage' |
|
3746 | 545 |
#'radioButton.enteredActiveImageFile' |
546 |
#'radioButton.enteredActiveImage' |
|
1882 | 547 |
#'radioButton.passiveImageFile' |
2583
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
548 |
#'radioButton.passiveImage' |
3746 | 549 |
#'radioButton.enteredPassiveImageFile' |
550 |
#'radioButton.enteredPassiveImage' |
|
2583
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
551 |
#'radioButton.foregroundColor' |
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
552 |
#'radioButton.backgroundColor' |
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
553 |
#'radioButton.activeForegroundColor' |
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
554 |
#'radioButton.activeBackgroundColor' |
4505 | 555 |
#'radioButton.borderWidth' |
2583
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
556 |
)> |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
557 |
|
3746 | 558 |
|l fetchImage| |
1882 | 559 |
|
4505 | 560 |
DefaultBorderWidth := StyleSheet at:#'radioButton.borderWidth'. |
561 |
||
4740 | 562 |
DefaultFont := StyleSheet fontAt:'label.font'. |
1882 | 563 |
DefaultButtonStyle := StyleSheet at:#'radioButton.style'. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
564 |
l := -1. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
565 |
DefaultButtonStyle == #round2D ifTrue:[l := 0]. |
1882 | 566 |
DefaultActiveLevel := StyleSheet at:#'radioButton.activeLevel' default:l. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
567 |
DefaultButtonStyle == #motif ifTrue:[l := 1]. |
1882 | 568 |
DefaultPassiveLevel := StyleSheet at:#'radioButton.passiveLevel' default:l. |
569 |
||
2583
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
570 |
DefaultForegroundColor := StyleSheet at:#'radioButton.foregroundColor'. |
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
571 |
DefaultBackgroundColor := StyleSheet at:#'radioButton.backgroundColor'. |
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
572 |
|
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
573 |
DefaultActiveForegroundColor := StyleSheet at:#'radioButton.activeForegroundColor'. |
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
574 |
DefaultActiveBackgroundColor := StyleSheet at:#'radioButton.activeBackgroundColor'. |
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
575 |
|
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
576 |
RoundOnForm := RoundOffForm := nil. |
3746 | 577 |
ActiveForm := EnteredActiveForm := nil. |
578 |
PassiveForm := EnteredPassiveForm := nil. |
|
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
579 |
|
3746 | 580 |
fetchImage := |
581 |
[:fileNameKey :imageKey :defaultW95 :defaultXP :defaultVista | |
|
582 |
|f| |
|
583 |
||
584 |
f := StyleSheet at:imageKey. |
|
585 |
f notNil |
|
586 |
ifTrue:[ |
|
587 |
f := f value ] |
|
588 |
ifFalse:[ |
|
589 |
f := StyleSheet at:fileNameKey. |
|
590 |
f notNil |
|
591 |
ifTrue:[ |
|
592 |
f := Smalltalk imageFromFileNamed:f forClass:self.] |
|
593 |
ifFalse:[ |
|
594 |
f := (StyleSheet isWindowsVistaStyle) |
|
595 |
ifTrue:defaultVista |
|
596 |
ifFalse:[ |
|
597 |
StyleSheet isWindowsXPStyle |
|
598 |
ifTrue:defaultXP |
|
599 |
ifFalse:defaultW95]. |
|
600 |
] |
|
601 |
]. |
|
602 |
f notNil ifTrue:[ |
|
603 |
f := f onDevice:Display |
|
604 |
]. |
|
605 |
f |
|
606 |
]. |
|
1882 | 607 |
|
3746 | 608 |
ActiveForm := RoundOnForm := fetchImage |
609 |
value:#'radioButton.activeImageFile' |
|
610 |
value:#'radioButton.activeImage' |
|
611 |
value:[ self radioOnIcon_w95 ] |
|
612 |
value:[ self radioOnIcon_xp ] |
|
613 |
value:[ self radioOnIcon_vista ]. |
|
614 |
||
615 |
PassiveForm := RoundOffForm := fetchImage |
|
616 |
value:#'radioButton.passiveImageFile' |
|
617 |
value:#'radioButton.passiveImage' |
|
618 |
value:[ self radioOffIcon_w95 ] |
|
619 |
value:[ self radioOffIcon_xp ] |
|
620 |
value:[ self radioOffIcon_vista ]. |
|
621 |
||
622 |
EnteredActiveForm := fetchImage |
|
623 |
value:#'radioButton.enteredActiveImageFile' |
|
624 |
value:#'radioButton.enteredActiveImage' |
|
625 |
value:[ self radioOnEnteredIcon_w95 ] |
|
626 |
value:[ self radioOnEnteredIcon_xp ] |
|
627 |
value:[ self radioOnEnteredIcon_vista ]. |
|
3687
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
628 |
|
3746 | 629 |
EnteredPassiveForm := fetchImage |
630 |
value:#'radioButton.enteredPassiveImageFile' |
|
631 |
value:#'radioButton.enteredPassiveImage' |
|
632 |
value:[ self radioOffEnteredIcon_w95 ] |
|
633 |
value:[ self radioOffEnteredIcon_xp ] |
|
634 |
value:[ self radioOffEnteredIcon_vista ]. |
|
635 |
||
636 |
DisabledActiveForm := fetchImage |
|
637 |
value:#'radioButton.disabledActiveImageFile' |
|
638 |
value:#'radioButton.disabledActiveImage' |
|
639 |
value:[ self radioOnDisabledIcon_w95 ] |
|
640 |
value:[ self radioOnDisabledIcon_xp ] |
|
641 |
value:[ self radioOnDisabledIcon_vista ]. |
|
642 |
||
643 |
DisabledPassiveForm := fetchImage |
|
644 |
value:#'radioButton.disabledPassiveImageFile' |
|
645 |
value:#'radioButton.disabledPassiveImage' |
|
646 |
value:[ self radioOffDisabledIcon_w95 ] |
|
647 |
value:[ self radioOffDisabledIcon_xp ] |
|
648 |
value:[ self radioOffDisabledIcon_vista ]. |
|
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 |
self updateStyleCache |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
652 |
" |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
653 |
|
1882 | 654 |
"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
|
655 |
! ! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
656 |
|
3687
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
657 |
!RadioButton class methodsFor:'image specs'! |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
658 |
|
3746 | 659 |
radioOffDisabledIcon_vista |
3748 | 660 |
^ VistaToolbarIconLibrary radioOffDisabled12x12Icon |
3746 | 661 |
! |
662 |
||
663 |
radioOffDisabledIcon_w95 |
|
664 |
^ self radioOffIcon_w95 |
|
665 |
! |
|
666 |
||
667 |
radioOffDisabledIcon_xp |
|
668 |
^ self radioOffIcon_xp |
|
669 |
! |
|
670 |
||
671 |
radioOffEnteredIcon_vista |
|
672 |
^ VistaToolbarIconLibrary radioOffEntered12x12Icon |
|
673 |
! |
|
674 |
||
675 |
radioOffEnteredIcon_w95 |
|
676 |
^ self radioOffIcon_w95 |
|
677 |
! |
|
678 |
||
679 |
radioOffEnteredIcon_xp |
|
680 |
^ self radioOffIcon_xp |
|
681 |
! |
|
682 |
||
683 |
radioOffIcon_vista |
|
684 |
^ VistaToolbarIconLibrary radioOff12x12Icon |
|
685 |
! |
|
686 |
||
3687
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
687 |
radioOffIcon_w95 |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
688 |
"This resource specification was automatically generated |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
689 |
by the ImageEditor of ST/X." |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
690 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
691 |
"Do not manually edit this!! If it is corrupted, |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
692 |
the ImageEditor may not be able to read the specification." |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
693 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
694 |
" |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
695 |
self radioOffIcon_w95 inspect |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
696 |
ImageEditor openOnClass:self andSelector:#radioOffIcon_w95 |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
697 |
Icon flushCachedIcons |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
698 |
" |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
699 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
700 |
<resource: #image> |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
701 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
702 |
^Icon |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
703 |
constantNamed:'RadioButton class radioOffIcon_w95' |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
704 |
ifAbsentPut:[(Depth8Image new) width: 12; height: 12; photometric:(#palette); bitsPerSample:(#(8)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
705 |
A@PDA@DA@PDDA@PDA@PA@P@@@@@A@PPDA@D@@@LC@0L@@@LDA@D@@0LC@0LC@ LD@P@C@0LC@0LC@0HC@P@C@0LC@0LC@0HC@P@C@0LC@0LC@0HC@P@C@0LC |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
706 |
@0LC@0HCA@D@@0LC@0LC@ LDA@DB@ LC@0LB@ LDA@PC@0HB@ HC@0PDA@PDA@LC@0LDA@PD') ; colorMapFromArray:#[0 0 0 128 128 128 223 223 223 255 255 255 0 0 0]; mask:((ImageMask new) width: 12; height: 12; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0@?0G? _>C?<O?0??C?<G? _>@?0@<@') ; yourself); yourself] |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
707 |
! |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
708 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
709 |
radioOffIcon_xp |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
710 |
"This resource specification was automatically generated |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
711 |
by the ImageEditor of ST/X." |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
712 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
713 |
"Do not manually edit this!! If it is corrupted, |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
714 |
the ImageEditor may not be able to read the specification." |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
715 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
716 |
" |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
717 |
self radioOffIcon_xp inspect |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
718 |
ImageEditor openOnClass:self andSelector:#radioOffIcon_xp |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
719 |
Icon flushCachedIcons |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
720 |
" |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
721 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
722 |
<resource: #image> |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
723 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
724 |
^Icon |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
725 |
constantNamed:'RadioButton class radioOffIcon_xp' |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
726 |
ifAbsentPut:[(Depth8Image new) width: 13; height: 13; photometric:(#palette); bitsPerSample:(#(8)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
727 |
KB0,A T''G"\EA"0,KB0,B1,OH14%DQ,KKB0,B1 P@BPTE1$&J@,,D1,P@BPTE1$\CB$[D0TO@BPTE1$\C@4+E T''H2PTE1$\C@4+@Q<JG!!4TE1$\C@4+@PL* |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
728 |
G (%E1$\C@4+@PLHHB\UDQ$\C@4+@PLHA0$ED1,&C@4+@PLHA0P[H"0KJB$+@PLHA0PNB20,KA([E!!<*H@$[B20,KB0,HQT''G (R@"0,K@@a') ; colorMapFromArray:#[224 224 219 247 247 246 221 226 229 249 249 248 188 204 217 164 183 198 222 228 229 253 253 252 251 251 250 112 145 175 90 128 159 180 195 206 241 241 239 243 243 241 96 133 166 100 134 161 166 181 191 104 137 166 164 182 198 222 227 229 229 229 226 164 183 197 110 143 172 232 232 229 85 122 154 236 236 233 179 195 206 33 85 130 239 239 236 218 220 218 36 87 131 185 200 213 188 203 216 222 226 229 222 227 228 167 183 193 226 226 222 171 186 198 178 193 205 90 128 160 91 129 161 181 196 208 242 244 245 245 245 244 0 0 0]; mask:((ImageMask new) width: 13; height: 13; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'G<@?8G?0??#?>O?8??#?>O?8??!!?<C? G<@b') ; yourself); yourself] |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
729 |
! |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
730 |
|
3746 | 731 |
radioOnDisabledIcon_vista |
3748 | 732 |
^ VistaToolbarIconLibrary radioOnDisabled12x12Icon |
3746 | 733 |
! |
734 |
||
735 |
radioOnDisabledIcon_w95 |
|
736 |
^ self radioOnIcon_w95 |
|
737 |
! |
|
738 |
||
739 |
radioOnDisabledIcon_xp |
|
740 |
^ self radioOnIcon_xp |
|
741 |
! |
|
742 |
||
743 |
radioOnEnteredIcon_vista |
|
744 |
^ VistaToolbarIconLibrary radioOnEntered12x12Icon |
|
745 |
! |
|
746 |
||
747 |
radioOnEnteredIcon_w95 |
|
748 |
^ self radioOnIcon_w95 |
|
749 |
! |
|
750 |
||
751 |
radioOnEnteredIcon_xp |
|
752 |
^ self radioOnIcon_xp |
|
753 |
! |
|
754 |
||
755 |
radioOnIcon_vista |
|
756 |
^ VistaToolbarIconLibrary radioOn12x12Icon |
|
757 |
! |
|
758 |
||
3687
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
759 |
radioOnIcon_w95 |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
760 |
"This resource specification was automatically generated |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
761 |
by the ImageEditor of ST/X." |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
762 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
763 |
"Do not manually edit this!! If it is corrupted, |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
764 |
the ImageEditor may not be able to read the specification." |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
765 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
766 |
" |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
767 |
self radioOnIcon_w95 inspect |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
768 |
ImageEditor openOnClass:self andSelector:#radioOnIcon_w95 |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
769 |
Icon flushCachedIcons |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
770 |
" |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
771 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
772 |
<resource: #image> |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
773 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
774 |
^Icon |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
775 |
constantNamed:'RadioButton class radioOnIcon_w95' |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
776 |
ifAbsentPut:[(Depth8Image new) width: 12; height: 12; photometric:(#palette); bitsPerSample:(#(8)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
777 |
A@PDA@DA@PDDA@PDA@PA@P@@@@@A@PPDA@D@@@LC@0L@@@LDA@D@@0LC@0LC@ LD@P@C@0L@@@LC@0HC@P@C@0@@@@@C@0HC@P@C@0@@@@@C@0HC@P@C@0L@ |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
778 |
@@LC@0HCA@D@@0LC@0LC@ LDA@DB@ LC@0LB@ LDA@PC@0HB@ HC@0PDA@PDA@LC@0LDA@PD') ; colorMapFromArray:#[0 0 0 128 128 128 223 223 223 255 255 255 0 0 0]; mask:((ImageMask new) width: 12; height: 12; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0@?0G? _>C?<O?0??C?<G? _>@?0@<@') ; yourself); yourself] |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
779 |
! |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
780 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
781 |
radioOnIcon_xp |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
782 |
"This resource specification was automatically generated |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
783 |
by the ImageEditor of ST/X." |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
784 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
785 |
"Do not manually edit this!! If it is corrupted, |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
786 |
the ImageEditor may not be able to read the specification." |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
787 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
788 |
" |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
789 |
self radioOnIcon_xp inspect |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
790 |
ImageEditor openOnClass:self andSelector:#radioOnIcon_xp |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
791 |
Icon flushCachedIcons |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
792 |
" |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
793 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
794 |
<resource: #image> |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
795 |
|
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
796 |
^Icon |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
797 |
constantNamed:'RadioButton class radioOnIcon_xp' |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
798 |
ifAbsentPut:[(Depth8Image new) width: 13; height: 13; photometric:(#palette); bitsPerSample:(#(8)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
799 |
Q4]GC18MK04^C4]GQ4]GL0T<JD@1PPT3Q4]GL2ABA2(9BQ@AO3MGE UBOQ<7DBMCIA(EE!!8<A1<HL#86K@IDJQ8MJB(7L XQC (&I!!,UK4@9DC8WJ3UE@0LR |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
800 |
K1T1BRL6Q"8TLC(-M@4"PQACK@(DI1L\C@@^E TAI@H&@3(\B2TEFT\3O1)DI L-CBT;L4]GQ3 EJQ,RM@@EL4]GQ4]GFBHMK1T!!GT]GQ0@a') ; colorMapFromArray:#[112 145 175 178 193 205 245 245 243 249 249 248 36 150 36 33 85 130 85 213 81 224 224 219 226 232 222 232 232 229 154 204 152 253 253 253 253 253 252 90 128 160 41 168 38 222 228 229 236 236 233 67 195 63 242 244 245 238 243 237 19 146 16 90 128 159 222 227 229 66 195 63 222 226 229 222 227 228 181 196 208 185 200 213 252 252 251 221 226 229 164 183 198 231 231 227 85 122 154 164 182 198 164 183 197 239 239 236 243 243 241 188 204 217 247 247 246 152 201 151 167 183 193 110 143 172 226 226 222 56 185 53 232 238 230 251 251 250 34 162 32 36 87 131 152 200 151 171 186 198 169 220 166 180 195 206 188 203 216 33 161 33 160 210 158 234 234 230 179 195 206 229 229 226 250 250 249 96 133 166 100 134 161 229 229 225 77 191 74 91 129 161 218 220 218 104 137 166 166 181 191 241 241 239 245 245 244 38 150 35 42 168 39 0 0 0]; mask:((ImageMask new) width: 13; height: 13; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'G<@?8G?0??#?>O?8??#?>O?8??!!?<C? G<@b') ; yourself); yourself] |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
801 |
! ! |
48b9b4e7ed08
to ensure bitmap is always available: include it in the binary
Claus Gittinger <cg@exept.de>
parents:
3668
diff
changeset
|
802 |
|
1583
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
803 |
!RadioButton methodsFor:'accessing'! |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
804 |
|
3601 | 805 |
allViewBackground:something if:condition |
806 |
(condition value:self) ifTrue:[ |
|
807 |
self backgroundColor:something. |
|
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
808 |
|
3601 | 809 |
(buttonStyle == #motif |
810 |
or:[buttonStyle == #round3D |
|
811 |
or:[buttonStyle == #image |
|
812 |
or:[buttonStyle == #round2D]]]) ifTrue:[ |
|
813 |
enteredBgColor := something. |
|
814 |
activeBgColor := something. |
|
815 |
] |
|
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
816 |
] |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
817 |
! |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
818 |
|
1583
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
819 |
forceRadioButtonStyle |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
820 |
"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
|
821 |
even if the styleSheet defaults differently. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
822 |
(as in IRIS style)" |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
823 |
|
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
824 |
buttonStyle isNil ifTrue:[ |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
825 |
styleSheet is3D ifTrue:[ |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
826 |
buttonStyle := #round3D. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
827 |
activeBgColor := bgColor. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
828 |
activeFgColor := fgColor. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
829 |
] ifFalse:[ |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
830 |
buttonStyle := #round2D. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
831 |
activeFgColor := fgColor. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
832 |
activeBgColor := bgColor. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
833 |
]. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
834 |
buttonOnLevel := DefaultActiveLevel. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
835 |
buttonOffLevel := DefaultPassiveLevel. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
836 |
onLevel := offLevel := 0. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
837 |
self level:0 |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
838 |
] |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
839 |
|
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
840 |
"Modified: / 18.6.1998 / 21:19:01 / cg" |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
841 |
"Created: / 18.6.1998 / 21:23:58 / cg" |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
842 |
! ! |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
843 |
|
5125 | 844 |
!RadioButton methodsFor:'changing state'! |
845 |
||
846 |
turnOff |
|
5127
fcd696f9f401
Access device and drawableId via message sends
Stefan Vogel <sv@exept.de>
parents:
5125
diff
changeset
|
847 |
|id| |
fcd696f9f401
Access device and drawableId via message sends
Stefan Vogel <sv@exept.de>
parents:
5125
diff
changeset
|
848 |
|
5125 | 849 |
super turnOff. |
5127
fcd696f9f401
Access device and drawableId via message sends
Stefan Vogel <sv@exept.de>
parents:
5125
diff
changeset
|
850 |
id := gc drawableId. |
fcd696f9f401
Access device and drawableId via message sends
Stefan Vogel <sv@exept.de>
parents:
5125
diff
changeset
|
851 |
id notNil ifTrue:[ |
5125 | 852 |
self isNativeWidget ifTrue:[ |
5127
fcd696f9f401
Access device and drawableId via message sends
Stefan Vogel <sv@exept.de>
parents:
5125
diff
changeset
|
853 |
self graphicsDevice changeButtonState:false in:id. |
5125 | 854 |
]. |
855 |
]. |
|
856 |
! |
|
857 |
||
858 |
turnOn |
|
5127
fcd696f9f401
Access device and drawableId via message sends
Stefan Vogel <sv@exept.de>
parents:
5125
diff
changeset
|
859 |
|id| |
fcd696f9f401
Access device and drawableId via message sends
Stefan Vogel <sv@exept.de>
parents:
5125
diff
changeset
|
860 |
|
5125 | 861 |
super turnOn. |
5127
fcd696f9f401
Access device and drawableId via message sends
Stefan Vogel <sv@exept.de>
parents:
5125
diff
changeset
|
862 |
id := gc drawableId. |
fcd696f9f401
Access device and drawableId via message sends
Stefan Vogel <sv@exept.de>
parents:
5125
diff
changeset
|
863 |
id notNil ifTrue:[ |
5125 | 864 |
self isNativeWidget ifTrue:[ |
5127
fcd696f9f401
Access device and drawableId via message sends
Stefan Vogel <sv@exept.de>
parents:
5125
diff
changeset
|
865 |
self graphicsDevice changeButtonState:true in:id. |
5125 | 866 |
]. |
867 |
]. |
|
868 |
! ! |
|
869 |
||
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
870 |
!RadioButton methodsFor:'drawing'! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
871 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
872 |
drawToggleImage |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
873 |
"drawing of the radio image is done here." |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
874 |
|
3746 | 875 |
|x y img clrTop clrBot imgTop imgBot imgInside imgH imgOn threeD lvl |
4906 | 876 |
isActive isEntered isEnabled imgTopHeight graphicsDevice| |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
877 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
878 |
buttonStyle isNil ifTrue:[ |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
879 |
^ super drawToggleImage |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
880 |
]. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
881 |
|
1882 | 882 |
isActive := controller pressed. |
3746 | 883 |
isEnabled := controller enabled. |
884 |
isEnabled ifFalse:[ |
|
3857 | 885 |
img := isActive ifTrue: [disabledOnImage] ifFalse: [disabledOffImage]. |
3746 | 886 |
] ifTrue:[ |
887 |
isEntered := controller entered. |
|
888 |
isEntered ifTrue:[ |
|
3856 | 889 |
img := isActive ifTrue: [enteredOnImage] ifFalse: [enteredOffImage]. |
3746 | 890 |
] ifFalse:[ |
3856 | 891 |
img := isActive ifTrue:[onImage] ifFalse: [offImage]. |
3746 | 892 |
] |
893 |
]. |
|
894 |
||
895 |
img notNil ifTrue:[ |
|
896 |
x := hSpace + margin. |
|
897 |
y := (height - img height) // 2. |
|
898 |
self displayForm:img x:x y:y. |
|
899 |
^ self. |
|
900 |
]. |
|
1882 | 901 |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
902 |
threeD := true. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
903 |
buttonStyle == #motif ifTrue:[ |
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
904 |
"/ square rotated by 45 degrees ... |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
905 |
imgTop := self class motifCheckTopForm. |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
906 |
imgBot := self class motifCheckBotForm. |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
907 |
imgInside := self class motifCheckInnerForm. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
908 |
] ifFalse:[ |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
909 |
buttonStyle == #round3D ifTrue:[ |
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
910 |
"/ round 3D button ... |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
911 |
imgTop := self class round3DCheckTopForm. |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
912 |
imgBot := self class round3DCheckBotForm. |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
913 |
imgInside := self class round3DCheckInnerForm. |
1882 | 914 |
imgH := self class roundHalfLightForm. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
915 |
buttonOnLevel == buttonOffLevel ifTrue:[ |
1882 | 916 |
isActive ifTrue:[ |
917 |
imgOn := self class roundOnForm. |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
918 |
] |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
919 |
]. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
920 |
] ifFalse:[ |
1882 | 921 |
buttonStyle == #image ifTrue:[ |
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
922 |
"/ bitmap images ... |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
923 |
imgTop := buttonOffImage. |
1882 | 924 |
isActive ifTrue:[ |
925 |
imgOn := buttonOnImage. |
|
926 |
]. |
|
927 |
] ifFalse:[ |
|
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
928 |
"/ round 2D ... |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
929 |
imgTop := self class roundOffForm. |
1882 | 930 |
isActive ifTrue:[ |
931 |
imgOn := self class roundOnForm. |
|
932 |
]. |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
933 |
]. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
934 |
threeD := false. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
935 |
] |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
936 |
]. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
937 |
|
4291 | 938 |
imgTopHeight := 0. |
4906 | 939 |
graphicsDevice := self graphicsDevice. |
4291 | 940 |
|
4906 | 941 |
imgTop notNil ifTrue:[imgTop := imgTop onDevice:graphicsDevice. imgTopHeight := imgTop height]. |
942 |
imgBot notNil ifTrue:[imgBot := imgBot onDevice:graphicsDevice]. |
|
943 |
imgInside notNil ifTrue:[imgInside := imgInside onDevice:graphicsDevice]. |
|
944 |
imgH notNil ifTrue:[imgH := imgH onDevice:graphicsDevice]. |
|
945 |
imgOn notNil ifTrue:[imgOn := imgOn onDevice:graphicsDevice]. |
|
1882 | 946 |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
947 |
x := hSpace + margin. |
4291 | 948 |
y := (height - imgTopHeight) // 2. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
949 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
950 |
threeD ifFalse:[ |
3723
c6331b93035d
changed #drawToggleImage - take care of non-existing images
Stefan Vogel <sv@exept.de>
parents:
3694
diff
changeset
|
951 |
imgTop notNil ifTrue:[ |
c6331b93035d
changed #drawToggleImage - take care of non-existing images
Stefan Vogel <sv@exept.de>
parents:
3694
diff
changeset
|
952 |
self paint:fgColor. |
c6331b93035d
changed #drawToggleImage - take care of non-existing images
Stefan Vogel <sv@exept.de>
parents:
3694
diff
changeset
|
953 |
self displayForm:imgTop x:x y:y. |
c6331b93035d
changed #drawToggleImage - take care of non-existing images
Stefan Vogel <sv@exept.de>
parents:
3694
diff
changeset
|
954 |
]. |
c6331b93035d
changed #drawToggleImage - take care of non-existing images
Stefan Vogel <sv@exept.de>
parents:
3694
diff
changeset
|
955 |
(isActive and:[imgOn notNil]) ifTrue:[ |
1882 | 956 |
self paint:(lampColor ? activeFgColor). |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
957 |
self displayForm:imgOn x:x y:y |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
958 |
] |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
959 |
] ifTrue:[ |
1882 | 960 |
lvl := isActive ifTrue:[buttonOnLevel] |
961 |
ifFalse:[buttonOffLevel]. |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
962 |
lvl < 0 ifTrue:[ |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
963 |
clrTop := shadowColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
964 |
clrBot := lightColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
965 |
] ifFalse:[ |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
966 |
clrTop := lightColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
967 |
clrBot := shadowColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
968 |
]. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
969 |
self paint:clrTop. |
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
970 |
self displayForm:imgTop x:x y:y. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
971 |
self paint:clrBot. |
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
972 |
self displayForm:imgBot x:x y:y. |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
973 |
|
1393 | 974 |
(imgH notNil and:[halfShadowColor notNil]) ifTrue:[ |
975 |
self paint:halfShadowColor. |
|
976 |
self displayForm:imgH x:x y:y |
|
977 |
]. |
|
1954
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
978 |
|
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
979 |
imgInside notNil ifTrue:[ |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
980 |
self paint:(View defaultViewBackgroundColor). |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
981 |
self displayForm:imgInside x:x y:y |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
982 |
]. |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
983 |
(isActive and:[imgOn notNil]) ifTrue:[ |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
984 |
self paint:lampColor. |
dc1e397855dc
allow for allViewBackground to be set.
Claus Gittinger <cg@exept.de>
parents:
1892
diff
changeset
|
985 |
self displayForm:imgOn x:x y:y |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
986 |
] |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
987 |
] |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
988 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
989 |
"Created: / 3.11.1997 / 12:16:30 / cg" |
1882 | 990 |
"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
|
991 |
! |
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
992 |
|
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
993 |
drawWin95FocusFrame |
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
994 |
"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
|
995 |
|
1892 | 996 |
|x y m1| |
1696
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
997 |
|
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
998 |
x := labelOriginX. " margin + 1. " |
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
999 |
y := labelOriginY. " margin + 1. " |
1892 | 1000 |
m1 := margin + 1. |
1696
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
1001 |
self |
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
1002 |
displayDottedRectangleX:x |
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
1003 |
y:y |
1892 | 1004 |
width:(width - x - m1) |
1005 |
height:(height - y - m1). |
|
1696
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
1006 |
|
adfae835bac8
draw the focus frame around the string only
Claus Gittinger <cg@exept.de>
parents:
1629
diff
changeset
|
1007 |
"Created: / 17.9.1998 / 14:16:46 / cg" |
1892 | 1008 |
"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
|
1009 |
! ! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1010 |
|
105 | 1011 |
!RadioButton methodsFor:'initialization'! |
0 | 1012 |
|
105 | 1013 |
defaultControllerClass |
1014 |
^ RadioButtonController |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1015 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1016 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1017 |
initStyle |
3534 | 1018 |
"setup viewStyle specifics" |
1019 |
||
1882 | 1020 |
<resource: #style (#'radioButton.showLamp')> |
1021 |
||
1583
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
1022 |
buttonStyle isNil ifTrue:[ |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
1023 |
buttonStyle := DefaultButtonStyle. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
1024 |
]. |
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
1025 |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1026 |
super initStyle. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1027 |
|
4505 | 1028 |
DefaultBorderWidth notNil ifTrue:[self borderWidth: DefaultBorderWidth]. |
2583
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
1029 |
fgColor := DefaultForegroundColor ? fgColor. |
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
1030 |
bgColor := DefaultBackgroundColor ? bgColor. |
12b39e2bc41c
more stuff defined in styleSheet
Claus Gittinger <cg@exept.de>
parents:
2076
diff
changeset
|
1031 |
activeBgColor := DefaultActiveBackgroundColor ? activeBgColor. |
1814
bbeeed65ec84
do not highlight when entering (unless explicitely set)
Claus Gittinger <cg@exept.de>
parents:
1809
diff
changeset
|
1032 |
enteredBgColor := bgColor. |
bbeeed65ec84
do not highlight when entering (unless explicitely set)
Claus Gittinger <cg@exept.de>
parents:
1809
diff
changeset
|
1033 |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1034 |
buttonStyle isNil ifTrue:[ |
1882 | 1035 |
showLamp := styleSheet at:#'radioButton.showLamp' default:showLamp. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1036 |
^ self |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1037 |
]. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1038 |
|
1392 | 1039 |
adjust := #left. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1040 |
showLamp := true. |
1469 | 1041 |
lampColor := Color black. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1042 |
buttonOnLevel := DefaultActiveLevel. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1043 |
buttonOffLevel := DefaultPassiveLevel. |
1583
147916baf6dc
added #forceRadioButtonStyle - a kludge
Claus Gittinger <cg@exept.de>
parents:
1469
diff
changeset
|
1044 |
onLevel := offLevel := 0. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1045 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1046 |
self level:0. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1047 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1048 |
(buttonStyle == #motif |
1882 | 1049 |
or:[buttonStyle == #round3D |
1050 |
or:[buttonStyle == #image]]) ifTrue:[ |
|
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1051 |
activeBgColor := bgColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1052 |
activeFgColor := fgColor. |
5125 | 1053 |
|
1882 | 1054 |
buttonStyle == #image ifTrue:[ |
4906 | 1055 |
|graphicsDevice| |
1056 |
||
5125 | 1057 |
self isNativeWidget ifFalse:[ |
1058 |
graphicsDevice := self graphicsDevice. |
|
1059 |
buttonOnImage := self class roundOnForm. |
|
1060 |
buttonOnImage notNil ifTrue:[ buttonOnImage := buttonOnImage onDevice:graphicsDevice]. |
|
1061 |
buttonOffImage := self class roundOffForm. |
|
1062 |
buttonOffImage notNil ifTrue:[ buttonOffImage := buttonOffImage onDevice:graphicsDevice]. |
|
3746 | 1063 |
|
5125 | 1064 |
onImage := self class activeForm. |
1065 |
onImage notNil ifTrue:[ onImage := onImage onDevice:graphicsDevice]. |
|
1066 |
offImage := self class passiveForm. |
|
1067 |
offImage notNil ifTrue:[ offImage := offImage onDevice:graphicsDevice]. |
|
1068 |
disabledOnImage := self class disabledActiveForm. |
|
1069 |
disabledOnImage notNil ifTrue:[ disabledOnImage := disabledOnImage onDevice:graphicsDevice]. |
|
1070 |
disabledOffImage := self class disabledPassiveForm. |
|
1071 |
disabledOffImage notNil ifTrue:[ disabledOffImage := disabledOffImage onDevice:graphicsDevice]. |
|
1072 |
enteredOnImage := self class enteredActiveForm. |
|
1073 |
enteredOnImage notNil ifTrue:[ enteredOnImage := enteredOnImage onDevice:graphicsDevice]. |
|
1074 |
enteredOffImage := self class enteredPassiveForm. |
|
1075 |
enteredOffImage notNil ifTrue:[ enteredOffImage := enteredOffImage onDevice:graphicsDevice]. |
|
1076 |
] |
|
1882 | 1077 |
] |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1078 |
] ifFalse:[ |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1079 |
buttonStyle == #round2D ifTrue:[ |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1080 |
activeFgColor := fgColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1081 |
activeBgColor := bgColor. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1082 |
] |
3746 | 1083 |
]. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1084 |
|
4167 | 1085 |
"Modified: / 25-08-2010 / 22:57:37 / cg" |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1086 |
! ! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1087 |
|
5125 | 1088 |
!RadioButton methodsFor:'native widget support'! |
1089 |
||
1090 |
nativeWindowType |
|
1091 |
"return a symbol describing my native window type |
|
1092 |
(may be used internally by the device as a native window creation hint)" |
|
1093 |
||
1094 |
self class == RadioButton ifTrue:[ |
|
1095 |
^ #RadioButton |
|
1096 |
]. |
|
1097 |
^ nil |
|
1098 |
! ! |
|
1099 |
||
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1100 |
!RadioButton methodsFor:'private'! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1101 |
|
1392 | 1102 |
computeLabelOrigin |
1103 |
super computeLabelOrigin. |
|
1469 | 1104 |
buttonStyle notNil ifTrue:[ |
1105 |
labelOriginX := hSpace + 15 + hSpace |
|
1392 | 1106 |
] |
1107 |
||
1108 |
"Modified: / 3.11.1997 / 18:17:58 / cg" |
|
1109 |
! |
|
1110 |
||
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1111 |
lampImageHeight |
1391 | 1112 |
buttonStyle isNil ifTrue:[^ super lampImageHeight]. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1113 |
^ 15 |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1114 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1115 |
"Created: / 3.11.1997 / 14:27:27 / cg" |
1391 | 1116 |
"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
|
1117 |
! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1118 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1119 |
lampImageWidth |
1391 | 1120 |
buttonStyle isNil ifTrue:[^ super lampImageWidth]. |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1121 |
^ 15 |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1122 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1123 |
"Created: / 3.11.1997 / 14:27:23 / cg" |
1391 | 1124 |
"Modified: / 3.11.1997 / 18:10:50 / cg" |
3997
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1125 |
! |
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1126 |
|
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1127 |
rawLabelSizeOf:aLogo |
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1128 |
"compute the extent needed to hold the label plus the lamp" |
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1129 |
|
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1130 |
|ext| |
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1131 |
|
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1132 |
ext := super rawLabelSizeOf:aLogo. |
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1133 |
buttonStyle notNil ifTrue:[ |
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1134 |
^ ext + (15 @ 0) |
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1135 |
]. |
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1136 |
^ ext |
1384
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1137 |
! ! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1138 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1139 |
!RadioButton methodsFor:'queries'! |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1140 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1141 |
is3D |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1142 |
buttonStyle == #round2D ifTrue:[^ false.]. |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1143 |
^ super is3D |
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1144 |
|
e4acb2c5b10b
more styles (motif, round3D and round2D)
Claus Gittinger <cg@exept.de>
parents:
1087
diff
changeset
|
1145 |
"Created: / 3.11.1997 / 14:39:36 / cg" |
0 | 1146 |
! ! |
1147 |
||
205 | 1148 |
!RadioButton class methodsFor:'documentation'! |
1149 |
||
1150 |
version |
|
5127
fcd696f9f401
Access device and drawableId via message sends
Stefan Vogel <sv@exept.de>
parents:
5125
diff
changeset
|
1151 |
^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.56 2014-08-18 18:28:19 stefan Exp $' |
3997
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1152 |
! |
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1153 |
|
319d830f9fe2
computeLabelSize refactorings
Claus Gittinger <cg@exept.de>
parents:
3857
diff
changeset
|
1154 |
version_CVS |
5127
fcd696f9f401
Access device and drawableId via message sends
Stefan Vogel <sv@exept.de>
parents:
5125
diff
changeset
|
1155 |
^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.56 2014-08-18 18:28:19 stefan Exp $' |
205 | 1156 |
! ! |
4505 | 1157 |