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