author | Claus Gittinger <cg@exept.de> |
Tue, 05 Mar 2019 23:21:10 +0100 | |
changeset 6028 | e2b64ee3f94e |
parent 5988 | 724556a52a4b |
child 6057 | 8c54bab4666f |
permissions | -rw-r--r-- |
5478 | 1 |
" |
2 |
COPYRIGHT (c) 2009 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
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 |
" |
|
3650 | 12 |
"{ Package: 'stx:libwidg2' }" |
13 |
||
4985 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
3650 | 16 |
Button subclass:#LinkButton |
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
17 |
instanceVariableNames:'labelsAndActions' |
3662 | 18 |
classVariableNames:'DefaultLinkColor' |
3650 | 19 |
poolDictionaries:'' |
20 |
category:'Views-Layout' |
|
21 |
! |
|
22 |
||
23 |
!LinkButton class methodsFor:'documentation'! |
|
24 |
||
5478 | 25 |
copyright |
26 |
" |
|
27 |
COPYRIGHT (c) 2009 by Claus Gittinger |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
3650 | 39 |
documentation |
40 |
" |
|
41 |
Looks like a Label, but behaves like a button with individually clickable text components. |
|
5045 | 42 |
Can be used to create html-page-look-alike links in a view, |
5110 | 43 |
especially to make label-looking action buttons (as in the browser's info view). |
3650 | 44 |
|
45 |
[author:] |
|
46 |
cg (cg@CG-VOSTRO) |
|
47 |
||
48 |
[instance variables:] |
|
49 |
||
50 |
[class variables:] |
|
51 |
||
52 |
[see also:] |
|
53 |
||
54 |
" |
|
55 |
! |
|
56 |
||
57 |
examples |
|
58 |
" |
|
4071 | 59 |
[exBegin] |
3650 | 60 |
|v l| |
61 |
||
62 |
v := StandardSystemView new. |
|
63 |
l := LinkButton in:v. |
|
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
64 |
l label: |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
65 |
(('Hello' actionForAll:[ Transcript showCR:'Hello Clicked']) |
4071 | 66 |
, ' ' |
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
67 |
, ('World' actionForAll:[ Transcript showCR:'World Clicked'])). |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
68 |
|
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
69 |
v open |
4071 | 70 |
[exEnd] |
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
71 |
|
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
72 |
|
4071 | 73 |
[exBegin] |
74 |
|v l| |
|
75 |
||
76 |
v := StandardSystemView new. |
|
77 |
l := LinkButton in:v. |
|
78 |
l label: |
|
79 |
((('Hello' actionForAll:[ Transcript showCR:'Hello Clicked']) colorizeAllWith:(Color blue)) |
|
80 |
, ' ' |
|
81 |
, ('World' actionForAll:[ Transcript showCR:'World Clicked'])). |
|
82 |
||
83 |
v open |
|
84 |
[exEnd] |
|
85 |
||
86 |
||
87 |
[exBegin] |
|
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
88 |
|v l| |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
89 |
|
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
90 |
v := StandardSystemView new. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
91 |
l := LinkButton in:v. |
3650 | 92 |
l labelsAndActions:{ |
3662 | 93 |
'Hello' -> [ Transcript showCR:'Hello Clicked']. |
3650 | 94 |
' ' -> nil. |
3662 | 95 |
'World' -> [ Transcript showCR:'World Clicked']. |
3650 | 96 |
}. |
97 |
l foregroundColor:Color blue. |
|
98 |
v open |
|
4071 | 99 |
[exEnd] |
3668 | 100 |
|
101 |
||
4071 | 102 |
[exBegin] |
3668 | 103 |
|v l| |
104 |
||
105 |
v := StandardSystemView new. |
|
106 |
l := LinkButton in:v. |
|
107 |
l labelsAndActions:{ |
|
108 |
'Hello' -> nil. |
|
109 |
' ' -> nil. |
|
110 |
'World' -> [ Transcript showCR:'World Clicked']. |
|
111 |
}. |
|
112 |
l foregroundColor:Color blue. |
|
113 |
v open |
|
4071 | 114 |
[exEnd] |
4985 | 115 |
Dialog aboutToOpenBoxNotificationSignal handle:[:ex | |
116 |
|lbl| |
|
117 |
||
118 |
lbl := LinkButton label:(('XXX' |
|
119 |
colorizeAllWith:Color blue) |
|
120 |
actionForAll:[ Transcript showCR:'xxx' ]). |
|
121 |
ex box verticalPanel addComponent:lbl. |
|
122 |
] do:[ |
|
123 |
self warn:'Bla bla bla' |
|
124 |
]. |
|
125 |
||
3650 | 126 |
" |
127 |
! ! |
|
128 |
||
3662 | 129 |
!LinkButton class methodsFor:'defaults'! |
130 |
||
131 |
updateStyleCache |
|
132 |
"extract values from the styleSheet and cache them in class variables" |
|
133 |
||
134 |
<resource: #style ( #'linkButton.linkColor' )> |
|
135 |
||
136 |
DefaultLinkColor := StyleSheet colorAt:#'linkButton.linkColor' default:Color blue. |
|
137 |
! ! |
|
138 |
||
3650 | 139 |
!LinkButton methodsFor:'accessing'! |
140 |
||
5110 | 141 |
actionAt:aPoint |
5111 | 142 |
|pressAction emphasis pointInLabel| |
5110 | 143 |
|
5988 | 144 |
self enabled ifFalse:[ |
145 |
^ nil |
|
146 |
]. |
|
147 |
||
5110 | 148 |
pressAction := self pressAction ifNil:[ self releaseAction ]. |
149 |
pressAction isNil ifTrue:[ |
|
150 |
pressAction := self pressChannel ifNil:[ self releaseChannel ]. |
|
151 |
]. |
|
152 |
labelsAndActions isNil ifTrue:[ |
|
153 |
"take action from logo, which is normally a text with an action-emphasis" |
|
154 |
logo notNil ifTrue:[ |
|
5111 | 155 |
pointInLabel := (aPoint - (labelOriginX@labelOriginY)). |
156 |
logo isStringCollection ifTrue:[ |
|
157 |
|lineIndex line pointInLine| |
|
158 |
||
159 |
lineIndex := (pointInLabel y // self font height) + 1. |
|
160 |
line := logo at:lineIndex ifAbsent:nil. |
|
161 |
line notNil ifTrue:[ |
|
162 |
pointInLine := pointInLabel - (0 @ ((lineIndex - 1) * self font height)). |
|
163 |
emphasis := line emphasisAtPoint:pointInLine on:self. |
|
164 |
]. |
|
165 |
] ifFalse:[ |
|
166 |
emphasis := logo emphasisAtPoint:pointInLabel on:self. |
|
167 |
]. |
|
5110 | 168 |
(emphasis isNil or:[emphasis isSymbol]) ifTrue:[ |
169 |
^ pressAction. |
|
170 |
]. |
|
171 |
emphasis isAssociation ifTrue:[ |
|
172 |
emphasis key == #actionBlock ifTrue:[ |
|
173 |
^ emphasis value. |
|
174 |
]. |
|
175 |
^ pressAction. |
|
176 |
]. |
|
177 |
emphasis do:[:eachElement| |
|
178 |
eachElement isAssociation ifTrue:[ |
|
179 |
eachElement key == #actionBlock ifTrue:[ |
|
180 |
^ eachElement value. |
|
181 |
]. |
|
182 |
]. |
|
183 |
]. |
|
184 |
]. |
|
185 |
^ pressAction. |
|
186 |
]. |
|
187 |
||
188 |
self labelsAndActionsWithPositionsDo:[:lbl :action :leftX :rightX | |
|
189 |
(aPoint x between:leftX and:rightX) ifTrue:[ |
|
190 |
^ labelsAndActions notNil ifTrue:action ifFalse:pressAction |
|
191 |
]. |
|
192 |
]. |
|
193 |
^ nil |
|
5988 | 194 |
|
195 |
"Modified: / 30-01-2019 / 15:42:31 / sr" |
|
5110 | 196 |
! |
197 |
||
3650 | 198 |
labelsAndActions |
199 |
"returns the collection of label->action associations. |
|
200 |
For display, the label strings are drawn as one concatenated string (add separating spaces, if you have to). |
|
201 |
When clicked on a string, the corresponding action is called" |
|
202 |
||
203 |
^ labelsAndActions |
|
204 |
! |
|
205 |
||
206 |
labelsAndActions:aCollectionOfAssociations |
|
207 |
"set the collection of label->action associations. |
|
208 |
For display, the label strings are drawn as one concatenated string (add separating spaces, if you have to). |
|
209 |
When clicked on a string, the corresponding action is called" |
|
210 |
||
211 |
labelsAndActions := aCollectionOfAssociations. |
|
212 |
self label:((aCollectionOfAssociations collect:[:assoc | assoc key]) asStringWith:'') |
|
5045 | 213 |
! |
214 |
||
215 |
level:anInteger |
|
216 |
enterLevel := leaveLevel := onLevel := offLevel := level := anInteger. |
|
217 |
margin := level abs. |
|
3650 | 218 |
! ! |
219 |
||
220 |
!LinkButton methodsFor:'initialization'! |
|
221 |
||
4677 | 222 |
allViewBackground:something if:condition |
223 |
"set the viewBackground to something, a color, image or form, |
|
224 |
in myself and recursively in all of my subviews" |
|
225 |
||
226 |
self viewBackground:something if:condition. |
|
227 |
self backgroundColor:something. |
|
228 |
! |
|
229 |
||
3650 | 230 |
defaultControllerClass |
231 |
^ LinkButtonController |
|
3662 | 232 |
! |
233 |
||
234 |
initStyle |
|
235 |
super initStyle. |
|
236 |
||
237 |
level := enterLevel := leaveLevel := onLevel := offLevel := 0. |
|
4681 | 238 |
self borderWidth: 0. |
3662 | 239 |
DefaultLinkColor notNil ifTrue:[ |
4508 | 240 |
|color| |
4987 | 241 |
self paint:(color := DefaultLinkColor onDevice:device). |
4508 | 242 |
self foreground:color. |
3662 | 243 |
]. |
4681 | 244 |
enteredFgColor := nil. |
245 |
enteredBgColor := nil. |
|
4071 | 246 |
|
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
247 |
"/ activeFgColor := enteredFgColor := foreground. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
248 |
"/ activeBgColor := enteredBgColor := viewBackground. |
4071 | 249 |
|
250 |
"Modified: / 07-09-2011 / 04:29:29 / cg" |
|
3662 | 251 |
! |
252 |
||
253 |
initialize |
|
254 |
super initialize. |
|
255 |
self enableMotionEvents |
|
256 |
! ! |
|
257 |
||
5110 | 258 |
!LinkButton methodsFor:'private'! |
3662 | 259 |
|
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
260 |
actionEmphasisIn:aText atPoint:aPoint |
5605 | 261 |
"check for an actionBlock-emphasis in aText at aPoint. |
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
262 |
Answer an Array with the whole emphasis and the actionBlock, |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
263 |
or nil" |
5605 | 264 |
|
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
265 |
|emphasis| |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
266 |
|
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
267 |
emphasis := aText emphasisAtPoint:aPoint on:self. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
268 |
(emphasis isNil or:[emphasis isSymbol]) ifTrue:[ |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
269 |
^ #(nil nil). |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
270 |
]. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
271 |
emphasis isAssociation ifTrue:[ |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
272 |
emphasis key == #actionBlock ifTrue:[ |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
273 |
^ Array with:emphasis with:emphasis value. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
274 |
]. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
275 |
^ #(nil nil). |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
276 |
]. |
5605 | 277 |
emphasis do:[:eachElement| |
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
278 |
eachElement isAssociation ifTrue:[ |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
279 |
eachElement key == #actionBlock ifTrue:[ |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
280 |
^ Array with:emphasis with:eachElement value. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
281 |
]. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
282 |
]. |
5605 | 283 |
]. |
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
284 |
^ #(nil nil). |
5605 | 285 |
|
286 |
"Modified: / 13-09-2017 / 18:14:58 / mawalch" |
|
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
287 |
! |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
288 |
|
5110 | 289 |
labelsAndActionsWithPositionsDo:aFourArgBlock |
290 |
|leftX rightX w| |
|
291 |
||
292 |
leftX := labelOriginX. |
|
293 |
labelsAndActions isNil ifTrue:[ |
|
294 |
w := (self font widthOf:logo on:device). |
|
295 |
rightX := leftX + w-1. |
|
296 |
aFourArgBlock |
|
297 |
value:logo |
|
298 |
value:self pressAction |
|
299 |
value:leftX |
|
300 |
value:rightX. |
|
301 |
^ self |
|
302 |
]. |
|
303 |
||
304 |
labelsAndActions do:[:assoc | |
|
305 |
|lbl wEach| |
|
306 |
||
307 |
lbl := assoc key. |
|
308 |
wEach := (self font widthOf:lbl on:device). |
|
309 |
rightX := leftX + wEach-1. |
|
310 |
aFourArgBlock |
|
311 |
value:assoc key |
|
312 |
value:assoc value |
|
313 |
value:leftX |
|
314 |
value:rightX. |
|
315 |
||
316 |
leftX := rightX+1. |
|
317 |
]. |
|
318 |
^ nil |
|
319 |
! ! |
|
320 |
||
321 |
!LinkButton methodsFor:'redrawing'! |
|
322 |
||
4680 | 323 |
drawFocusFrame |
324 |
"/ intentionally ignored |
|
325 |
^ self |
|
326 |
! |
|
327 |
||
3662 | 328 |
drawStringLogo:aString x:x y:y |
5045 | 329 |
"redefined to draw any anchor under the mouse pointer with an underlined emphasis" |
3662 | 330 |
|
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
331 |
|str entered mousePoint start len emphasis| |
3662 | 332 |
|
333 |
mousePoint := controller lastMousePoint. |
|
334 |
entered := controller entered. |
|
335 |
||
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
336 |
labelsAndActions isNil ifTrue:[ |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
337 |
(entered not or:[mousePoint isNil]) ifTrue:[ |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
338 |
self displayString:aString x:x y:y. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
339 |
^ self. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
340 |
]. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
341 |
|
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
342 |
str := aString. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
343 |
emphasis := (self actionEmphasisIn:aString atPoint:mousePoint) first. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
344 |
emphasis notNil ifTrue:[ |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
345 |
start := 1. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
346 |
aString emphasisCollection runsDo:[:eachLen :eachEmphasis| |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
347 |
len isNil ifTrue:[ |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
348 |
eachEmphasis == emphasis ifTrue:[ |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
349 |
len := eachLen. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
350 |
] ifFalse:[ |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
351 |
start := start + eachLen. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
352 |
]. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
353 |
]. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
354 |
]. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
355 |
len notNil ifTrue:[ |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
356 |
str := str deepCopy. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
357 |
str emphasisFrom:start to:start+len-1 add:#underline. |
4071 | 358 |
"/ str emphasisFrom:start to:start+len-1 add:(#color -> foreground). |
3670
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
359 |
]. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
360 |
]. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
361 |
self displayString:str x:x y:y. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
362 |
^ self. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
363 |
]. |
ccfd04be9736
Now works with Text/actionBlocks
Stefan Vogel <sv@exept.de>
parents:
3668
diff
changeset
|
364 |
|
3662 | 365 |
self labelsAndActionsWithPositionsDo:[:lbl :action :leftX :rightX | |
366 |
|l| |
|
3668 | 367 |
|
3662 | 368 |
l := lbl. |
3668 | 369 |
action notNil ifTrue:[ |
370 |
(entered and:[mousePoint notNil and:[mousePoint x between:leftX and:rightX]]) ifTrue:[ |
|
371 |
l := l allUnderlined |
|
372 |
]. |
|
3662 | 373 |
]. |
374 |
self displayString:l x:leftX y:y. |
|
375 |
]. |
|
4071 | 376 |
|
377 |
"Modified: / 07-09-2011 / 04:47:13 / cg" |
|
3662 | 378 |
! |
379 |
||
4681 | 380 |
is3D |
381 |
^ false. |
|
3650 | 382 |
! ! |
383 |
||
384 |
!LinkButton class methodsFor:'documentation'! |
|
385 |
||
386 |
version |
|
4985 | 387 |
^ '$Header$' |
4681 | 388 |
! |
389 |
||
390 |
version_CVS |
|
4985 | 391 |
^ '$Header$' |
3650 | 392 |
! ! |
4508 | 393 |