author | Claus Gittinger <cg@exept.de> |
Fri, 14 Jun 1996 16:16:05 +0200 | |
changeset 765 | ea6ecf2a5b30 |
parent 657 | 3215022ac50c |
child 768 | 33056f6466ea |
permissions | -rw-r--r-- |
1 | 1 |
" |
2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
59 | 3 |
All Rights Reserved |
1 | 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 |
Button subclass:#ArrowButton |
|
440
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
14 |
instanceVariableNames:'arrowStyle' |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
15 |
classVariableNames:'DownArrowForm UpArrowForm LeftArrowForm RightArrowForm |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
16 |
CachedStyle DefaultArrowStyle DefaultBackgroundColor |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
17 |
DefaultForegroundColor DefaultActiveBackgroundColor |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
18 |
DefaultActiveForegroundColor DefaultEnteredBackgroundColor |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
19 |
DefaultEnteredForegroundColor DefaultDisabledForegroundColor |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
20 |
DefaultArrowButtonActiveLevel DefaultArrowButtonPassiveLevel |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
21 |
DownArrowFormFile UpArrowFormFile LeftArrowFormFile |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
22 |
RightArrowFormFile' |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
23 |
poolDictionaries:'' |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
24 |
category:'Views-Interactors' |
1 | 25 |
! |
26 |
||
38 | 27 |
!ArrowButton class methodsFor:'documentation'! |
28 |
||
29 |
copyright |
|
30 |
" |
|
31 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
59 | 32 |
All Rights Reserved |
38 | 33 |
|
34 |
This software is furnished under a license and may be used |
|
35 |
only in accordance with the terms of that license and with the |
|
36 |
inclusion of the above copyright notice. This software may not |
|
37 |
be provided or otherwise made available to, or used by, any |
|
38 |
other person. No title to or ownership of the software is |
|
39 |
hereby transferred. |
|
40 |
" |
|
41 |
! |
|
42 |
||
43 |
documentation |
|
44 |
" |
|
59 | 45 |
ArrowButtons display an arrow as their label; they are mainly |
38 | 46 |
used for scrollbars, but can be useful on their own in some applications. |
59 | 47 |
Beside the contents, their default behavior is to perform their action |
48 |
when pressed - not (as is the default for normal buttons) when released. |
|
38 | 49 |
|
65 | 50 |
Indivdual ArrowButtons can be created by sending one of: |
580 | 51 |
ArrowButton upIn:aView /downIn: / leftIn: or rightIn: |
38 | 52 |
passing the parent view as argument. |
65 | 53 |
|
130 | 54 |
See examples. |
55 |
||
580 | 56 |
|
57 |
[styleSheet parameters:] |
|
58 |
||
59 |
arrowButtonStyle <Symbol> the style of the button; |
|
60 |
#motif, #st80 or nil (default) |
|
61 |
arrowButtonForegroundColor <nil | Color> foregroundColor |
|
62 |
arrowButtonBackgroundColor <nil | Color> backgroundColor |
|
63 |
||
64 |
arrowButtonActiveForegroundColor foregroundColor when pressed |
|
65 |
arrowButtonActiveBackgroundColor backgroundColor when pressed |
|
66 |
||
67 |
arrowButtonEnteredForegroundColor foregroundColor when mouse pointer entered |
|
68 |
arrowButtonEnteredBackgroundColor backgroundColor when mouse pointer entered |
|
69 |
||
585 | 70 |
[author:] |
71 |
Claus Gittinger |
|
72 |
||
580 | 73 |
[See also:] |
74 |
Button Toggle CheckToggle CheckBox |
|
75 |
ScrollBar |
|
130 | 76 |
|
62 | 77 |
" |
78 |
! |
|
1 | 79 |
|
62 | 80 |
examples |
81 |
" |
|
38 | 82 |
example1: |
593 | 83 |
[exBegin] |
84 |
|v p b1 b2 b3 b4| |
|
38 | 85 |
|
593 | 86 |
v := StandardSystemView extent:200@200. |
87 |
p := HorizontalPanelView origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:v. |
|
88 |
b1 := ArrowButton upIn:p. |
|
89 |
b2 := ArrowButton downIn:p. |
|
90 |
b3 := ArrowButton leftIn:p. |
|
91 |
b4 := ArrowButton rightIn:p. |
|
38 | 92 |
|
593 | 93 |
b1 action:['whatEver you like here ...']. |
94 |
b2 action:['whatEver you like here ...']. |
|
95 |
b3 action:['whatEver you like here ...']. |
|
96 |
b4 action:['whatEver you like here ...']. |
|
38 | 97 |
|
593 | 98 |
v open |
99 |
[exEnd] |
|
38 | 100 |
|
1 | 101 |
|
38 | 102 |
example2: |
593 | 103 |
[exBegin] |
104 |
|v p b1 b2 b3 b4| |
|
59 | 105 |
|
593 | 106 |
v := StandardSystemView extent:200@200. |
107 |
p := HorizontalPanelView origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:v. |
|
108 |
b1 := (ArrowButton upIn:p) extent:30@30. |
|
109 |
b2 := (ArrowButton downIn:p) extent:30@30. |
|
110 |
b3 := (ArrowButton leftIn:p) extent:30@30. |
|
111 |
b4 := (ArrowButton rightIn:p) extent:30@30. |
|
59 | 112 |
|
593 | 113 |
b1 action:['whatEver you like here ...']. |
114 |
b2 action:['whatEver you like here ...']. |
|
115 |
b3 action:['whatEver you like here ...']. |
|
116 |
b4 action:['whatEver you like here ...']. |
|
59 | 117 |
|
593 | 118 |
v open |
119 |
[exEnd] |
|
120 |
||
59 | 121 |
|
122 |
example3: |
|
593 | 123 |
[exBegin] |
124 |
|v p b1 b2 b3 b4| |
|
59 | 125 |
|
593 | 126 |
v := StandardSystemView extent:200@200. |
127 |
p := View origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:v. |
|
128 |
b1 := (ArrowButton upIn:p) origin:(0.33 @ 0.0) corner:(0.67 @ 0.33). |
|
129 |
b3 := (ArrowButton leftIn:p) origin:(0.0 @ 0.33) corner:(0.33 @ 0.67). |
|
130 |
b4 := (ArrowButton rightIn:p) origin:(0.67 @ 0.33) corner:(1.0 @ 0.67). |
|
131 |
b2 := (ArrowButton downIn:p) origin:(0.33 @ 0.67) corner:(0.67 @ 1.0). |
|
38 | 132 |
|
593 | 133 |
b1 action:['whatEver you like here ...']. |
134 |
b2 action:['whatEver you like here ...']. |
|
135 |
b3 action:['whatEver you like here ...']. |
|
136 |
b4 action:['whatEver you like here ...']. |
|
59 | 137 |
|
593 | 138 |
v open |
139 |
[exEnd] |
|
140 |
||
59 | 141 |
|
65 | 142 |
example4 (not good coding style, to explicitely use a particular style, |
593 | 143 |
just a demonstration how it looks ..): |
144 |
[exBegin] |
|
145 |
|v p b1 b2 b3 b4 oldStyle| |
|
59 | 146 |
|
593 | 147 |
oldStyle := View defaultStyle. |
148 |
View defaultStyle:#motif. |
|
38 | 149 |
|
593 | 150 |
v := StandardSystemView extent:100@100. |
151 |
p := View origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:v. |
|
59 | 152 |
|
593 | 153 |
b1 := (ArrowButton upIn:p) origin:(0.33 @ 0.0) corner:(0.67 @ 0.33). |
154 |
b3 := (ArrowButton leftIn:p) origin:(0.0 @ 0.33) corner:(0.33 @ 0.67). |
|
155 |
b4 := (ArrowButton rightIn:p) origin:(0.67 @ 0.33) corner:(1.0 @ 0.67). |
|
156 |
b2 := (ArrowButton downIn:p) origin:(0.33 @ 0.67) corner:(0.67 @ 1.0). |
|
38 | 157 |
|
593 | 158 |
b1 action:['whatEver you like here ...']. |
159 |
b2 action:['whatEver you like here ...']. |
|
160 |
b3 action:['whatEver you like here ...']. |
|
161 |
b4 action:['whatEver you like here ...']. |
|
59 | 162 |
|
593 | 163 |
View defaultStyle:oldStyle. |
164 |
v open |
|
165 |
[exEnd] |
|
38 | 166 |
" |
167 |
! ! |
|
1 | 168 |
|
205 | 169 |
!ArrowButton class methodsFor:'instance creation'! |
59 | 170 |
|
205 | 171 |
downIn:aView |
172 |
^ (super in:aView) direction:#down |
|
173 |
! |
|
59 | 174 |
|
205 | 175 |
leftIn:aView |
176 |
^ (super in:aView) direction:#left |
|
59 | 177 |
! |
178 |
||
205 | 179 |
rightIn:aView |
180 |
^ (super in:aView) direction:#right |
|
181 |
! |
|
6 | 182 |
|
205 | 183 |
upIn:aView |
184 |
^ (super in:aView) direction:#up |
|
185 |
! ! |
|
38 | 186 |
|
205 | 187 |
!ArrowButton class methodsFor:'defaults'! |
1 | 188 |
|
38 | 189 |
downArrowButtonForm:style on:aDevice |
1 | 190 |
"retun the form used for the scrollDown Button" |
191 |
||
59 | 192 |
|form| |
38 | 193 |
|
194 |
" |
|
195 |
use cached form, if device is appropriate |
|
196 |
" |
|
59 | 197 |
CachedStyle ~~ style ifTrue:[ |
657 | 198 |
UpArrowForm := DownArrowForm := LeftArrowForm := RightArrowForm := nil |
59 | 199 |
]. |
200 |
||
38 | 201 |
((aDevice == Display) and:[DownArrowForm notNil]) ifTrue:[ |
657 | 202 |
^ DownArrowForm |
38 | 203 |
]. |
204 |
||
154 | 205 |
DownArrowForm := StyleSheet at:'arrowButtonDownForm' default:nil. |
206 |
DownArrowForm notNil ifTrue:[ |
|
657 | 207 |
^ DownArrowForm |
154 | 208 |
]. |
209 |
||
38 | 210 |
" |
59 | 211 |
special treatment for st80 arrows |
212 |
- they do not really fit into the general (bitmap) scheme ... |
|
213 |
(i.e. they are computed instead of drawn from a bitmap) |
|
38 | 214 |
" |
59 | 215 |
style ~~ #st80 ifTrue:[ |
657 | 216 |
DownArrowFormFile notNil ifTrue:[ |
217 |
form := Form fromFile:DownArrowFormFile resolution:100 on:aDevice. |
|
218 |
form isNil ifTrue:[ |
|
219 |
'ARRBUTTON: no bitmapFile: ' infoPrint. DownArrowFormFile infoPrintCR. |
|
220 |
] |
|
221 |
] |
|
38 | 222 |
]. |
6 | 223 |
|
38 | 224 |
" |
225 |
form to use as a fallback, if no bitmap file is present |
|
226 |
(actually not really needed - just to show something useful, in |
|
227 |
case of a bad installation) |
|
228 |
" |
|
229 |
form isNil ifTrue:[ |
|
657 | 230 |
style == #st80 ifTrue:[ |
231 |
form := Form width:9 height:9 depth:1 on:Display. |
|
270
aa6a36e199e7
be tolerant in case form creation fails
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
232 |
form isNil ifTrue:[^ nil]. |
657 | 233 |
form clear. |
234 |
form lineWidth:2. |
|
235 |
form capStyle:#round. |
|
236 |
form paint:(Color colorId:1). |
|
237 |
form displayLineFromX:0 y:2 toX:4 y:6. |
|
238 |
form displayLineFromX:4 y:6 toX:8 y:2 |
|
239 |
] ifFalse:[ |
|
240 |
form := Form width:16 height:16 |
|
241 |
fromArray:#[2r00000000 2r00000000 |
|
242 |
2r00001111 2r11110000 |
|
243 |
2r00001000 2r00010000 |
|
244 |
2r00001000 2r00010000 |
|
245 |
2r00001000 2r00010000 |
|
246 |
2r00001000 2r00010000 |
|
247 |
2r00001000 2r00010000 |
|
248 |
2r01111000 2r00011110 |
|
249 |
2r01000000 2r00000010 |
|
250 |
2r00100000 2r00000100 |
|
251 |
2r00010000 2r00001000 |
|
252 |
2r00001000 2r00010000 |
|
253 |
2r00000100 2r00100000 |
|
254 |
2r00000010 2r01000000 |
|
255 |
2r00000001 2r10000000 |
|
256 |
2r00000000 2r00000000] |
|
257 |
on:aDevice. |
|
270
aa6a36e199e7
be tolerant in case form creation fails
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
258 |
form isNil ifTrue:[^ nil]. |
657 | 259 |
]. |
1 | 260 |
]. |
38 | 261 |
form := form on:aDevice. |
262 |
||
263 |
" |
|
264 |
remember form for next use |
|
265 |
" |
|
266 |
(aDevice == Display) ifTrue:[ |
|
657 | 267 |
CachedStyle := style. |
268 |
DownArrowForm := form |
|
38 | 269 |
]. |
270 |
||
271 |
^ form |
|
657 | 272 |
|
273 |
"Modified: 20.5.1996 / 10:31:05 / cg" |
|
1 | 274 |
! |
275 |
||
38 | 276 |
leftArrowButtonForm:style on:aDevice |
277 |
"retun the form used for the scrollLeft Button" |
|
278 |
||
59 | 279 |
|form| |
38 | 280 |
|
281 |
" |
|
282 |
use cached form, if device is appropriate |
|
283 |
" |
|
59 | 284 |
CachedStyle ~~ style ifTrue:[ |
657 | 285 |
UpArrowForm := DownArrowForm := LeftArrowForm := RightArrowForm := nil |
59 | 286 |
]. |
287 |
||
38 | 288 |
((aDevice == Display) and:[LeftArrowForm notNil]) ifTrue:[ |
657 | 289 |
^ LeftArrowForm |
38 | 290 |
]. |
291 |
||
154 | 292 |
LeftArrowForm := StyleSheet at:'arrowButtonLeftForm' default:nil. |
293 |
LeftArrowForm notNil ifTrue:[ |
|
657 | 294 |
^ LeftArrowForm |
154 | 295 |
]. |
296 |
||
38 | 297 |
" |
59 | 298 |
special treatment for st80 arrows |
299 |
- they do not really fit into the general (bitmap) scheme ... |
|
300 |
(i.e. they are computed instead of drawn from a bitmap) |
|
38 | 301 |
" |
59 | 302 |
style ~~ #st80 ifTrue:[ |
657 | 303 |
LeftArrowFormFile notNil ifTrue:[ |
304 |
form := Form fromFile:LeftArrowFormFile resolution:100 on:aDevice. |
|
305 |
form isNil ifTrue:[ |
|
306 |
'ARRBUTTON: no bitmapFile: ' infoPrint. LeftArrowFormFile infoPrintCR. |
|
307 |
] |
|
308 |
] |
|
38 | 309 |
]. |
6 | 310 |
|
38 | 311 |
" |
312 |
form to use as a fallback, if no bitmap file is present |
|
313 |
(actually not really needed - just to show something useful, in |
|
314 |
case of a bad installation) |
|
315 |
" |
|
316 |
form isNil ifTrue:[ |
|
657 | 317 |
style == #st80 ifTrue:[ |
318 |
form := Form width:9 height:9 depth:1 on:Display. |
|
270
aa6a36e199e7
be tolerant in case form creation fails
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
319 |
form isNil ifTrue:[^ nil]. |
657 | 320 |
form clear. |
321 |
form lineWidth:2. |
|
322 |
form capStyle:#round. |
|
323 |
form paint:(Color colorId:1). |
|
324 |
form displayLineFromX:6 y:0 toX:2 y:4. |
|
325 |
form displayLineFromX:2 y:4 toX:6 y:8. |
|
326 |
] ifFalse:[ |
|
327 |
form := Form width:16 height:16 |
|
328 |
fromArray:#[2r00000000 2r00000000 |
|
329 |
2r00000001 2r10000000 |
|
330 |
2r00000010 2r10000000 |
|
331 |
2r00000100 2r10000000 |
|
332 |
2r00001000 2r11111110 |
|
333 |
2r00010000 2r00000010 |
|
334 |
2r00100000 2r00000010 |
|
335 |
2r01000000 2r00000010 |
|
336 |
2r01000000 2r00000010 |
|
337 |
2r00100000 2r00000010 |
|
338 |
2r00010000 2r00000010 |
|
339 |
2r00001000 2r11111110 |
|
340 |
2r00000100 2r10000000 |
|
341 |
2r00000010 2r10000000 |
|
342 |
2r00000001 2r10000000 |
|
343 |
2r00000000 2r00000000] |
|
344 |
on:aDevice. |
|
270
aa6a36e199e7
be tolerant in case form creation fails
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
345 |
form isNil ifTrue:[^ nil]. |
657 | 346 |
]. |
1 | 347 |
]. |
38 | 348 |
form := form on:aDevice. |
349 |
||
350 |
" |
|
351 |
remember form for next use |
|
352 |
" |
|
353 |
(aDevice == Display) ifTrue:[ |
|
657 | 354 |
CachedStyle := style. |
355 |
LeftArrowForm := form |
|
38 | 356 |
]. |
357 |
||
358 |
^ form |
|
657 | 359 |
|
360 |
"Modified: 20.5.1996 / 10:31:07 / cg" |
|
1 | 361 |
! |
362 |
||
38 | 363 |
rightArrowButtonForm:style on:aDevice |
364 |
"retun the form used for the scrollRight Button" |
|
365 |
||
59 | 366 |
|form| |
38 | 367 |
|
368 |
" |
|
369 |
use cached form, if device is appropriate |
|
370 |
" |
|
59 | 371 |
CachedStyle ~~ style ifTrue:[ |
657 | 372 |
UpArrowForm := DownArrowForm := LeftArrowForm := RightArrowForm := nil |
59 | 373 |
]. |
374 |
||
38 | 375 |
((aDevice == Display) and:[RightArrowForm notNil]) ifTrue:[ |
657 | 376 |
^ RightArrowForm |
38 | 377 |
]. |
378 |
||
154 | 379 |
RightArrowForm := StyleSheet at:'arrowButtonRightForm' default:nil. |
380 |
RightArrowForm notNil ifTrue:[ |
|
657 | 381 |
^ RightArrowForm |
154 | 382 |
]. |
383 |
||
38 | 384 |
" |
59 | 385 |
special treatment for st80 arrows |
386 |
- they do not really fit into the general (bitmap) scheme ... |
|
387 |
(i.e. they are computed instead of drawn from a bitmap) |
|
38 | 388 |
" |
59 | 389 |
style ~~ #st80 ifTrue:[ |
657 | 390 |
RightArrowFormFile notNil ifTrue:[ |
391 |
form := Form fromFile:RightArrowFormFile resolution:100 on:aDevice. |
|
392 |
form isNil ifTrue:[ |
|
393 |
'ARRBUTTON: no bitmapFile: ' infoPrint. RightArrowFormFile infoPrintCR. |
|
394 |
] |
|
395 |
] |
|
38 | 396 |
]. |
6 | 397 |
|
38 | 398 |
" |
399 |
form to use as a fallback, if no bitmap file is present |
|
400 |
(actually not really needed - just to show something useful, in |
|
401 |
case of a bad installation) |
|
402 |
" |
|
403 |
form isNil ifTrue:[ |
|
657 | 404 |
style == #st80 ifTrue:[ |
405 |
form := Form width:9 height:9 depth:1 on:Display. |
|
270
aa6a36e199e7
be tolerant in case form creation fails
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
406 |
form isNil ifTrue:[^ nil]. |
657 | 407 |
form clear. |
408 |
form lineWidth:2. |
|
409 |
form capStyle:#round. |
|
410 |
form paint:(Color colorId:1). |
|
411 |
form displayLineFromX:2 y:0 toX:6 y:4. |
|
412 |
form displayLineFromX:6 y:4 toX:2 y:8 |
|
413 |
] ifFalse:[ |
|
414 |
form := Form width:16 height:16 |
|
415 |
fromArray:#[2r00000000 2r00000000 |
|
416 |
2r00000001 2r10000000 |
|
417 |
2r00000001 2r01000000 |
|
418 |
2r00000001 2r00100000 |
|
419 |
2r01111111 2r00010000 |
|
420 |
2r01000000 2r00001000 |
|
421 |
2r01000000 2r00000100 |
|
422 |
2r01000000 2r00000010 |
|
423 |
2r01000000 2r00000010 |
|
424 |
2r01000000 2r00000100 |
|
425 |
2r01000000 2r00001000 |
|
426 |
2r01111111 2r00010000 |
|
427 |
2r00000001 2r00100000 |
|
428 |
2r00000001 2r01000000 |
|
429 |
2r00000001 2r10000000 |
|
430 |
2r00000000 2r00000000] |
|
431 |
on:aDevice. |
|
270
aa6a36e199e7
be tolerant in case form creation fails
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
432 |
form isNil ifTrue:[^ nil]. |
657 | 433 |
]. |
1 | 434 |
]. |
38 | 435 |
form := form on:aDevice. |
436 |
||
437 |
" |
|
438 |
remember form for next use |
|
439 |
" |
|
440 |
(aDevice == Display) ifTrue:[ |
|
657 | 441 |
CachedStyle := style. |
442 |
RightArrowForm := form |
|
38 | 443 |
]. |
444 |
||
445 |
^ form |
|
657 | 446 |
|
447 |
"Modified: 20.5.1996 / 10:31:10 / cg" |
|
1 | 448 |
! |
449 |
||
205 | 450 |
upArrowButtonForm:style on:aDevice |
451 |
"return the form used for the scrollUp Button" |
|
452 |
||
453 |
|form| |
|
454 |
||
455 |
" |
|
456 |
use cached form, if device is appropriate |
|
457 |
" |
|
458 |
CachedStyle ~~ style ifTrue:[ |
|
657 | 459 |
UpArrowForm := DownArrowForm := LeftArrowForm := RightArrowForm := nil |
205 | 460 |
]. |
461 |
||
462 |
((aDevice == Display) and:[UpArrowForm notNil]) ifTrue:[ |
|
657 | 463 |
^ UpArrowForm |
205 | 464 |
]. |
465 |
||
466 |
UpArrowForm := StyleSheet at:'arrowButtonUpForm' default:nil. |
|
467 |
UpArrowForm notNil ifTrue:[ |
|
657 | 468 |
^ UpArrowForm |
205 | 469 |
]. |
470 |
||
471 |
" |
|
472 |
special treatment for st80 arrows |
|
473 |
- they do not really fit into the general (bitmap) scheme ... |
|
474 |
(i.e. they are computed instead of drawn from a bitmap) |
|
475 |
" |
|
476 |
style ~~ #st80 ifTrue:[ |
|
657 | 477 |
UpArrowFormFile notNil ifTrue:[ |
478 |
form := Form fromFile:UpArrowFormFile resolution:100 on:aDevice. |
|
479 |
form isNil ifTrue:[ |
|
480 |
'ARRBUTTON: no bitmapFile: ' infoPrint. UpArrowFormFile infoPrintCR. |
|
481 |
] |
|
482 |
] |
|
205 | 483 |
]. |
484 |
||
485 |
" |
|
486 |
form to use as a fallback, if no bitmap file is present |
|
487 |
(actually not really needed - just to show something useful, in |
|
488 |
case of a bad installation) |
|
489 |
" |
|
490 |
form isNil ifTrue:[ |
|
657 | 491 |
style == #st80 ifTrue:[ |
492 |
form := Form width:9 height:9 depth:1 on:aDevice. |
|
270
aa6a36e199e7
be tolerant in case form creation fails
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
493 |
form isNil ifTrue:[^ nil]. |
657 | 494 |
form clear. |
495 |
form lineWidth:2. |
|
496 |
form capStyle:#round. |
|
497 |
form paint:(Color colorId:1). |
|
498 |
form displayLineFromX:0 y:6 toX:4 y:2. |
|
499 |
form displayLineFromX:4 y:2 toX:8 y:6. |
|
500 |
] ifFalse:[ |
|
501 |
form := Form width:16 height:16 |
|
502 |
fromArray:#[2r00000000 2r00000000 |
|
503 |
2r00000001 2r10000000 |
|
504 |
2r00000010 2r01000000 |
|
505 |
2r00000100 2r00100000 |
|
506 |
2r00001000 2r00010000 |
|
507 |
2r00010000 2r00001000 |
|
508 |
2r00100000 2r00000100 |
|
509 |
2r01000000 2r00000010 |
|
510 |
2r01111000 2r00011110 |
|
511 |
2r00001000 2r00010000 |
|
512 |
2r00001000 2r00010000 |
|
513 |
2r00001000 2r00010000 |
|
514 |
2r00001000 2r00010000 |
|
515 |
2r00001000 2r00010000 |
|
516 |
2r00001111 2r11110000 |
|
517 |
2r00000000 2r00000000] |
|
518 |
on:aDevice. |
|
519 |
form isNil ifTrue:[^ nil]. |
|
520 |
]. |
|
205 | 521 |
]. |
522 |
||
523 |
form := form on:aDevice. |
|
524 |
||
525 |
" |
|
526 |
remember form for next use |
|
527 |
" |
|
528 |
(aDevice == Display) ifTrue:[ |
|
657 | 529 |
CachedStyle := style. |
530 |
UpArrowForm := form |
|
205 | 531 |
]. |
532 |
||
533 |
^ form |
|
657 | 534 |
|
535 |
"Modified: 20.5.1996 / 10:31:13 / cg" |
|
1 | 536 |
! |
537 |
||
205 | 538 |
updateStyleCache |
440
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
539 |
"extract values from the styleSheet and cache them in class variables" |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
540 |
|
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
541 |
<resource: #style (#arrowButtonStyle |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
542 |
#arrowButtonActiveLevel #arrowButtonPassiveLevel |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
543 |
#arrowButtonBackgroundColor #arrowButtonForegroundColor |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
544 |
#arrowButtonActiveBackgroundColor #arrowButtonActiveForegroundColor |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
545 |
#arrowButtonEnteredBackgroundColor #arrowButtonEnteredForegroundColor |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
546 |
#arrowButtonDisabledForegroundColor |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
547 |
#arrowButtonDownForm #arrowButtonUpForm |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
548 |
#arrowButtonLeftForm #arrowButtonRightForm |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
549 |
#arrowButtonDownFormFile #arrowButtonUpFormFile |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
550 |
#arrowButtonLeftFormFile #arrowButtonRightFormFile)> |
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
551 |
|
205 | 552 |
DefaultArrowStyle := StyleSheet at:'arrowButtonStyle' default:StyleSheet name. |
553 |
DefaultArrowStyle := DefaultArrowStyle asSymbol. |
|
554 |
||
555 |
DefaultArrowButtonActiveLevel := StyleSheet at:'arrowButtonActiveLevel' default:nil. |
|
556 |
DefaultArrowButtonPassiveLevel := StyleSheet at:'arrowButtonPassiveLevel' default:nil. |
|
557 |
||
558 |
DefaultBackgroundColor := StyleSheet colorAt:'arrowButtonBackgroundColor'. |
|
559 |
DefaultForegroundColor := StyleSheet colorAt:'arrowButtonForegroundColor'. |
|
560 |
DefaultActiveBackgroundColor := StyleSheet colorAt:'arrowButtonActiveBackgroundColor'. |
|
561 |
DefaultActiveForegroundColor := StyleSheet colorAt:'arrowButtonActiveForegroundColor'. |
|
562 |
DefaultEnteredBackgroundColor := StyleSheet colorAt:'arrowButtonEnteredBackgroundColor'. |
|
563 |
DefaultEnteredForegroundColor := StyleSheet colorAt:'arrowButtonEnteredForegroundColor'. |
|
564 |
DefaultDisabledForegroundColor := StyleSheet colorAt:'arrowButtonDisabledForegroundColor'. |
|
565 |
||
566 |
DownArrowForm := StyleSheet at:'arrowButtonDownForm' default:nil. |
|
567 |
UpArrowForm := StyleSheet at:'arrowButtonUpForm' default:nil. |
|
568 |
LeftArrowForm := StyleSheet at:'arrowButtonLeftForm' default:nil. |
|
569 |
RightArrowForm := StyleSheet at:'arrowButtonRightForm' default:nil. |
|
1 | 570 |
|
205 | 571 |
UpArrowFormFile := DownArrowFormFile := LeftArrowFormFile := RightArrowFormFile := nil. |
572 |
UpArrowForm isNil ifTrue:[ |
|
440
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
573 |
UpArrowFormFile := StyleSheet at:'arrowButtonUpFormFile' default:'ScrollUp.xbm'. |
205 | 574 |
]. |
575 |
DownArrowForm isNil ifTrue:[ |
|
440
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
576 |
DownArrowFormFile := StyleSheet at:'arrowButtonDownFormFile' default:'ScrollDn.xbm'. |
205 | 577 |
]. |
578 |
LeftArrowForm isNil ifTrue:[ |
|
440
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
579 |
LeftArrowFormFile := StyleSheet at:'arrowButtonLeftFormFile' default:'ScrollLt.xbm'. |
205 | 580 |
]. |
581 |
RightArrowForm isNil ifTrue:[ |
|
440
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
582 |
RightArrowFormFile := StyleSheet at:'arrowButtonRightFormFile' default:'ScrollRt.xbm'. |
205 | 583 |
]. |
584 |
||
585 |
" |
|
586 |
self updateStyleCache |
|
587 |
" |
|
588 |
||
589 |
"Modified: 31.8.1995 / 03:01:14 / claus" |
|
440
2beb33cb0146
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
590 |
"Modified: 1.3.1996 / 13:45:57 / cg" |
1 | 591 |
! ! |
592 |
||
593 |
!ArrowButton methodsFor:'accessing'! |
|
594 |
||
595 |
direction:aDirectionSymbol |
|
6 | 596 |
|form| |
597 |
||
1 | 598 |
aDirectionSymbol == #up ifTrue:[ |
62 | 599 |
form := (self class upArrowButtonForm:arrowStyle on:device). |
600 |
name := 'upButton'. |
|
1 | 601 |
]. |
602 |
aDirectionSymbol == #down ifTrue:[ |
|
62 | 603 |
form := (self class downArrowButtonForm:arrowStyle on:device). |
604 |
name := 'downButton'. |
|
1 | 605 |
]. |
606 |
aDirectionSymbol == #left ifTrue:[ |
|
62 | 607 |
form := (self class leftArrowButtonForm:arrowStyle on:device). |
608 |
name := 'leftButton'. |
|
1 | 609 |
]. |
610 |
aDirectionSymbol == #right ifTrue:[ |
|
62 | 611 |
form := (self class rightArrowButtonForm:arrowStyle on:device). |
612 |
name := 'rightButton'. |
|
1 | 613 |
]. |
6 | 614 |
self form:form |
1 | 615 |
! ! |
616 |
||
617 |
!ArrowButton methodsFor:'initialization'! |
|
618 |
||
619 |
initStyle |
|
620 |
super initStyle. |
|
59 | 621 |
|
60 | 622 |
DefaultBackgroundColor notNil ifTrue:[ |
623 |
bgColor := DefaultBackgroundColor on:device |
|
624 |
]. |
|
625 |
DefaultForegroundColor notNil ifTrue:[ |
|
626 |
fgColor := DefaultForegroundColor on:device |
|
627 |
]. |
|
59 | 628 |
DefaultActiveForegroundColor notNil ifTrue:[ |
629 |
activeFgColor := DefaultActiveForegroundColor on:device |
|
630 |
]. |
|
631 |
DefaultActiveBackgroundColor notNil ifTrue:[ |
|
632 |
activeBgColor := DefaultActiveBackgroundColor on:device |
|
633 |
]. |
|
634 |
DefaultEnteredForegroundColor notNil ifTrue:[ |
|
635 |
enteredFgColor := DefaultEnteredForegroundColor on:device |
|
636 |
]. |
|
637 |
DefaultEnteredBackgroundColor notNil ifTrue:[ |
|
638 |
enteredBgColor := DefaultEnteredBackgroundColor on:device |
|
639 |
]. |
|
153 | 640 |
DefaultDisabledForegroundColor notNil ifTrue:[ |
641 |
disabledFgColor := DefaultDisabledForegroundColor on:device |
|
642 |
]. |
|
643 |
||
59 | 644 |
arrowStyle := DefaultArrowStyle. |
645 |
||
128 | 646 |
DefaultArrowButtonActiveLevel notNil ifTrue:[onLevel := DefaultArrowButtonActiveLevel]. |
647 |
DefaultArrowButtonPassiveLevel notNil ifTrue:[offLevel := DefaultArrowButtonPassiveLevel]. |
|
648 |
offLevel ~~ level ifTrue:[self level:offLevel]. |
|
649 |
||
650 |
"/ " |
|
651 |
"/ special treatment for motif arrows |
|
652 |
"/ - they do not really fit into the general (bitmap) scheme ... |
|
653 |
"/ " |
|
654 |
"/ arrowStyle == #motif ifTrue:[ |
|
655 |
"/ onLevel := 0. |
|
656 |
"/ offLevel := 0. |
|
657 |
"/ self level:0. |
|
658 |
"/ ] |
|
205 | 659 |
! |
660 |
||
661 |
initialize |
|
662 |
super initialize. |
|
663 |
controller beTriggerOnDown. |
|
1 | 664 |
! ! |
665 |
||
6 | 666 |
!ArrowButton methodsFor:'redrawing'! |
667 |
||
668 |
drawWith:fg and:bg |
|
669 |
"this is a q&d hack for motif ..." |
|
670 |
||
155 | 671 |
|topLeft botRight noColor allColor isString orgX orgY r| |
6 | 672 |
|
59 | 673 |
arrowStyle ~~ #motif ifTrue:[ |
765
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
674 |
^ super drawWith:fg and:bg. |
6 | 675 |
]. |
676 |
||
59 | 677 |
" |
678 |
the code below does a lot of bitmap drawing, but allows |
|
679 |
to 3D-ify any logo (it draws it displaced by some pixels |
|
680 |
to the upper left in one-color and displaced to the |
|
60 | 681 |
lower right in the other color). It should be rewritten to |
682 |
cache the result for later drawing operations. |
|
59 | 683 |
" |
6 | 684 |
logo notNil ifTrue:[ |
765
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
685 |
self paint:bg. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
686 |
self fillRectangleX:0 y:0 width:width height:height. |
6 | 687 |
|
765
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
688 |
shadowColor := shadowColor on:device. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
689 |
lightColor := lightColor on:device. |
153 | 690 |
|
765
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
691 |
controller pressed ifTrue:[ |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
692 |
topLeft := shadowColor. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
693 |
botRight := lightColor |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
694 |
] ifFalse:[ |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
695 |
topLeft := lightColor. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
696 |
botRight := shadowColor |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
697 |
]. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
698 |
|
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
699 |
isString := logo isString. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
700 |
|
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
701 |
isString ifFalse:[ |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
702 |
logo depth ~~ 1 ifTrue:[ |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
703 |
"/ allow for deep logos (for motif) |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
704 |
"/ one catch: if the view background is a complex pixmap |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
705 |
"/ we cannot use this as colorMap entry. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
706 |
"/ therefore, compute their average colors and take these |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
707 |
"/ (this looks ok for buttons ...) |
38 | 708 |
|
765
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
709 |
logo device ~~ device ifTrue:[ |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
710 |
'deep logo: ' print. logo depth printCR. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
711 |
r := (0@0 corner:10@10). |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
712 |
logo colorMap:(Array with:(bg averageColorIn:r) |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
713 |
with:(topLeft averageColorIn:r) |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
714 |
with:(botRight averageColorIn:r) |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
715 |
with:(fg averageColorIn:r)). |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
716 |
logo photometric:#palette. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
717 |
logo := logo on:device. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
718 |
]. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
719 |
self displayForm:logo x:labelOriginX y:labelOriginY. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
720 |
^ self |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
721 |
] |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
722 |
]. |
6 | 723 |
|
765
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
724 |
noColor := Color noColor. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
725 |
allColor := Color allColor. |
6 | 726 |
|
765
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
727 |
isString ifTrue:[ |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
728 |
orgY := height - font height // 2 + font ascent. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
729 |
orgX := width - labelOriginX // 4 - 1. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
730 |
]. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
731 |
self paint:topLeft. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
732 |
#(-1 0 -1) with:#(-1 -1 0) do:[:dX :dY | |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
733 |
isString ifTrue:[ |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
734 |
self displayString:logo x:orgX+dX y:orgY+dY. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
735 |
] ifFalse:[ |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
736 |
self displayForm:logo x:labelOriginX+dX y:labelOriginY+dY. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
737 |
] |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
738 |
]. |
6 | 739 |
|
765
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
740 |
self paint:botRight. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
741 |
#(1 1 0) with:#(0 1 1) do:[:dX :dY | |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
742 |
isString ifTrue:[ |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
743 |
self displayString:logo x:orgX+dX y:orgY+dY. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
744 |
] ifFalse:[ |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
745 |
self displayForm:logo x:labelOriginX+dX y:labelOriginY+dY. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
746 |
] |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
747 |
]. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
748 |
|
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
749 |
" |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
750 |
finally, the form itself |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
751 |
" |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
752 |
self paint:fg. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
753 |
isString ifTrue:[ |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
754 |
self displayString:logo x:orgX y:orgY. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
755 |
] ifFalse:[ |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
756 |
self displayForm:logo x:labelOriginX y:labelOriginY. |
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
757 |
] |
6 | 758 |
] |
153 | 759 |
|
760 |
"Modified: 31.8.1995 / 03:03:12 / claus" |
|
765
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
761 |
"Modified: 14.6.1996 / 15:48:11 / cg" |
6 | 762 |
! ! |
205 | 763 |
|
764 |
!ArrowButton class methodsFor:'documentation'! |
|
765 |
||
766 |
version |
|
765
ea6ecf2a5b30
keep deep device image cached
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
767 |
^ '$Header: /cvs/stx/stx/libwidg/ArrowButton.st,v 1.26 1996-06-14 14:16:05 cg Exp $' |
205 | 768 |
! ! |