author | tz |
Mon, 09 Mar 1998 22:21:33 +0100 | |
changeset 817 | f6d08ea5b82b |
parent 757 | e12757d01575 |
child 820 | 0f0b4a82bdc5 |
permissions | -rw-r--r-- |
44 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
49 | 3 |
All Rights Reserved |
44 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
14 |
HorizontalPanelView subclass:#CheckBox |
|
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
15 |
instanceVariableNames:'toggleView labelView labelForegroundColor |
817 | 16 |
disabledLabelForegroundColor foregroundChannel backgroundChannel' |
320
bf5e928d027a
option to place the toggle at the right.
Claus Gittinger <cg@exept.de>
parents:
318
diff
changeset
|
17 |
classVariableNames:'DefaultLabelForegroundColor DefaultDisabledLabelForegroundColor |
bf5e928d027a
option to place the toggle at the right.
Claus Gittinger <cg@exept.de>
parents:
318
diff
changeset
|
18 |
CheckToggleLeft' |
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
19 |
poolDictionaries:'' |
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
20 |
category:'Views-Interactors' |
44 | 21 |
! |
22 |
||
273
01541272ce8d
resource spec updated; cache device form
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
23 |
!CheckBox class methodsFor:'documentation'! |
44 | 24 |
|
100 | 25 |
copyright |
26 |
" |
|
27 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
||
44 | 38 |
! |
39 |
||
40 |
documentation |
|
41 |
" |
|
313 | 42 |
CheckBoxes consist of a checkToggle and a label; |
43 |
if used without a model, its action block is evaluated |
|
44 |
when toggled (see Toggle for more information). |
|
45 |
Otherwise, a valueHolder on a boolean is the preferred model |
|
46 |
(other models are possible - this may required different aspect |
|
47 |
and/or changeMessage settings; make certain to set those before |
|
48 |
a model is assigned, since the toggle fetches the value when |
|
49 |
a new model is assigned.) |
|
155 | 50 |
|
51 |
[author:] |
|
313 | 52 |
Claus Gittinger |
155 | 53 |
|
54 |
[see also:] |
|
313 | 55 |
Button CheckToggle |
56 |
DialogBox |
|
57 |
ValueHolder |
|
44 | 58 |
" |
59 |
! |
|
60 |
||
61 |
examples |
|
62 |
" |
|
188 | 63 |
no-op checkBox without a label: |
313 | 64 |
[exBegin] |
188 | 65 |
|b| |
66 |
||
67 |
b := CheckBox new. |
|
68 |
b open |
|
313 | 69 |
[exEnd] |
188 | 70 |
|
71 |
||
44 | 72 |
no-op checkBox: |
313 | 73 |
[exBegin] |
44 | 74 |
|b| |
75 |
||
76 |
b := CheckBox new. |
|
77 |
b label:'foo'. |
|
78 |
b open |
|
313 | 79 |
[exEnd] |
80 |
||
81 |
||
82 |
combined instance creation & label setup: |
|
83 |
[exBegin] |
|
84 |
|b| |
|
85 |
||
86 |
b := CheckBox label:'foo'. |
|
87 |
b open |
|
88 |
[exEnd] |
|
44 | 89 |
|
90 |
||
56 | 91 |
no-op checkBox, disabled: |
313 | 92 |
[exBegin] |
56 | 93 |
|b| |
94 |
||
313 | 95 |
b := CheckBox label:'foo'. |
56 | 96 |
b disable. |
97 |
b open |
|
313 | 98 |
[exEnd] |
56 | 99 |
|
100 |
||
101 |
changing colors |
|
102 |
(a demo only: it is no good style to fight the styleSheet): |
|
313 | 103 |
[exBegin] |
44 | 104 |
|panel b| |
105 |
||
106 |
panel := VerticalPanelView new. |
|
107 |
||
313 | 108 |
b := CheckBox label:'foo' in:panel. |
44 | 109 |
|
313 | 110 |
b := CheckBox label:'bar' in:panel. |
44 | 111 |
b labelView foregroundColor:Color red. |
112 |
||
313 | 113 |
b := CheckBox label:'baz' in:panel. |
44 | 114 |
b toggleView activeForegroundColor:Color blue. |
115 |
||
116 |
panel open |
|
313 | 117 |
[exEnd] |
44 | 118 |
|
119 |
||
120 |
using action-blocks: |
|
313 | 121 |
[exBegin] |
49 | 122 |
|b| |
44 | 123 |
|
313 | 124 |
b := CheckBox label:'check'. |
184 | 125 |
b action:[:value | Transcript show:'set to: '; showCR:value]. |
44 | 126 |
b open. |
313 | 127 |
[exEnd] |
44 | 128 |
|
129 |
||
49 | 130 |
with a model (default ST-80 behavior, sending #value: to the model): |
131 |
(see changing value in the inspector) |
|
313 | 132 |
[exBegin] |
133 |
|b model| |
|
134 |
||
135 |
model := ValueHolder newBoolean. |
|
136 |
||
137 |
b := CheckBox label:'check'. |
|
138 |
b model:model. |
|
139 |
b open. |
|
140 |
model inspect. |
|
141 |
[exEnd] |
|
142 |
||
143 |
||
144 |
combined instance creation & model setup: |
|
145 |
[exBegin] |
|
49 | 146 |
|b model| |
147 |
||
148 |
model := ValueHolder newBoolean. |
|
149 |
||
313 | 150 |
b := CheckBox label:'check' model:model . |
49 | 151 |
b open. |
152 |
model inspect. |
|
313 | 153 |
[exEnd] |
49 | 154 |
|
56 | 155 |
|
313 | 156 |
with a model and different aspect & changeSelector |
157 |
setting the aspect to nil suppresses fetching the value from the model. |
|
49 | 158 |
(using a plug here, for demonstration only): |
313 | 159 |
[exBegin] |
44 | 160 |
|b model| |
161 |
||
162 |
model := Plug new. |
|
184 | 163 |
model respondTo:#changeCheck: with:[:arg | Transcript showCR:'change to ' , arg printString]. |
313 | 164 |
model respondTo:#value with:[false]. |
44 | 165 |
|
313 | 166 |
b := CheckBox label:'check'. |
167 |
b aspectMessage:nil; model:model; changeMessage:#changeCheck:. |
|
44 | 168 |
b open. |
313 | 169 |
[exEnd] |
44 | 170 |
|
56 | 171 |
|
313 | 172 |
with an enableChannel |
173 |
[exBegin] |
|
115
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
174 |
|b enaToggle enaHolder| |
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
175 |
|
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
176 |
enaHolder := true asValue. |
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
177 |
|
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
178 |
enaToggle := Toggle label:'enable'. |
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
179 |
enaToggle model:enaHolder. |
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
180 |
enaToggle open. |
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
181 |
|
313 | 182 |
b := CheckBox label:'check'. |
184 | 183 |
b action:[:value | Transcript show:'set to: '; showCR:value]. |
115
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
184 |
b enableChannel:enaHolder. |
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
185 |
b open. |
313 | 186 |
[exEnd] |
115
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
187 |
|
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
188 |
|
56 | 189 |
with models, one checkBox disabling the others: |
313 | 190 |
[exBegin] |
56 | 191 |
|dialog translator enableChannel val1 val2 val3 eBox box1 box2 box3| |
192 |
||
193 |
translator := Plug new. |
|
194 |
translator respondTo:#enableDisable |
|
313 | 195 |
with:[ |
196 |
enableChannel value |
|
197 |
ifTrue:[ |
|
198 |
box1 enable. |
|
199 |
box2 enable. |
|
200 |
box3 enable. |
|
201 |
] |
|
202 |
ifFalse:[ |
|
203 |
box1 disable. |
|
204 |
box2 disable. |
|
205 |
box3 disable. |
|
206 |
] |
|
207 |
]. |
|
56 | 208 |
|
209 |
enableChannel := true asValue. |
|
210 |
enableChannel onChangeSend:#enableDisable to:translator. |
|
211 |
val1 := true asValue. |
|
212 |
val2 := false asValue. |
|
213 |
val3 := true asValue. |
|
214 |
||
215 |
dialog := Dialog new. |
|
216 |
dialog addCheckBox:'enable' on:enableChannel. |
|
217 |
dialog addVerticalSpace. |
|
218 |
dialog leftIndent:30. |
|
219 |
box1 := dialog addCheckBox:'value1' on:val1. |
|
220 |
dialog addVerticalSpace. |
|
221 |
box2 := dialog addCheckBox:'value2' on:val2. |
|
222 |
dialog addVerticalSpace. |
|
223 |
box3 := dialog addCheckBox:'value3' on:val3. |
|
224 |
dialog addVerticalSpace. |
|
225 |
dialog addOkButton. |
|
226 |
||
227 |
dialog open. |
|
313 | 228 |
[exEnd] |
56 | 229 |
|
230 |
||
49 | 231 |
multiple checkBoxes on a single model (using different aspects) |
313 | 232 |
[exBegin] |
79 | 233 |
|top panel b model value1 value2| |
49 | 234 |
|
235 |
value1 := true. |
|
236 |
value2 := false. |
|
237 |
model := Plug new. |
|
238 |
model respondTo:#value1 with:[value1]. |
|
239 |
model respondTo:#value1: with:[:val | value1 := val]. |
|
240 |
model respondTo:#value2 with:[value2]. |
|
241 |
model respondTo:#value2: with:[:val | value2 := val]. |
|
242 |
||
243 |
top := DialogBox new. |
|
244 |
top extent:200@300. |
|
245 |
||
246 |
panel := VerticalPanelView new. |
|
247 |
||
248 |
b := CheckBox in:panel. |
|
249 |
b label:'check1'. |
|
313 | 250 |
b aspect:#value1; model:model; changeMessage:#value1:. |
49 | 251 |
|
252 |
b := CheckBox in:panel. |
|
253 |
b label:'check2'. |
|
313 | 254 |
b aspect:#value2; model:model; changeMessage:#value2:. |
49 | 255 |
|
256 |
top addComponent:panel. |
|
257 |
top addAbortButton; addOkButton. |
|
258 |
top openModal. |
|
259 |
||
79 | 260 |
top accepted ifTrue:[ |
313 | 261 |
Transcript show:'value1: '; showCR:model value1. |
262 |
Transcript show:'value2: '; showCR:model value2. |
|
49 | 263 |
] |
313 | 264 |
[exEnd] |
44 | 265 |
" |
266 |
! ! |
|
267 |
||
273
01541272ce8d
resource spec updated; cache device form
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
268 |
!CheckBox class methodsFor:'instance creation'! |
62 | 269 |
|
76 | 270 |
label:aStringOrImage model:aModel |
271 |
"create & return a new checkBox, on aModel (typically a ValueHolder), |
|
272 |
with aStringOrImage as label." |
|
273 |
||
313 | 274 |
^ (self model:aModel) label:aStringOrImage |
76 | 275 |
|
276 |
"Created: 17.9.1995 / 14:20:58 / claus" |
|
313 | 277 |
"Modified: 28.2.1997 / 19:23:59 / cg" |
56 | 278 |
! ! |
279 |
||
273
01541272ce8d
resource spec updated; cache device form
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
280 |
!CheckBox class methodsFor:'defaults'! |
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
281 |
|
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
282 |
updateStyleCache |
134
049f033265f9
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
119
diff
changeset
|
283 |
"extract values from the styleSheet and cache them in class variables" |
049f033265f9
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
119
diff
changeset
|
284 |
|
566 | 285 |
<resource: #style (#'checkBox.labelForegroundColor' |
286 |
#'checkBox.disabledLabelForegroundColor' |
|
287 |
#'checkBox.toggleLeft')> |
|
134
049f033265f9
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
119
diff
changeset
|
288 |
|
566 | 289 |
DefaultLabelForegroundColor := StyleSheet colorAt:'checkBox.labelForegroundColor'. |
290 |
DefaultDisabledLabelForegroundColor := StyleSheet colorAt:'checkBox.disabledLabelForegroundColor'. |
|
291 |
CheckToggleLeft := StyleSheet at:'checkBox.toggleLeft' default:true |
|
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
292 |
|
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
293 |
" |
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
294 |
self updateStyleCache |
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
295 |
" |
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
296 |
|
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
297 |
"Created: 14.12.1995 / 14:47:22 / cg" |
566 | 298 |
"Modified: 20.10.1997 / 13:51:30 / cg" |
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
299 |
! ! |
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
300 |
|
100 | 301 |
!CheckBox methodsFor:'accessing-behavior'! |
302 |
||
303 |
action:aBlock |
|
155 | 304 |
"set the actionBlock; forwarded to the toggle" |
100 | 305 |
|
306 |
toggleView action:aBlock |
|
155 | 307 |
|
308 |
"Modified: 25.4.1996 / 16:31:19 / cg" |
|
100 | 309 |
! |
310 |
||
311 |
disable |
|
155 | 312 |
"disable the checkBox; forwarded to toggle & change labels color" |
100 | 313 |
|
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
314 |
|clr| |
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
315 |
|
100 | 316 |
toggleView disable. |
817 | 317 |
|
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
318 |
clr := disabledLabelForegroundColor. |
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
319 |
clr isNil ifTrue:[ clr := toggleView disabledForegroundColor ]. |
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
320 |
labelView foregroundColor:clr. |
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
321 |
|
155 | 322 |
"Modified: 25.4.1996 / 16:31:31 / cg" |
100 | 323 |
! |
324 |
||
325 |
enable |
|
155 | 326 |
"enable the checkBox; forwarded to toggle & change labels color" |
100 | 327 |
|
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
328 |
|clr| |
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
329 |
|
100 | 330 |
toggleView enable. |
817 | 331 |
|
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
332 |
clr := labelForegroundColor. |
817 | 333 |
clr isNil ifTrue:[ clr := labelView foregroundColor ]. |
334 |
labelView foregroundColor:clr. |
|
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
335 |
|
155 | 336 |
"Modified: 25.4.1996 / 16:31:40 / cg" |
100 | 337 |
! |
78 | 338 |
|
299 | 339 |
enabled |
340 |
"return true, if the checkBox is enabled. |
|
341 |
forwarded to toggle" |
|
342 |
||
343 |
^ toggleView enabled. |
|
344 |
! |
|
345 |
||
100 | 346 |
pressAction:aBlock |
155 | 347 |
"set the pressAction; forwarded to the toggle" |
348 |
||
100 | 349 |
toggleView pressAction:aBlock. |
350 |
||
351 |
"Created: 22.9.1995 / 15:54:04 / claus" |
|
155 | 352 |
"Modified: 25.4.1996 / 16:31:52 / cg" |
100 | 353 |
! |
354 |
||
355 |
releaseAction:aBlock |
|
155 | 356 |
"set the releaseAction; forwarded to the toggle" |
357 |
||
100 | 358 |
toggleView releaseAction:aBlock. |
359 |
||
360 |
"Created: 22.9.1995 / 15:54:11 / claus" |
|
155 | 361 |
"Modified: 25.4.1996 / 16:32:00 / cg" |
78 | 362 |
! ! |
363 |
||
115
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
364 |
!CheckBox methodsFor:'accessing-channels'! |
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
365 |
|
817 | 366 |
backgroundChannel |
367 |
||
368 |
^labelView backgroundChannel |
|
369 |
! |
|
370 |
||
371 |
backgroundChannel:aChannel |
|
372 |
||
373 |
labelView backgroundChannel: (backgroundChannel := aChannel). |
|
374 |
aChannel onChangeSend:#value to: [self enableStateChanged] |
|
375 |
! |
|
376 |
||
164 | 377 |
enableChannel |
378 |
"return a valueHolder for enable/disable" |
|
379 |
||
380 |
^ toggleView enableChannel |
|
381 |
||
382 |
"Created: 30.4.1996 / 15:11:13 / cg" |
|
383 |
! |
|
384 |
||
115
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
385 |
enableChannel:aChannel |
155 | 386 |
"set the enableChannel" |
387 |
||
119
913df6ba1ccc
immediately change fg color when enableChannel is set
Claus Gittinger <cg@exept.de>
parents:
115
diff
changeset
|
388 |
|wasEnabled| |
913df6ba1ccc
immediately change fg color when enableChannel is set
Claus Gittinger <cg@exept.de>
parents:
115
diff
changeset
|
389 |
|
913df6ba1ccc
immediately change fg color when enableChannel is set
Claus Gittinger <cg@exept.de>
parents:
115
diff
changeset
|
390 |
wasEnabled := toggleView enabled. |
115
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
391 |
toggleView enableChannel:aChannel. |
817 | 392 |
aChannel onChangeSend:#value to: [self enableStateChanged]. |
393 |
||
119
913df6ba1ccc
immediately change fg color when enableChannel is set
Claus Gittinger <cg@exept.de>
parents:
115
diff
changeset
|
394 |
aChannel value ~~ wasEnabled ifTrue:[ |
817 | 395 |
self enableStateChanged |
119
913df6ba1ccc
immediately change fg color when enableChannel is set
Claus Gittinger <cg@exept.de>
parents:
115
diff
changeset
|
396 |
] |
817 | 397 |
! |
115
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
398 |
|
817 | 399 |
foregroundChannel |
400 |
||
401 |
^labelView foregroundChannel |
|
402 |
! |
|
403 |
||
404 |
foregroundChannel:aChannel |
|
405 |
||
406 |
labelView foregroundChannel: (foregroundChannel := aChannel). |
|
407 |
aChannel onChangeSend:#value to: [self enableStateChanged] |
|
408 |
||
409 |
! |
|
410 |
||
411 |
labelChannel |
|
412 |
||
413 |
^labelView labelChannel |
|
414 |
! |
|
415 |
||
416 |
labelChannel:aChannel |
|
417 |
||
418 |
labelView labelChannel: aChannel |
|
419 |
||
420 |
! ! |
|
421 |
||
422 |
!CheckBox methodsFor:'accessing-colors'! |
|
423 |
||
424 |
backgroundColor: backgroundColor |
|
425 |
"set backgroundColor only for the label" |
|
426 |
||
427 |
labelView backgroundColor: backgroundColor |
|
428 |
! |
|
429 |
||
430 |
foregroundColor: foregroundColor |
|
431 |
"set foregroundColor only for the label" |
|
432 |
||
433 |
labelView foregroundColor: (labelForegroundColor := foregroundColor). |
|
434 |
foregroundChannel notNil ifTrue: [foregroundChannel value: foregroundColor] |
|
435 |
! ! |
|
436 |
||
437 |
!CheckBox methodsFor:'accessing-components'! |
|
438 |
||
439 |
labelView |
|
440 |
"return the labelView; allows manipulation of the |
|
441 |
labels attributes (colors etc.)" |
|
442 |
||
443 |
^ labelView |
|
444 |
! |
|
445 |
||
446 |
toggleView |
|
447 |
"return the toggleView; allows manipulation of the |
|
448 |
toggles attributes (colors etc.)" |
|
449 |
||
450 |
^ toggleView |
|
115
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
451 |
! ! |
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
452 |
|
56 | 453 |
!CheckBox methodsFor:'accessing-look'! |
44 | 454 |
|
100 | 455 |
activeLogo:anImageOrString |
155 | 456 |
"set the activeLogo; forwarded to the toggle" |
457 |
||
100 | 458 |
toggleView activeLogo:anImageOrString |
56 | 459 |
|
100 | 460 |
"Created: 22.9.1995 / 15:44:08 / claus" |
155 | 461 |
"Modified: 25.4.1996 / 16:32:50 / cg" |
100 | 462 |
! |
463 |
||
114 | 464 |
disabledLabelForegroundColor |
185 | 465 |
"set the disabledLabelForegroundColor; forwarded to the toggle" |
466 |
||
114 | 467 |
disabledLabelForegroundColor isNil ifTrue:[ ^ toggleView disabledForegroundColor ]. |
468 |
^ disabledLabelForegroundColor |
|
469 |
||
470 |
"Created: 16.12.1995 / 19:47:45 / cg" |
|
185 | 471 |
"Modified: 22.5.1996 / 13:16:55 / cg" |
114 | 472 |
! |
473 |
||
100 | 474 |
font |
185 | 475 |
"return the font. Forward from label" |
100 | 476 |
|
477 |
^ labelView font |
|
185 | 478 |
|
479 |
"Modified: 22.5.1996 / 13:17:07 / cg" |
|
49 | 480 |
! |
44 | 481 |
|
56 | 482 |
font:aFont |
185 | 483 |
"set the font. Forward to the label & resize myself. |
484 |
CAVEAT: with the addition of Text objects, |
|
268 | 485 |
this method is going to be obsoleted by a textStyle |
486 |
method, which allows specific control over |
|
487 |
normalFont/boldFont/italicFont parameters." |
|
55 | 488 |
|
56 | 489 |
labelView font:aFont. |
490 |
labelView forceResize. |
|
79 | 491 |
self layoutChanged. |
492 |
self resize. |
|
185 | 493 |
|
494 |
"Modified: 22.5.1996 / 13:17:28 / cg" |
|
49 | 495 |
! |
496 |
||
56 | 497 |
label |
155 | 498 |
"return the labels logo" |
56 | 499 |
|
500 |
^ labelView label |
|
155 | 501 |
|
502 |
"Modified: 25.4.1996 / 16:33:08 / cg" |
|
79 | 503 |
! |
504 |
||
100 | 505 |
label:aString |
155 | 506 |
"set the logo; forward to label & resize" |
79 | 507 |
|
100 | 508 |
labelView label:aString. |
509 |
labelView forceResize. |
|
510 |
self layoutChanged. |
|
511 |
self resize. |
|
155 | 512 |
|
513 |
"Modified: 25.4.1996 / 16:33:14 / cg" |
|
79 | 514 |
! |
515 |
||
114 | 516 |
labelForegroundColor |
155 | 517 |
"return the labels foregroundColor" |
518 |
||
817 | 519 |
labelForegroundColor isNil ifTrue:[ ^ labelView foregroundColor ]. |
114 | 520 |
^ labelForegroundColor |
521 |
||
522 |
"Created: 16.12.1995 / 19:47:20 / cg" |
|
155 | 523 |
"Modified: 25.4.1996 / 16:33:26 / cg" |
114 | 524 |
! |
525 |
||
79 | 526 |
passiveLogo:anImageOrString |
155 | 527 |
"set the passiveLogo; forwarded to the toggle" |
528 |
||
79 | 529 |
toggleView passiveLogo:anImageOrString |
530 |
||
531 |
"Created: 22.9.1995 / 15:44:14 / claus" |
|
155 | 532 |
"Modified: 25.4.1996 / 16:33:41 / cg" |
579
ba6e90f651d8
pass down background changes to my components
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
533 |
! |
ba6e90f651d8
pass down background changes to my components
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
534 |
|
ba6e90f651d8
pass down background changes to my components
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
535 |
viewBackground:aColor |
817 | 536 |
"super viewBackground:aColor." |
579
ba6e90f651d8
pass down background changes to my components
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
537 |
labelView viewBackground:aColor |
ba6e90f651d8
pass down background changes to my components
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
538 |
|
ba6e90f651d8
pass down background changes to my components
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
539 |
"Created: / 26.10.1997 / 22:15:10 / cg" |
ba6e90f651d8
pass down background changes to my components
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
540 |
"Modified: / 26.10.1997 / 22:15:24 / cg" |
56 | 541 |
! ! |
542 |
||
100 | 543 |
!CheckBox methodsFor:'accessing-mvc'! |
63 | 544 |
|
100 | 545 |
aspectMessage:aspectSymbol |
155 | 546 |
"set the aspectMessage; forward to label & toggle" |
100 | 547 |
|
313 | 548 |
labelView aspectMessage:aspectSymbol. "/ in case the label updates its logo from the model |
100 | 549 |
toggleView aspectMessage:aspectSymbol |
155 | 550 |
|
313 | 551 |
"Modified: 28.2.1997 / 19:50:53 / cg" |
100 | 552 |
! |
63 | 553 |
|
100 | 554 |
changeMessage:aChangeSelector |
155 | 555 |
"set the changeMessage; forward to toggle" |
100 | 556 |
|
557 |
toggleView changeMessage:aChangeSelector |
|
155 | 558 |
|
559 |
"Modified: 25.4.1996 / 16:33:55 / cg" |
|
100 | 560 |
! |
561 |
||
562 |
model:aModel |
|
155 | 563 |
"set the model; forward to label & toggle" |
100 | 564 |
|
565 |
labelView model:aModel. |
|
566 |
toggleView model:aModel |
|
155 | 567 |
|
568 |
"Modified: 25.4.1996 / 16:34:00 / cg" |
|
63 | 569 |
! ! |
570 |
||
100 | 571 |
!CheckBox methodsFor:'accessing-state'! |
55 | 572 |
|
100 | 573 |
isOn |
155 | 574 |
"return true, if the check is on; false otherwise" |
575 |
||
100 | 576 |
^ toggleView isOn |
155 | 577 |
|
578 |
"Modified: 25.4.1996 / 16:34:15 / cg" |
|
159 | 579 |
! |
580 |
||
581 |
turnOff |
|
582 |
"turn the check off; forwarded to the toggle" |
|
583 |
||
584 |
toggleView turnOff |
|
585 |
||
586 |
"Modified: 25.4.1996 / 16:32:14 / cg" |
|
587 |
! |
|
588 |
||
589 |
turnOn |
|
590 |
"turn the check on; forwarded to the toggle" |
|
591 |
||
592 |
toggleView turnOn |
|
593 |
||
594 |
"Modified: 25.4.1996 / 16:32:21 / cg" |
|
44 | 595 |
! ! |
596 |
||
115
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
597 |
!CheckBox methodsFor:'change & update'! |
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
598 |
|
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
599 |
enableStateChanged |
318 | 600 |
"handle changes on the enableChannel, change labels color." |
155 | 601 |
|
119
913df6ba1ccc
immediately change fg color when enableChannel is set
Claus Gittinger <cg@exept.de>
parents:
115
diff
changeset
|
602 |
|clr| |
913df6ba1ccc
immediately change fg color when enableChannel is set
Claus Gittinger <cg@exept.de>
parents:
115
diff
changeset
|
603 |
|
817 | 604 |
self enabled |
605 |
ifTrue: |
|
606 |
[ |
|
607 |
labelView foregroundChannel: foregroundChannel. |
|
608 |
labelForegroundColor := labelView foregroundColor |
|
609 |
] |
|
610 |
ifFalse: |
|
611 |
[ |
|
612 |
labelView foregroundChannel: nil |
|
613 |
]. |
|
614 |
||
115
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
615 |
toggleView enabled ifTrue:[ |
817 | 616 |
clr := self labelForegroundColor. |
115
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
617 |
] ifFalse:[ |
318 | 618 |
clr := self disabledLabelForegroundColor |
817 | 619 |
]. |
620 |
labelView foregroundColor:clr. |
|
115
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
621 |
|
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
622 |
! ! |
0147e9d06caa
added support for enableChannel
Claus Gittinger <cg@exept.de>
parents:
114
diff
changeset
|
623 |
|
209
448124e85ccd
keyboard delegation made explicit, for space only
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
624 |
!CheckBox methodsFor:'event handling'! |
448124e85ccd
keyboard delegation made explicit, for space only
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
625 |
|
341 | 626 |
invalidate |
484 | 627 |
super invalidate. |
341 | 628 |
toggleView invalidate. |
629 |
labelView invalidate |
|
630 |
||
631 |
"Created: 1.4.1997 / 13:22:09 / cg" |
|
484 | 632 |
"Modified: 6.8.1997 / 18:20:12 / cg" |
341 | 633 |
! |
634 |
||
209
448124e85ccd
keyboard delegation made explicit, for space only
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
635 |
keyPress:aKey x:x y:y |
448124e85ccd
keyboard delegation made explicit, for space only
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
636 |
aKey == Character space ifTrue:[ |
268 | 637 |
self hasFocus ifTrue:[ |
638 |
^ toggleView toggle |
|
639 |
] |
|
209
448124e85ccd
keyboard delegation made explicit, for space only
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
640 |
]. |
448124e85ccd
keyboard delegation made explicit, for space only
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
641 |
super keyPress:aKey x:x y:y |
448124e85ccd
keyboard delegation made explicit, for space only
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
642 |
|
448124e85ccd
keyboard delegation made explicit, for space only
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
643 |
"Created: 10.7.1996 / 11:24:16 / cg" |
448124e85ccd
keyboard delegation made explicit, for space only
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
644 |
"Modified: 10.7.1996 / 11:54:52 / cg" |
448124e85ccd
keyboard delegation made explicit, for space only
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
645 |
! ! |
448124e85ccd
keyboard delegation made explicit, for space only
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
646 |
|
44 | 647 |
!CheckBox methodsFor:'initialization'! |
648 |
||
218
9b155a06f6e6
handle input to my label (allow clicking on it)
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
649 |
defaultControllerClass |
9b155a06f6e6
handle input to my label (allow clicking on it)
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
650 |
^ ToggleController |
9b155a06f6e6
handle input to my label (allow clicking on it)
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
651 |
|
9b155a06f6e6
handle input to my label (allow clicking on it)
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
652 |
"Created: 18.7.1996 / 11:57:01 / cg" |
9b155a06f6e6
handle input to my label (allow clicking on it)
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
653 |
! |
9b155a06f6e6
handle input to my label (allow clicking on it)
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
654 |
|
757 | 655 |
destroy |
656 |
"release dependencies" |
|
657 |
||
658 |
|channel| |
|
659 |
||
660 |
toggleView notNil ifTrue:[ |
|
661 |
(channel := toggleView enableChannel) notNil ifTrue:[ |
|
662 |
channel retractInterestsFor:self |
|
663 |
] |
|
664 |
]. |
|
665 |
super destroy |
|
666 |
||
667 |
! |
|
668 |
||
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
669 |
initStyle |
284 | 670 |
"setup viewStyle specifics" |
671 |
||
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
672 |
super initStyle. |
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
673 |
|
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
674 |
DefaultLabelForegroundColor notNil ifTrue:[ |
284 | 675 |
labelForegroundColor := DefaultLabelForegroundColor on:device. |
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
676 |
]. |
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
677 |
DefaultDisabledLabelForegroundColor notNil ifTrue:[ |
284 | 678 |
disabledLabelForegroundColor := DefaultDisabledLabelForegroundColor on:device. |
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
679 |
]. |
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
680 |
|
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
681 |
"Created: 14.12.1995 / 14:50:03 / cg" |
284 | 682 |
"Modified: 22.1.1997 / 11:57:03 / cg" |
817 | 683 |
|
112
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
684 |
! |
bb2cb6c553d2
allow labels colors to be set from styleSheet
Claus Gittinger <cg@exept.de>
parents:
100
diff
changeset
|
685 |
|
44 | 686 |
initialize |
273
01541272ce8d
resource spec updated; cache device form
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
687 |
<resource: #style (#name)> |
01541272ce8d
resource spec updated; cache device form
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
688 |
|
56 | 689 |
super initialize. |
44 | 690 |
|
56 | 691 |
borderWidth := 0. |
44 | 692 |
|
49 | 693 |
hLayout := #fixLeftSpace. |
44 | 694 |
vLayout := #center. |
695 |
||
320
bf5e928d027a
option to place the toggle at the right.
Claus Gittinger <cg@exept.de>
parents:
318
diff
changeset
|
696 |
CheckToggleLeft ~~ false ifTrue:[ |
bf5e928d027a
option to place the toggle at the right.
Claus Gittinger <cg@exept.de>
parents:
318
diff
changeset
|
697 |
"/ toggle first ... |
bf5e928d027a
option to place the toggle at the right.
Claus Gittinger <cg@exept.de>
parents:
318
diff
changeset
|
698 |
toggleView := CheckToggle in:self. |
bf5e928d027a
option to place the toggle at the right.
Claus Gittinger <cg@exept.de>
parents:
318
diff
changeset
|
699 |
]. |
44 | 700 |
|
701 |
labelView := Label in:self. |
|
282 | 702 |
"/ a kludge |
188 | 703 |
styleSheet name ~~ #motif ifTrue:[ |
273
01541272ce8d
resource spec updated; cache device form
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
704 |
labelView label:'check'; borderWidth:0. |
188 | 705 |
]. |
44 | 706 |
labelView forceResize. |
707 |
labelView adjust:#left. |
|
246 | 708 |
self initialHeight:labelView preferredExtent y + ViewSpacing. |
55 | 709 |
|
320
bf5e928d027a
option to place the toggle at the right.
Claus Gittinger <cg@exept.de>
parents:
318
diff
changeset
|
710 |
CheckToggleLeft == false ifTrue:[ |
bf5e928d027a
option to place the toggle at the right.
Claus Gittinger <cg@exept.de>
parents:
318
diff
changeset
|
711 |
"/ toggle last ... |
bf5e928d027a
option to place the toggle at the right.
Claus Gittinger <cg@exept.de>
parents:
318
diff
changeset
|
712 |
toggleView := CheckToggle in:self. |
bf5e928d027a
option to place the toggle at the right.
Claus Gittinger <cg@exept.de>
parents:
318
diff
changeset
|
713 |
]. |
bf5e928d027a
option to place the toggle at the right.
Claus Gittinger <cg@exept.de>
parents:
318
diff
changeset
|
714 |
|
527 | 715 |
(StyleSheet at:'checkBoxStyle' default:StyleSheet name) == #motif ifTrue:[ |
716 |
toggleView activeLogo:nil. |
|
717 |
toggleView passiveLogo:nil. |
|
718 |
toggleView activeLevel:-2. |
|
719 |
toggleView passiveLevel:2. |
|
720 |
toggleView extent:10@10. |
|
721 |
toggleView sizeFixed:true. |
|
722 |
]. |
|
723 |
||
317
0f8f00dc025a
both components have the same controller
Claus Gittinger <cg@exept.de>
parents:
313
diff
changeset
|
724 |
"/ my controller handles both components |
218
9b155a06f6e6
handle input to my label (allow clicking on it)
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
725 |
labelView setController:controller. |
317
0f8f00dc025a
both components have the same controller
Claus Gittinger <cg@exept.de>
parents:
313
diff
changeset
|
726 |
toggleView setController:controller. |
218
9b155a06f6e6
handle input to my label (allow clicking on it)
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
727 |
|
579
ba6e90f651d8
pass down background changes to my components
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
728 |
"/ the label can be clicked as well |
ba6e90f651d8
pass down background changes to my components
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
729 |
labelView cursor:Cursor hand. |
ba6e90f651d8
pass down background changes to my components
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
730 |
self cursor:Cursor hand. |
ba6e90f651d8
pass down background changes to my components
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
731 |
|
56 | 732 |
" |
733 |
all of my input goes to the toggle |
|
209
448124e85ccd
keyboard delegation made explicit, for space only
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
734 |
disabled - normally there is already an outer delegate |
56 | 735 |
" |
209
448124e85ccd
keyboard delegation made explicit, for space only
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
736 |
"/ self delegate:(KeyboardForwarder toView:toggleView). |
44 | 737 |
|
738 |
" |
|
739 |
|b| |
|
740 |
||
741 |
b := CheckBox new. |
|
742 |
b label:'foo'. |
|
743 |
b open |
|
744 |
" |
|
188 | 745 |
|
579
ba6e90f651d8
pass down background changes to my components
Claus Gittinger <cg@exept.de>
parents:
566
diff
changeset
|
746 |
"Modified: / 26.10.1997 / 18:38:15 / cg" |
44 | 747 |
! ! |
100 | 748 |
|
749 |
!CheckBox methodsFor:'private'! |
|
750 |
||
751 |
sendChangeMessageWith:aValue |
|
752 |
"redefined to have mimic changes being sent from the toggle |
|
753 |
instead of myself" |
|
754 |
||
755 |
toggleView sendChangeMessageWith:aValue |
|
756 |
! ! |
|
757 |
||
758 |
!CheckBox methodsFor:'queries'! |
|
759 |
||
760 |
preferredExtent |
|
155 | 761 |
"compute & return the boxes preferredExtent from the components' sizes" |
153 | 762 |
|
100 | 763 |
|prefCheck prefLabel bw2| |
764 |
||
223 | 765 |
"/ If I have an explicit preferredExtent .. |
766 |
||
192
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
188
diff
changeset
|
767 |
preferredExtent notNil ifTrue:[ |
268 | 768 |
^ preferredExtent |
192
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
188
diff
changeset
|
769 |
]. |
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
188
diff
changeset
|
770 |
|
213
9c8f9be0956d
care for a nil LabelView when computing the preferredExtent
Claus Gittinger <cg@exept.de>
parents:
209
diff
changeset
|
771 |
(labelView isNil or:[labelView label isEmpty]) ifTrue:[ |
268 | 772 |
^ super preferredExtent |
188 | 773 |
]. |
153 | 774 |
^ super preferredExtent + (10@0). |
775 |
||
100 | 776 |
"/ prefCheck := toggleView preferredExtent. |
777 |
"/ prefLabel := labelView preferredExtent. |
|
778 |
"/ bw2 := borderWidth * 2. |
|
779 |
"/ ^ (prefCheck x + prefLabel x + (3 * ViewSpacing)) @ ((prefCheck y max:prefLabel y) + bw2 + 2) |
|
153 | 780 |
|
223 | 781 |
"Modified: 19.7.1996 / 20:43:47 / cg" |
100 | 782 |
! ! |
783 |
||
382
ea14fe927a8b
preps for native window support
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
784 |
!CheckBox methodsFor:'queries - internal'! |
ea14fe927a8b
preps for native window support
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
785 |
|
ea14fe927a8b
preps for native window support
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
786 |
nativeWindowType |
ea14fe927a8b
preps for native window support
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
787 |
"return a symbol describing my native window type |
ea14fe927a8b
preps for native window support
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
788 |
(may be used internally by the device as a native window creation hint)" |
ea14fe927a8b
preps for native window support
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
789 |
|
ea14fe927a8b
preps for native window support
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
790 |
^ #CheckBox |
ea14fe927a8b
preps for native window support
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
791 |
|
ea14fe927a8b
preps for native window support
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
792 |
"Created: 2.5.1997 / 14:41:00 / cg" |
ea14fe927a8b
preps for native window support
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
793 |
! ! |
ea14fe927a8b
preps for native window support
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
794 |
|
273
01541272ce8d
resource spec updated; cache device form
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
795 |
!CheckBox class methodsFor:'documentation'! |
100 | 796 |
|
797 |
version |
|
817 | 798 |
^ '$Header: /cvs/stx/stx/libwidg2/CheckBox.st,v 1.51 1998-03-09 21:21:33 tz Exp $' |
100 | 799 |
! ! |