author | tz |
Mon, 30 Mar 1998 14:32:15 +0200 | |
changeset 1474 | e75ddabb921b |
parent 1469 | d4f108e1a667 |
child 1528 | 02fc96381147 |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1991 by Claus Gittinger |
59 | 3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
Toggle subclass:#CheckToggle |
|
375
6656f7e8ae20
added just another checkType: #fatcross
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
14 |
instanceVariableNames:'' |
6656f7e8ae20
added just another checkType: #fatcross
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
15 |
classVariableNames:'DefaultCheckForm DefaultCheckColor DefaultActiveFGColor |
265 | 16 |
DefaultActiveBGColor DefaultFGColor DefaultBGColor |
1123 | 17 |
DefaultActiveLevel DefaultPassiveLevel DefaultBorderWidth |
18 |
LabelOverMargin' |
|
375
6656f7e8ae20
added just another checkType: #fatcross
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
19 |
poolDictionaries:'' |
6656f7e8ae20
added just another checkType: #fatcross
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
20 |
category:'Views-Interactors' |
0 | 21 |
! |
22 |
||
899 | 23 |
!CheckToggle class methodsFor:'documentation'! |
38 | 24 |
|
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1991 by Claus Gittinger |
|
59 | 28 |
All Rights Reserved |
0 | 29 |
|
38 | 30 |
This software is furnished under a license and may be used |
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
0 | 38 |
|
38 | 39 |
documentation |
40 |
" |
|
41 |
CheckButtons are like Toggles in toggling their state when pressed. |
|
42 |
However, they show an ok-marker if on; nothing if off. |
|
118 | 43 |
CheckButtons are mostly used as part of a checkBox (since normally, |
147 | 44 |
you want to have some label along the check) and often grouped for |
45 |
many-in-many or one-in-many setups. |
|
130 | 46 |
|
585 | 47 |
[StyleSheet values:] |
130 | 48 |
|
585 | 49 |
checkToggleCheckColor <Color> color to draw check-image with. |
50 |
defaults to value of #buttonActiveForegroundColor. |
|
130 | 51 |
|
585 | 52 |
checkToggleActiveBackgroundColor background color to draw active checki-image with |
53 |
checkToggleForegroundColor foreground color to use if off |
|
54 |
checkToggleBackgroundColor background color to use if off |
|
130 | 55 |
|
585 | 56 |
checkToggleBitmapFile <String> name of bitmap file for check-image |
130 | 57 |
|
585 | 58 |
checkToggleStyle <Symbol> default checkForm style. |
59 |
used if above is nil or file not readable |
|
60 |
can be #cross or #check; defaults to #check |
|
130 | 61 |
|
585 | 62 |
checkToggleAvtiveLevel <Number> active level - defaults to value of #buttonPassiveLevel |
63 |
checkTogglePassiveLevel <Number> active level - defaults to value of #buttonPassiveLevel |
|
64 |
checkToggleBorderWidth <Number> borderWidth - defaults buttons default |
|
130 | 65 |
|
139 | 66 |
(if not set in the styleSheet, Toggle values are taken) |
67 |
||
130 | 68 |
See examples. |
69 |
||
585 | 70 |
[author:] |
71 |
Claus Gittinger |
|
72 |
||
73 |
[see also:] |
|
593 | 74 |
CheckBox RadioButton RadioButtonGroup Toggle Button |
75 |
Dialog |
|
76 |
ValueHolder TriggerValue |
|
77 |
Block |
|
118 | 78 |
" |
79 |
! |
|
80 |
||
81 |
examples |
|
82 |
" |
|
83 |
checkToggle alone: |
|
593 | 84 |
[exBegin] |
85 |
|top check| |
|
118 | 86 |
|
593 | 87 |
top := StandardSystemView new. |
88 |
top extent:100@100. |
|
118 | 89 |
|
593 | 90 |
check := CheckToggle in:top. |
91 |
check origin:10@10. |
|
118 | 92 |
|
593 | 93 |
top open |
94 |
[exEnd] |
|
118 | 95 |
|
96 |
||
97 |
give it an action: |
|
593 | 98 |
[exBegin] |
99 |
|top check| |
|
118 | 100 |
|
593 | 101 |
top := StandardSystemView new. |
102 |
top extent:100@100. |
|
118 | 103 |
|
593 | 104 |
check := CheckToggle in:top. |
105 |
check origin:10@10. |
|
655 | 106 |
check action:[:value | Transcript showCR:'changed to: ' , value printString]. |
118 | 107 |
|
593 | 108 |
top open |
109 |
[exEnd] |
|
110 |
||
118 | 111 |
|
112 |
give it a model: |
|
593 | 113 |
[exBegin] |
114 |
|top check model| |
|
118 | 115 |
|
593 | 116 |
model := false asValue. |
118 | 117 |
|
593 | 118 |
top := StandardSystemView new. |
119 |
top extent:100@100. |
|
118 | 120 |
|
593 | 121 |
check := CheckToggle in:top. |
122 |
check origin:10@10. |
|
123 |
check model:model. |
|
118 | 124 |
|
593 | 125 |
top openModal. |
118 | 126 |
|
655 | 127 |
Transcript showCR:'value after closing box: ' , model value printString |
593 | 128 |
[exEnd] |
129 |
||
118 | 130 |
|
131 |
multiple checks on a single model (with different change selectors): |
|
132 |
(using a checkBox here, for the demonstration ...) |
|
147 | 133 |
(this is a typical many-in-many setup) |
593 | 134 |
[exBegin] |
135 |
|top model panel ext1 ext2 |
|
136 |
readFlag writeFlag executeFlag| |
|
118 | 137 |
|
593 | 138 |
readFlag := writeFlag := true. |
139 |
executeFlag := false. |
|
118 | 140 |
|
593 | 141 |
model := Plug new. |
142 |
model respondTo:#read with:[readFlag]. |
|
143 |
model respondTo:#write with:[writeFlag]. |
|
144 |
model respondTo:#execute with:[executeFlag]. |
|
145 |
model respondTo:#read: with:[:val | readFlag := val]. |
|
146 |
model respondTo:#write: with:[:val | writeFlag := val]. |
|
147 |
model respondTo:#execute: with:[:val | executeFlag := val]. |
|
148 |
||
149 |
top := StandardSystemView new. |
|
150 |
top extent:200@200. |
|
151 |
top label:'File permissions:'. |
|
118 | 152 |
|
593 | 153 |
panel := VerticalPanelView origin:0.0@0.0 corner:1.0@1.0 in:top. |
154 |
panel horizontalLayout:#leftSpace. |
|
118 | 155 |
|
593 | 156 |
#(read write execute) do:[:sym | |
157 |
|check| |
|
118 | 158 |
|
593 | 159 |
check := CheckBox in:panel. |
160 |
check label:sym. |
|
161 |
check model:model; aspect:sym; changeMessage:(sym , ':') asSymbol. |
|
162 |
]. |
|
118 | 163 |
|
593 | 164 |
top openModal. |
118 | 165 |
|
655 | 166 |
Transcript showCR:'settings after closing box:'. |
167 |
Transcript showCR:' read -> ' , readFlag printString. |
|
168 |
Transcript showCR:' write -> ' , writeFlag printString. |
|
169 |
Transcript showCR:' execute -> ' , executeFlag printString. |
|
593 | 170 |
[exEnd] |
130 | 171 |
|
172 |
||
593 | 173 |
checkToggles in a group - now, they have RadioButton behavior. |
147 | 174 |
(this is a typical one-in-many setup) |
593 | 175 |
[exBegin] |
176 |
|top panel check1 check2 check3 grp| |
|
130 | 177 |
|
593 | 178 |
top := StandardSystemView new. |
179 |
top extent:200@300. |
|
130 | 180 |
|
593 | 181 |
panel := VerticalPanelView origin:0.0@0.0 corner:1.0@1.0 in:top. |
130 | 182 |
|
593 | 183 |
check1 := CheckToggle in:panel. |
184 |
check2 := CheckToggle in:panel. |
|
185 |
check3 := CheckToggle in:panel. |
|
130 | 186 |
|
593 | 187 |
grp := RadioButtonGroup new. |
188 |
grp add:check1. |
|
189 |
grp add:check2. |
|
190 |
grp add:check3. |
|
130 | 191 |
|
593 | 192 |
top open |
193 |
[exEnd] |
|
146 | 194 |
|
195 |
||
196 |
Channel operation |
|
197 |
----------------- |
|
198 |
||
199 |
enabling other toggles via a toggle |
|
593 | 200 |
[exBegin] |
201 |
|top panel t enableChannel| |
|
146 | 202 |
|
593 | 203 |
top := StandardSystemView new. |
204 |
top extent:(400 @ 200). |
|
146 | 205 |
|
593 | 206 |
panel := HorizontalPanelView origin:0.0@0.0 corner:1.0@1.0 in:top. |
146 | 207 |
|
593 | 208 |
enableChannel := false asValue. |
146 | 209 |
|
593 | 210 |
1 to:10 do:[:i | |
211 |
t := CheckToggle in:panel. |
|
212 |
t enableChannel:enableChannel. |
|
213 |
]. |
|
146 | 214 |
|
593 | 215 |
t := Toggle in:panel. |
216 |
t activeLogo:'enabled'; passiveLogo:'disabled'. |
|
217 |
t pressChannel:enableChannel. |
|
146 | 218 |
|
593 | 219 |
top open |
220 |
[exEnd] |
|
38 | 221 |
" |
222 |
! ! |
|
0 | 223 |
|
899 | 224 |
!CheckToggle class methodsFor:'defaults'! |
0 | 225 |
|
205 | 226 |
checkFormOn:aDevice |
227 |
"return the form used when checkToggle is turned on. |
|
228 |
Provided as public entry, to allow other views |
|
229 |
to share the same check-image." |
|
230 |
||
231 |
^ DefaultCheckForm on:aDevice. |
|
232 |
! |
|
233 |
||
1236 | 234 |
checkImageForStyle:aStyleSymbol |
235 |
"helper & public access to useful checkToggle images" |
|
236 |
||
237 |
|bits| |
|
238 |
||
239 |
aStyleSymbol == #cross ifTrue:[ |
|
240 |
bits := #[2r10000000 2r00000001 |
|
241 |
2r01000000 2r00000010 |
|
242 |
2r00100000 2r00000100 |
|
243 |
2r00010000 2r00001000 |
|
244 |
2r00001000 2r00010000 |
|
245 |
2r00000100 2r00100000 |
|
246 |
2r00000010 2r01000000 |
|
247 |
2r00000001 2r10000000 |
|
248 |
2r00000001 2r10000000 |
|
249 |
2r00000010 2r01000000 |
|
250 |
2r00000100 2r00100000 |
|
251 |
2r00001000 2r00010000 |
|
252 |
2r00010000 2r00001000 |
|
253 |
2r00100000 2r00000100 |
|
254 |
2r01000000 2r00000010 |
|
255 |
2r10000000 2r00000001] |
|
256 |
] ifFalse:[ |
|
257 |
aStyleSymbol == #borderedCross ifTrue:[ |
|
258 |
bits := #[2r11111111 2r11111111 |
|
259 |
2r11000000 2r00000011 |
|
260 |
2r10100000 2r00000101 |
|
261 |
2r10010000 2r00001001 |
|
262 |
2r10001000 2r00010001 |
|
263 |
2r10000100 2r00100001 |
|
264 |
2r10000010 2r01000001 |
|
265 |
2r10000001 2r10000001 |
|
266 |
2r10000001 2r10000001 |
|
267 |
2r10000010 2r01000001 |
|
268 |
2r10000100 2r00100001 |
|
269 |
2r10001000 2r00010001 |
|
270 |
2r10010000 2r00001001 |
|
271 |
2r10100000 2r00000101 |
|
272 |
2r11000000 2r00000011 |
|
273 |
2r11111111 2r11111111] |
|
274 |
] ifFalse:[ |
|
275 |
aStyleSymbol == #fatcross ifTrue:[ |
|
276 |
bits := #[2r11000000 2r00000011 |
|
277 |
2r11100000 2r00000111 |
|
278 |
2r01110000 2r00001110 |
|
279 |
2r00111000 2r00011100 |
|
280 |
2r00011100 2r00111000 |
|
281 |
2r00001110 2r01110000 |
|
282 |
2r00000111 2r11100000 |
|
283 |
2r00000011 2r11000000 |
|
284 |
2r00000011 2r11000000 |
|
285 |
2r00000111 2r11100000 |
|
286 |
2r00001110 2r01110000 |
|
287 |
2r00011100 2r00111000 |
|
288 |
2r00111000 2r00011100 |
|
289 |
2r01110000 2r00001110 |
|
290 |
2r11100000 2r00000111 |
|
291 |
2r11000000 2r00000011] |
|
292 |
] ifFalse:[ |
|
293 |
aStyleSymbol == #borderedFatcross ifTrue:[ |
|
294 |
bits := #[2r11111111 2r11111111 |
|
295 |
2r11100000 2r00000111 |
|
296 |
2r11110000 2r00001111 |
|
297 |
2r10111000 2r00011101 |
|
298 |
2r10011100 2r00111001 |
|
299 |
2r10001110 2r01110001 |
|
300 |
2r10000111 2r11100001 |
|
301 |
2r10000011 2r11000001 |
|
302 |
2r10000011 2r11000001 |
|
303 |
2r10000111 2r11100001 |
|
304 |
2r10001110 2r01110001 |
|
305 |
2r10011100 2r00111001 |
|
306 |
2r10111000 2r00011101 |
|
307 |
2r11110000 2r00001111 |
|
308 |
2r11100000 2r00000111 |
|
309 |
2r11111111 2r11111111] |
|
310 |
] ifFalse:[ |
|
311 |
aStyleSymbol == #border ifTrue:[ |
|
312 |
bits := #[2r11111111 2r11111111 |
|
313 |
2r10000000 2r00000001 |
|
314 |
2r10000000 2r00000001 |
|
315 |
2r10000000 2r00000001 |
|
316 |
2r10000000 2r00000001 |
|
317 |
2r10000000 2r00000001 |
|
318 |
2r10000000 2r00000001 |
|
319 |
2r10000000 2r00000001 |
|
320 |
2r10000000 2r00000001 |
|
321 |
2r10000000 2r00000001 |
|
322 |
2r10000000 2r00000001 |
|
323 |
2r10000000 2r00000001 |
|
324 |
2r10000000 2r00000001 |
|
325 |
2r10000000 2r00000001 |
|
326 |
2r10000000 2r00000001 |
|
327 |
2r11111111 2r11111111] |
|
328 |
] ifFalse:[ |
|
329 |
bits := #[2r00000000 2r00000000 |
|
330 |
2r00000000 2r00000010 |
|
331 |
2r00000000 2r00000010 |
|
332 |
2r00000000 2r00000100 |
|
333 |
2r00000000 2r00000100 |
|
334 |
2r00000000 2r00001000 |
|
335 |
2r00000000 2r00001000 |
|
336 |
2r00000000 2r00010000 |
|
337 |
2r01000000 2r00110000 |
|
338 |
2r00100000 2r01100000 |
|
339 |
2r00011000 2r01100000 |
|
340 |
2r00001110 2r11000000 |
|
341 |
2r00000111 2r11000000 |
|
342 |
2r00000011 2r10000000 |
|
343 |
2r00000001 2r10000000 |
|
344 |
2r00000000 2r00000000] |
|
345 |
] |
|
346 |
] |
|
347 |
] |
|
348 |
] |
|
349 |
]. |
|
350 |
^ Form width:16 height:16 fromArray:bits on:Display |
|
351 |
||
352 |
" |
|
353 |
self checkImageForStyle:#cross |
|
354 |
self checkImageForStyle:#fatcross |
|
355 |
self checkImageForStyle:#borderedCross |
|
356 |
self checkImageForStyle:#borderedFatcross |
|
357 |
" |
|
358 |
||
359 |
"Modified: 7.3.1997 / 21:15:13 / cg" |
|
360 |
! |
|
361 |
||
128 | 362 |
updateStyleCache |
440
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
375
diff
changeset
|
363 |
"extract values from the styleSheet and cache them in class variables" |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
375
diff
changeset
|
364 |
|
1355 | 365 |
<resource: #style (#'checkToggle.checkColor' |
366 |
#'checkToggle.backgroundColor' #'checkToggleForegroundColor' |
|
367 |
#'checkToggle.activeBackgroundColor' #'checkToggleActiveForegroundColor' |
|
368 |
#'checkToggle.activeLevel' #'checkTogglePassiveLevel' |
|
369 |
#'checkToggle.borderWidth' |
|
370 |
#'checkToggle.bitmapFile' |
|
371 |
#'checkToggle.labelOverMargin' |
|
372 |
#'checkToggle.style')> |
|
440
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
375
diff
changeset
|
373 |
|
1280 | 374 |
|checkFileName checkStyle| |
0 | 375 |
|
1474 | 376 |
DefaultCheckColor := StyleSheet colorAt:'checkToggle.checkColor'. |
377 |
DefaultFGColor := StyleSheet colorAt:'checkToggle.foregroundColor'. |
|
378 |
DefaultBGColor := StyleSheet colorAt:'checkToggle.backgroundColor'. |
|
1355 | 379 |
DefaultActiveFGColor := StyleSheet colorAt:'checkToggle.activeForegroundColor'. |
380 |
DefaultActiveBGColor := StyleSheet colorAt:'checkToggle.activeBackgroundColor'. |
|
1474 | 381 |
DefaultActiveLevel := StyleSheet at:'checkToggle.activeLevel'. |
382 |
DefaultPassiveLevel := StyleSheet at:'checkToggle.passiveLevel'. |
|
383 |
DefaultBorderWidth := StyleSheet at:'checkToggle.borderWidth'. |
|
384 |
LabelOverMargin := StyleSheet at:'checkToggle.labelOverMargin' default:false. |
|
130 | 385 |
|
136 | 386 |
DefaultCheckForm := nil. |
1355 | 387 |
checkFileName := StyleSheet at:'checkToggle.bitmapFile' default:'CheckOn.xbm'. |
128 | 388 |
checkFileName notNil ifTrue:[ |
899 | 389 |
DefaultCheckForm := Image fromFile:checkFileName |
390 |
resolution:100 |
|
391 |
on:Display. |
|
392 |
DefaultCheckForm isNil ifTrue:[ |
|
393 |
DefaultCheckForm := Image fromFile:'bitmaps/' , checkFileName |
|
394 |
resolution:100 |
|
395 |
on:Display. |
|
396 |
] |
|
130 | 397 |
]. |
398 |
DefaultCheckForm isNil ifTrue:[ |
|
1355 | 399 |
checkStyle := StyleSheet at:'checkToggle.style' default:#check. |
1236 | 400 |
DefaultCheckForm := self checkImageForStyle:checkStyle |
1474 | 401 |
]. |
402 |
StyleSheet name == #os2 ifTrue: [ |
|
403 |
DefaultCheckForm := DefaultCheckForm subImageIn: (0@0 extent: 15@15) |
|
404 |
]. |
|
440
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
375
diff
changeset
|
405 |
|
1001 | 406 |
" |
407 |
self updateStyleCache |
|
408 |
" |
|
1123 | 409 |
|
1355 | 410 |
"Modified: 20.10.1997 / 13:53:33 / cg" |
0 | 411 |
! ! |
412 |
||
1469 | 413 |
!CheckToggle methodsFor:'event handling'! |
414 |
||
415 |
sizeChanged:how |
|
416 |
||
417 |
width := self preferredExtent x. |
|
418 |
height := self preferredExtent y. |
|
419 |
! ! |
|
420 |
||
0 | 421 |
!CheckToggle methodsFor:'initialization'! |
422 |
||
18 | 423 |
initStyle |
967 | 424 |
"setup viewStyle specifics" |
425 |
||
18 | 426 |
super initStyle. |
427 |
||
128 | 428 |
onLevel := offLevel. |
130 | 429 |
DefaultActiveLevel notNil ifTrue:[onLevel := DefaultActiveLevel]. |
136 | 430 |
DefaultPassiveLevel notNil ifTrue:[offLevel := DefaultPassiveLevel]. |
130 | 431 |
|
1317 | 432 |
activeLogo := DefaultCheckForm onDevice:device. |
128 | 433 |
passiveLogo := nil. |
434 |
||
1317 | 435 |
DefaultActiveFGColor notNil ifTrue:[ |
436 |
self activeForegroundColor:DefaultActiveFGColor |
|
437 |
]. |
|
438 |
DefaultCheckColor notNil ifTrue:[ |
|
439 |
self activeForegroundColor:DefaultCheckColor |
|
440 |
]. |
|
441 |
DefaultActiveBGColor notNil ifTrue:[ |
|
442 |
self activeBackgroundColor:DefaultActiveBGColor |
|
443 |
]. |
|
444 |
DefaultFGColor notNil ifTrue:[ |
|
445 |
self foregroundColor:DefaultFGColor |
|
446 |
]. |
|
447 |
DefaultBGColor notNil ifTrue:[ |
|
448 |
self backgroundColor:DefaultBGColor |
|
449 |
]. |
|
130 | 450 |
|
128 | 451 |
showLamp := false. |
130 | 452 |
|
453 |
DefaultBorderWidth notNil ifTrue:[self borderWidth:DefaultBorderWidth]. |
|
454 |
||
455 |
offLevel ~~ level ifTrue:[self level:offLevel]. |
|
967 | 456 |
|
457 |
"Modified: 22.1.1997 / 11:57:05 / cg" |
|
205 | 458 |
! |
459 |
||
460 |
initialize |
|
461 |
super initialize. |
|
462 |
passiveLogo := nil. |
|
1469 | 463 |
self label:activeLogo. "/ to let me compute some defaultExtent |
0 | 464 |
! ! |
465 |
||
1123 | 466 |
!CheckToggle methodsFor:'queries'! |
467 |
||
1469 | 468 |
label: something |
469 |
||
470 |
something isString ifFalse: [super label: something] |
|
471 |
! |
|
472 |
||
1123 | 473 |
preferredExtent |
474 |
"/ If I have an explicit preferredExtent .. |
|
475 |
||
476 |
|pref| |
|
477 |
||
478 |
preferredExtent notNil ifTrue:[ |
|
479 |
^ preferredExtent |
|
480 |
]. |
|
481 |
||
482 |
pref := super preferredExtent. |
|
483 |
LabelOverMargin ifTrue:[ |
|
484 |
pref := pref - (margin*2) |
|
485 |
]. |
|
486 |
||
487 |
^ pref |
|
488 |
||
489 |
"Modified: 7.3.1997 / 17:52:53 / cg" |
|
490 |
! ! |
|
491 |
||
0 | 492 |
!CheckToggle methodsFor:'redrawing'! |
493 |
||
133 | 494 |
drawWith:fg and:bg |
1469 | 495 |
|
265 | 496 |
controller pressed ifTrue:[ |
1169
982c3fd58d67
better highlighting on enter/leave
Claus Gittinger <cg@exept.de>
parents:
1154
diff
changeset
|
497 |
logo := activeLogo. |
0 | 498 |
] ifFalse:[ |
1169
982c3fd58d67
better highlighting on enter/leave
Claus Gittinger <cg@exept.de>
parents:
1154
diff
changeset
|
499 |
logo := passiveLogo. |
133 | 500 |
]. |
1171 | 501 |
|
502 |
(controller entered |
|
503 |
and:[enteredBgColor notNil]) ifTrue:[ |
|
1169
982c3fd58d67
better highlighting on enter/leave
Claus Gittinger <cg@exept.de>
parents:
1154
diff
changeset
|
504 |
super drawWith:fg and:enteredBgColor |
982c3fd58d67
better highlighting on enter/leave
Claus Gittinger <cg@exept.de>
parents:
1154
diff
changeset
|
505 |
] ifFalse:[ |
1469 | 506 |
super drawWith:fg and:bgColor |
1169
982c3fd58d67
better highlighting on enter/leave
Claus Gittinger <cg@exept.de>
parents:
1154
diff
changeset
|
507 |
] |
164 | 508 |
|
509 |
"Modified: 22.9.1995 / 15:45:02 / claus" |
|
1171 | 510 |
"Modified: 1.4.1997 / 13:35:48 / cg" |
1123 | 511 |
! |
512 |
||
513 |
edgeDrawn:which |
|
1154 | 514 |
"redraw my logo if it overlaps the edge" |
515 |
||
1123 | 516 |
LabelOverMargin ifTrue:[ |
517 |
(logo notNil and:[logo isImageOrForm]) ifTrue:[ |
|
518 |
self paint:fgColor on:bgColor. |
|
519 |
self clippingRectangle:nil. |
|
520 |
self displayForm:logo x:labelOriginX y:labelOriginY. |
|
521 |
self clippingRectangle:innerClipRect |
|
522 |
] |
|
1469 | 523 |
]. |
1123 | 524 |
|
1154 | 525 |
"Modified: 22.3.1997 / 18:23:50 / cg" |
0 | 526 |
! ! |
205 | 527 |
|
899 | 528 |
!CheckToggle class methodsFor:'documentation'! |
205 | 529 |
|
530 |
version |
|
1474 | 531 |
^ '$Header: /cvs/stx/stx/libwidg/CheckToggle.st,v 1.42 1998-03-30 12:32:15 tz Exp $' |
205 | 532 |
! ! |