author | Claus Gittinger <cg@exept.de> |
Thu, 20 Feb 2020 09:46:13 +0100 | |
changeset 3859 | 18cd7c43d15e |
parent 3673 | b7e9a220c733 |
permissions | -rw-r--r-- |
2587 | 1 |
" |
2 |
COPYRIGHT (c) 2008 by eXept Software AG |
|
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 |
" |
|
2300 | 12 |
"{ Package: 'stx:libtool2' }" |
13 |
||
3212
c973eab410cb
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
14 |
"{ NameSpace: Smalltalk }" |
c973eab410cb
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
15 |
|
2300 | 16 |
FlyByHelp subclass:#FlyByWindowInformation |
3583 | 17 |
instanceVariableNames:'lastApplication lastView cleanupAction finishSemaphore finished |
18 |
toBrowseAction' |
|
2300 | 19 |
classVariableNames:'' |
20 |
poolDictionaries:'' |
|
21 |
category:'Interface-Help' |
|
22 |
! |
|
23 |
||
24 |
!FlyByWindowInformation class methodsFor:'documentation'! |
|
25 |
||
2587 | 26 |
copyright |
27 |
" |
|
28 |
COPYRIGHT (c) 2008 by eXept Software AG |
|
29 |
All Rights Reserved |
|
30 |
||
31 |
This software is furnished under a license and may be used |
|
32 |
only in accordance with the terms of that license and with the |
|
33 |
inclusion of the above copyright notice. This software may not |
|
34 |
be provided or otherwise made available to, or used by, any |
|
35 |
other person. No title to or ownership of the software is |
|
36 |
hereby transferred. |
|
37 |
" |
|
38 |
! |
|
39 |
||
3065
311d632319d9
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3058
diff
changeset
|
40 |
documentation |
311d632319d9
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3058
diff
changeset
|
41 |
" |
311d632319d9
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3058
diff
changeset
|
42 |
I implement a tooltip, which presents a number of interesting facts |
311d632319d9
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3058
diff
changeset
|
43 |
about the window under the mouse pointer, and also offer keyboard |
311d632319d9
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3058
diff
changeset
|
44 |
shortcuts to quickly open browsers and/or inspectors on the view under the |
311d632319d9
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3058
diff
changeset
|
45 |
pointer. |
311d632319d9
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3058
diff
changeset
|
46 |
Enabled via the Launcher's 'FlyBy Window Information' menu item. |
311d632319d9
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3058
diff
changeset
|
47 |
" |
311d632319d9
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3058
diff
changeset
|
48 |
! |
311d632319d9
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3058
diff
changeset
|
49 |
|
2300 | 50 |
examples |
51 |
" |
|
52 |
self shownInformationOfViewUnderMouseUntilButtonIsPressed |
|
53 |
" |
|
54 |
! |
|
55 |
||
56 |
shownInformationOfViewUnderMouseUntilButtonIsPressed |
|
57 |
self start waitUntilFinished |
|
58 |
||
59 |
" |
|
60 |
self shownInformationOfViewUnderMouseUntilButtonIsPressed |
|
61 |
" |
|
62 |
! ! |
|
63 |
||
64 |
!FlyByWindowInformation methodsFor:'accessing'! |
|
65 |
||
2699 | 66 |
cleanupAction:something |
2300 | 67 |
cleanupAction := something. |
68 |
! |
|
69 |
||
70 |
lastApplication |
|
71 |
^ lastApplication |
|
72 |
! |
|
73 |
||
74 |
lastView |
|
75 |
^ lastView |
|
76 |
! ! |
|
77 |
||
2543 | 78 |
!FlyByWindowInformation methodsFor:'defaults'! |
79 |
||
80 |
flyByHelpTimeoutMillis |
|
81 |
^ 1000 |
|
82 |
! ! |
|
83 |
||
2300 | 84 |
!FlyByWindowInformation methodsFor:'event handling'! |
85 |
||
2340 | 86 |
buttonMotion:buttonAndModifierState x:x y:y view:aView |
3452 | 87 |
finished == true ifTrue:[^ true]. |
2702 | 88 |
|
2340 | 89 |
super buttonMotion:buttonAndModifierState x:x y:y view:aView. |
2300 | 90 |
^ true |
3452 | 91 |
|
92 |
"Modified: / 16-07-2017 / 13:49:57 / cg" |
|
2300 | 93 |
! |
94 |
||
95 |
buttonPress:button x:x y:y view:aView |
|
96 |
self stop. |
|
97 |
^ true |
|
98 |
! |
|
99 |
||
100 |
keyPress:key x:x y:y view:aView |
|
2943
e7d181ac8f06
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
101 |
<resource: #keyboard (#Escape #Return)> |
e7d181ac8f06
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
102 |
|
2823 | 103 |
|obj objToInspect objToBrowse lcKey| |
2300 | 104 |
|
105 |
key == #Escape ifTrue:[ |
|
106 |
self stop. |
|
107 |
^ true |
|
108 |
]. |
|
109 |
||
2435 | 110 |
key == $? ifTrue:[ |
111 |
[ |
|
2836
a2e82ebd3bc3
changed: #keyPress:x:y:view: check if WindowTreeView class is present
Stefan Vogel <sv@exept.de>
parents:
2824
diff
changeset
|
112 |
WindowTreeView notNil ifTrue:[ |
a2e82ebd3bc3
changed: #keyPress:x:y:view: check if WindowTreeView class is present
Stefan Vogel <sv@exept.de>
parents:
2824
diff
changeset
|
113 |
WindowTreeView openOn:(lastView topView) initialSelection:lastView. |
a2e82ebd3bc3
changed: #keyPress:x:y:view: check if WindowTreeView class is present
Stefan Vogel <sv@exept.de>
parents:
2824
diff
changeset
|
114 |
] ifFalse:[ |
a2e82ebd3bc3
changed: #keyPress:x:y:view: check if WindowTreeView class is present
Stefan Vogel <sv@exept.de>
parents:
2824
diff
changeset
|
115 |
self warn:'WindowTreeView class is not present!!'. |
a2e82ebd3bc3
changed: #keyPress:x:y:view: check if WindowTreeView class is present
Stefan Vogel <sv@exept.de>
parents:
2824
diff
changeset
|
116 |
]. |
2435 | 117 |
] fork. |
118 |
self stop. |
|
119 |
^ true. |
|
2300 | 120 |
]. |
2435 | 121 |
|
2823 | 122 |
key == #Return ifTrue:[ |
123 |
objToBrowse := lastApplication ? lastView |
|
124 |
]. |
|
125 |
||
2435 | 126 |
key isCharacter ifTrue:[ |
127 |
lcKey := key asLowercase. |
|
128 |
||
3212
c973eab410cb
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
129 |
lcKey == $h ifTrue:[ |
c973eab410cb
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
130 |
"/ use smalltalk at, to avoid dependency on libTool |
c973eab410cb
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
131 |
[ (Smalltalk at:#'Tools::ViewTreeInspectorApplication') openOn:lastView ] fork. |
c973eab410cb
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
132 |
^ true. |
c973eab410cb
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
133 |
]. |
2435 | 134 |
lcKey == $a ifTrue:[ |
135 |
obj := lastApplication |
|
136 |
]. |
|
137 |
lcKey == $o ifTrue:[ |
|
2824 | 138 |
lastView notNil ifTrue:[ |
139 |
obj := lastView model |
|
140 |
]. |
|
2435 | 141 |
]. |
142 |
lcKey == $m ifTrue:[ |
|
2824 | 143 |
lastApplication notNil ifTrue:[ |
144 |
obj := lastApplication masterApplication |
|
145 |
] |
|
146 |
]. |
|
147 |
lcKey == $t ifTrue:[ |
|
148 |
lastApplication notNil ifTrue:[ |
|
149 |
obj := lastApplication topApplication |
|
150 |
]. |
|
2300 | 151 |
]. |
2435 | 152 |
lcKey == $v ifTrue:[ |
153 |
obj := lastView |
|
154 |
]. |
|
2939 | 155 |
lcKey == $g ifTrue:[ |
156 |
obj := lastView windowGroup |
|
157 |
]. |
|
2824 | 158 |
lcKey == $w ifTrue:[ |
159 |
lastView notNil ifTrue:[ |
|
160 |
obj := lastView topView |
|
161 |
] |
|
2435 | 162 |
]. |
3583 | 163 |
lcKey == $u ifTrue:[ |
164 |
toBrowseAction notNil ifTrue:[ |
|
165 |
toBrowseAction value:(SystemBrowser default) |
|
166 |
]. |
|
167 |
]. |
|
168 |
||
2435 | 169 |
obj notNil ifTrue:[ |
170 |
key isLowercase ifTrue:[ |
|
2823 | 171 |
objToInspect := obj |
2435 | 172 |
] ifFalse:[ |
2823 | 173 |
objToBrowse := obj |
2435 | 174 |
]. |
175 |
]. |
|
2300 | 176 |
]. |
177 |
||
2823 | 178 |
objToInspect notNil ifTrue:[ |
179 |
[ objToInspect inspect ] forkAt:(Processor userSchedulingPriority). |
|
180 |
]. |
|
181 |
objToBrowse notNil ifTrue:[ |
|
182 |
[ objToBrowse browse ] forkAt:(Processor userSchedulingPriority). |
|
183 |
]. |
|
184 |
||
2300 | 185 |
^ true |
2823 | 186 |
|
2824 | 187 |
"Modified: / 12-11-2010 / 11:51:04 / cg" |
3583 | 188 |
"Modified: / 01-08-2018 / 07:42:15 / Claus Gittinger" |
2300 | 189 |
! ! |
190 |
||
191 |
!FlyByWindowInformation methodsFor:'help texts'! |
|
192 |
||
193 |
helpTextFor:aView at:aPointOrNil |
|
2699 | 194 |
"generate the text to be shown as popup-flyby info" |
195 |
||
2824 | 196 |
|resources| |
197 |
||
2300 | 198 |
lastView := aView. |
199 |
lastApplication := aView application. |
|
200 |
||
2824 | 201 |
resources := self class classResources. |
202 |
||
203 |
^ Text streamContents:[:s | |
|
204 |
|topViewToInspect applicationToInspect |
|
205 |
masterApplicationToInspect topApplicationToInspect modelToInspect |
|
2939 | 206 |
genComponentNameForApplication windowGroupToInspect| |
2700
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
207 |
|
3583 | 208 |
toBrowseAction := nil. |
2824 | 209 |
genComponentNameForApplication := |
210 |
[:app :s | |
|
2700
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
211 |
(app notNil |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
212 |
and:[ app builder notNil ]) ifTrue:[ |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
213 |
|components v| |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
214 |
|
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
215 |
components := app builder namedComponents. |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
216 |
|
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
217 |
v := aView. |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
218 |
[ (components includes:v) not |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
219 |
and:[v container notNil] |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
220 |
] whileTrue:[ |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
221 |
v := v container. |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
222 |
]. |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
223 |
(components includes:v) ifTrue:[ |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
224 |
|k| |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
225 |
|
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
226 |
k := components keyAtValue:v. |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
227 |
v == aView ifTrue:[ |
2824 | 228 |
s nextPutLine:(' component: ' , k). |
2700
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
229 |
] ifFalse:[ |
2824 | 230 |
s nextPutLine:(' subview of component: ' , k). |
2700
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
231 |
]. |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
232 |
]. |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
233 |
]. |
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
234 |
]. |
2314 | 235 |
|
2300 | 236 |
aView topView ~~ aView ifTrue:[ |
2314 | 237 |
topViewToInspect := aView topView. |
2300 | 238 |
]. |
239 |
lastApplication notNil ifTrue:[ |
|
2314 | 240 |
applicationToInspect := lastApplication. |
241 |
masterApplicationToInspect := lastApplication masterApplication. |
|
2824 | 242 |
masterApplicationToInspect notNil ifTrue:[ |
243 |
masterApplicationToInspect == applicationToInspect ifTrue:[ |
|
244 |
masterApplicationToInspect := nil |
|
245 |
] ifFalse:[ |
|
246 |
topApplicationToInspect := masterApplicationToInspect topApplication. |
|
247 |
topApplicationToInspect == masterApplicationToInspect ifTrue:[ |
|
248 |
topApplicationToInspect := nil |
|
249 |
] |
|
250 |
]. |
|
251 |
] |
|
2314 | 252 |
]. |
253 |
aView model notNil ifTrue:[ |
|
254 |
modelToInspect := aView model. |
|
255 |
((modelToInspect == applicationToInspect) |
|
256 |
or:[ modelToInspect == masterApplicationToInspect ]) ifTrue:[ |
|
257 |
modelToInspect := nil. |
|
2300 | 258 |
]. |
259 |
]. |
|
2314 | 260 |
|
2824 | 261 |
applicationToInspect notNil ifTrue:[ |
262 |
s nextPutLine:(resources string:'Application: %1' with:applicationToInspect class name allBold). |
|
263 |
genComponentNameForApplication value:applicationToInspect value:s. |
|
2314 | 264 |
]. |
2700
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
265 |
masterApplicationToInspect notNil ifTrue:[ |
2824 | 266 |
s nextPutLine:(resources string:'Master-Application: %1' with:masterApplicationToInspect class name allBold). |
267 |
"/ genComponentNameForApplication value:masterApplicationToInspect value:s. |
|
268 |
]. |
|
269 |
topApplicationToInspect notNil ifTrue:[ |
|
270 |
s nextPutLine:(resources string:'Top-Application: %1' with:topApplicationToInspect class name allBold). |
|
271 |
"/ genComponentNameForApplication value:topApplicationToInspect value:s. |
|
2700
bad11f9b735f
#helpTextFor:at: - also show component's name
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
272 |
]. |
2824 | 273 |
s nextPutLine:(resources string:'View: %1 "%2"' with:aView class name allBold with:aView name). |
274 |
topViewToInspect notNil ifTrue:[ |
|
275 |
s nextPutLine:(resources string:'Topview: %1' with:topViewToInspect class name allBold). |
|
2314 | 276 |
]. |
2824 | 277 |
modelToInspect notNil ifTrue:[ |
278 |
s nextPutLine:(resources string:'Model: %1' with:modelToInspect class name allBold). |
|
279 |
]. |
|
3576 | 280 |
aPointOrNil notNil ifTrue:[ |
281 |
(aView isKindOf:MenuPanel) ifTrue:[ |
|
282 |
|item itemValue helpKey| |
|
283 |
||
284 |
(item := aView itemAt:aPointOrNil) notNil ifTrue:[ |
|
285 |
(helpKey := item activeHelpKey) notNil ifTrue:[ |
|
3673 | 286 |
s nextPutLine:(resources string:'HelpKey: %1' with:helpKey asString allBold). |
3576 | 287 |
]. |
288 |
(itemValue := item itemValue) isSymbol ifTrue:[ |
|
289 |
s nextPutLine:(resources string:'Action: %1' with:itemValue allBold). |
|
3583 | 290 |
(applicationToInspect class implements:itemValue) ifTrue:[ |
291 |
toBrowseAction := [:b | b browseClass:applicationToInspect class selector:itemValue]. |
|
292 |
] ifFalse:[ |
|
293 |
toBrowseAction := [:b | b browseImplementorsOf:itemValue]. |
|
294 |
] |
|
3576 | 295 |
] ifFalse:[ |
296 |
itemValue isBlock ifTrue:[ |
|
297 |
s nextPutLine:(resources string:'Action: %1' with:itemValue printString). |
|
298 |
] |
|
299 |
]. |
|
300 |
]. |
|
301 |
] ifFalse:[ |
|
302 |
|helpKey| |
|
303 |
||
304 |
(helpKey := aView helpKey) notNil ifTrue:[ |
|
305 |
s nextPutLine:(resources string:'HelpKey: %1' with:helpKey allBold). |
|
306 |
]. |
|
307 |
]. |
|
308 |
]. |
|
309 |
||
2300 | 310 |
s cr. |
311 |
s nextPutLine:'Press:'. |
|
3212
c973eab410cb
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
312 |
|
3583 | 313 |
"/ use Smalltalk-at, to avoid dependency on libTool |
3212
c973eab410cb
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
314 |
(Smalltalk at:#'Tools::ViewTreeInspectorApplication') notNil ifTrue:[ |
c973eab410cb
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
315 |
s nextPutLine:' ? to show the view''s tree'. |
3583 | 316 |
]. |
2314 | 317 |
applicationToInspect notNil ifTrue:[ |
2300 | 318 |
s nextPutLine:' a to inspect application (A to browse)'. |
2314 | 319 |
masterApplicationToInspect notNil ifTrue:[ |
2300 | 320 |
s nextPutLine:' m to inspect masterApplication (M to browse)'. |
2824 | 321 |
topApplicationToInspect notNil ifTrue:[ |
3358 | 322 |
s nextPutLine:' t to inspect topApplication (T to browse)'. |
2824 | 323 |
] |
2300 | 324 |
]. |
325 |
]. |
|
3212
c973eab410cb
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
3065
diff
changeset
|
326 |
s nextPutLine:' h to inspect view''s hierarchy'. |
2823 | 327 |
s nextPutLine:' v to inspect view (V to browse)'. |
328 |
topViewToInspect notNil ifTrue:[ |
|
2824 | 329 |
s nextPutLine:' w to inspect topWindow (W to browse)'. |
2823 | 330 |
]. |
2939 | 331 |
aView windowGroup notNil ifTrue:[ |
332 |
s nextPutLine:' g to inspect windowGroup'. |
|
333 |
]. |
|
2823 | 334 |
modelToInspect notNil ifTrue:[ |
335 |
s nextPutLine:' o to inspect model (O to browse)'. |
|
336 |
]. |
|
3583 | 337 |
toBrowseAction notNil ifTrue:[ |
338 |
s nextPutLine:' u to browse the called user action'. |
|
339 |
]. |
|
2823 | 340 |
s cr. |
341 |
s nextPutLine:'RETURN to browse application.'. |
|
342 |
s nextPutAll:'ESC or click to leave flyBy-info mode.'. |
|
2300 | 343 |
] |
344 |
||
345 |
" |
|
346 |
self shownInformationOfViewUnderMouseUntilButtonIsPressed |
|
347 |
" |
|
2823 | 348 |
|
2824 | 349 |
"Modified: / 12-11-2010 / 11:54:59 / cg" |
3673 | 350 |
"Modified: / 30-05-2019 / 09:37:19 / Claus Gittinger" |
2300 | 351 |
! ! |
352 |
||
2710 | 353 |
!FlyByWindowInformation methodsFor:'private'! |
354 |
||
3058
d7792b7a50b7
more control over the shape style
Claus Gittinger <cg@exept.de>
parents:
2943
diff
changeset
|
355 |
activeHelpViewForApplication:applicationOrNil text:helpText onDevice:aDevice |
d7792b7a50b7
more control over the shape style
Claus Gittinger <cg@exept.de>
parents:
2943
diff
changeset
|
356 |
^ (ActiveHelpView for:helpText onDevice:aDevice) shapeStyle:nil. |
d7792b7a50b7
more control over the shape style
Claus Gittinger <cg@exept.de>
parents:
2943
diff
changeset
|
357 |
! |
d7792b7a50b7
more control over the shape style
Claus Gittinger <cg@exept.de>
parents:
2943
diff
changeset
|
358 |
|
2847
65280fe44707
category of: #handleMouseIn:x:y:
Claus Gittinger <cg@exept.de>
parents:
2836
diff
changeset
|
359 |
handleMouseIn:aView x:x y:y |
65280fe44707
category of: #handleMouseIn:x:y:
Claus Gittinger <cg@exept.de>
parents:
2836
diff
changeset
|
360 |
finished == true ifTrue:[^ self]. |
65280fe44707
category of: #handleMouseIn:x:y:
Claus Gittinger <cg@exept.de>
parents:
2836
diff
changeset
|
361 |
super handleMouseIn:aView x:x y:y |
65280fe44707
category of: #handleMouseIn:x:y:
Claus Gittinger <cg@exept.de>
parents:
2836
diff
changeset
|
362 |
! |
65280fe44707
category of: #handleMouseIn:x:y:
Claus Gittinger <cg@exept.de>
parents:
2836
diff
changeset
|
363 |
|
2710 | 364 |
targetViewInitiatesHelpViaSensor |
365 |
^ false |
|
366 |
! ! |
|
367 |
||
2300 | 368 |
!FlyByWindowInformation methodsFor:'queries'! |
369 |
||
370 |
toolTipFollowsMouse |
|
3297 | 371 |
"if true, the tooltip-window moves with the pointer |
372 |
so that it stays away from (does not cover) the mouse pointer" |
|
373 |
||
2300 | 374 |
^ true |
375 |
! ! |
|
376 |
||
377 |
!FlyByWindowInformation methodsFor:'start & stop'! |
|
378 |
||
2699 | 379 |
initiateHelpFor:aView at:aPointOrNil |
2710 | 380 |
self initiateHelpFor:aView at:aPointOrNil now:true |
2699 | 381 |
! |
382 |
||
383 |
initiateHelpFor:aView at:aPointOrNil now:showItNow |
|
2702 | 384 |
finished == true ifTrue:[^ self]. |
2699 | 385 |
super initiateHelpFor:aView at:aPointOrNil now:showItNow |
386 |
! |
|
387 |
||
2300 | 388 |
start |
389 |
|l| |
|
390 |
||
2702 | 391 |
finished == true ifTrue:[^ self]. |
392 |
||
2300 | 393 |
l := FlyByHelp currentHelpListener. |
394 |
l notNil ifTrue:[ |
|
395 |
FlyByHelp stop. |
|
396 |
cleanupAction := [ FlyByHelp start ]. |
|
397 |
]. |
|
398 |
finishSemaphore := Semaphore new. |
|
2699 | 399 |
finished := false. |
2300 | 400 |
super start. |
401 |
! |
|
402 |
||
403 |
stop |
|
2699 | 404 |
finished := true. |
2300 | 405 |
super stop. |
406 |
cleanupAction value. |
|
407 |
finishSemaphore notNil ifTrue:[ |
|
408 |
finishSemaphore signalIf. |
|
409 |
]. |
|
410 |
! |
|
411 |
||
412 |
waitUntilFinished |
|
413 |
finishSemaphore wait. |
|
414 |
! ! |
|
415 |
||
416 |
!FlyByWindowInformation class methodsFor:'documentation'! |
|
417 |
||
2587 | 418 |
version_CVS |
419 |
^ '$Header$' |
|
2300 | 420 |
! ! |
2943
e7d181ac8f06
class: FlyByWindowInformation
Claus Gittinger <cg@exept.de>
parents:
2939
diff
changeset
|
421 |