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