author | Claus Gittinger <cg@exept.de> |
Fri, 11 Jan 2013 16:13:27 +0100 | |
changeset 3053 | 2c1b6c1e317f |
parent 2979 | 306456bdfb61 |
child 3114 | fb742db4ee12 |
permissions | -rw-r--r-- |
1802 | 1 |
" |
2 |
COPYRIGHT (c) 2001 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 |
" |
|
1536 | 12 |
"{ Package: 'stx:libview2' }" |
13 |
||
14 |
ActiveHelp subclass:#FlyByHelp |
|
2680 | 15 |
instanceVariableNames:'currentFrame currentView currentHelpView showProcess closeProcess' |
1892 | 16 |
classVariableNames:'' |
1536 | 17 |
poolDictionaries:'' |
18 |
category:'Interface-Help' |
|
19 |
! |
|
20 |
||
1802 | 21 |
!FlyByHelp class methodsFor:'documentation'! |
22 |
||
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 2001 by eXept Software AG |
|
26 |
All Rights Reserved |
|
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
1893 | 35 |
! |
36 |
||
37 |
examples |
|
38 |
" |
|
39 |
FlyByHelp isActive |
|
40 |
||
41 |
FlyByHelp stop |
|
42 |
FlyByHelp start |
|
43 |
" |
|
1802 | 44 |
! ! |
1536 | 45 |
|
2692 | 46 |
!FlyByHelp class methodsFor:'accessing'! |
47 |
||
48 |
currentlyShownView |
|
2846
e90ba00f9df1
changed: #currentlyShownView
Claus Gittinger <cg@exept.de>
parents:
2826
diff
changeset
|
49 |
TheOneAndOnlyHelpListener isNil ifTrue:[^ nil]. |
2692 | 50 |
^ TheOneAndOnlyHelpListener currentlyShownView |
2846
e90ba00f9df1
changed: #currentlyShownView
Claus Gittinger <cg@exept.de>
parents:
2826
diff
changeset
|
51 |
|
e90ba00f9df1
changed: #currentlyShownView
Claus Gittinger <cg@exept.de>
parents:
2826
diff
changeset
|
52 |
"Modified: / 09-06-2010 / 16:35:48 / cg" |
2692 | 53 |
! ! |
54 |
||
2684 | 55 |
!FlyByHelp methodsFor:'defaults'! |
56 |
||
57 |
flyByHelpTimeoutMillis |
|
58 |
"abort flyby help text generation, if no text can be generated within that |
|
59 |
time delta. This is used to abort long-lasting parsing/scanning/analysis in |
|
60 |
large methods when the mouse is moved over some syntactic constructs, and |
|
61 |
it takes too long to parse... |
|
62 |
The returned time is given in ms" |
|
63 |
||
64 |
^ 300 |
|
65 |
! ! |
|
66 |
||
2392 | 67 |
!FlyByHelp methodsFor:'event handling'! |
1540 | 68 |
|
2474 | 69 |
buttonMotion:buttonAndModifierState x:x y:y view:aView |
2519 | 70 |
aView == currentHelpView ifTrue:[ |
71 |
"/ the help-bubble itself |
|
72 |
^ false |
|
73 |
]. |
|
74 |
||
2518 | 75 |
"/ don't start tooltip, if this view is not active |
76 |
"/ aView topView isActive ifFalse:[^ false]. |
|
2477
b009e0b51999
suppress tooltip for inactive (lower) windows
Claus Gittinger <cg@exept.de>
parents:
2474
diff
changeset
|
77 |
|
2474 | 78 |
^ super buttonMotion:buttonAndModifierState x:x y:y view:aView |
1540 | 79 |
! |
80 |
||
2611
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
81 |
buttonPress:button x:x y:y view:aView |
2978
4358a9302b95
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2925
diff
changeset
|
82 |
self hideHelp. |
4358a9302b95
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2925
diff
changeset
|
83 |
"/ aView == currentHelpView ifTrue:[ |
4358a9302b95
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2925
diff
changeset
|
84 |
"/ self hideHelp. |
4358a9302b95
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2925
diff
changeset
|
85 |
"/ ^ true |
4358a9302b95
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2925
diff
changeset
|
86 |
"/ ]. |
2611
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
87 |
^ super buttonPress:button x:x y:y view:aView |
2978
4358a9302b95
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2925
diff
changeset
|
88 |
|
4358a9302b95
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2925
diff
changeset
|
89 |
"Modified: / 23-12-2011 / 20:37:28 / cg" |
2611
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
90 |
! |
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
91 |
|
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
92 |
keyPress:key x:x y:y view:aView |
2885
a70144d85a81
changed: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2884
diff
changeset
|
93 |
currentHelpView notNil ifTrue:[ |
2925
352825e1163c
changed: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2920
diff
changeset
|
94 |
key == $§ ifTrue:[ |
2979
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
95 |
"/ generate a line suitable for the resources file (a null translation) |
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
96 |
"/ into the clipboard; makes it easy to add missing translations to a .rs file. |
2885
a70144d85a81
changed: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2884
diff
changeset
|
97 |
aView setClipboardText:(lastHelpText storeString , ' ' , lastHelpText storeString). |
2612 | 98 |
self hideHelp. |
99 |
^ true |
|
100 |
]. |
|
2979
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
101 |
key == #Escape ifTrue:[ |
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
102 |
self hideHelp. |
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
103 |
^ true |
2885
a70144d85a81
changed: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2884
diff
changeset
|
104 |
]. |
2611
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
105 |
]. |
2799
bc3ff9e96512
comment/format in: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2781
diff
changeset
|
106 |
^ super keyPress:key x:x y:y view:aView |
2884
7d37f5a0719e
changed: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2878
diff
changeset
|
107 |
|
2979
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
108 |
"Modified (format): / 25-12-2011 / 10:25:23 / cg" |
2611
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
109 |
! |
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
110 |
|
2521
7e51aa294156
care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents:
2519
diff
changeset
|
111 |
mouseWheelMotion:state x:x y:y amount:amount deltaTime:dTime view:aView |
7e51aa294156
care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents:
2519
diff
changeset
|
112 |
currentHelpView notNil ifTrue:[ |
7e51aa294156
care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents:
2519
diff
changeset
|
113 |
self handleMouseIn:aView x:x y:y. |
7e51aa294156
care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents:
2519
diff
changeset
|
114 |
]. |
7e51aa294156
care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents:
2519
diff
changeset
|
115 |
^ false |
7e51aa294156
care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents:
2519
diff
changeset
|
116 |
! |
7e51aa294156
care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents:
2519
diff
changeset
|
117 |
|
1540 | 118 |
pointerLeave:state view:aView |
2611
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
119 |
aView == currentHelpView ifTrue:[^ true]. |
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
120 |
^ super pointerLeave:state view:aView |
1540 | 121 |
! ! |
122 |
||
2392 | 123 |
!FlyByHelp methodsFor:'help texts'! |
1536 | 124 |
|
125 |
helpTextFromModel:aModel view:aView at:aPointOrNil |
|
126 |
"helper: ask aModel for its helpText." |
|
127 |
||
128 |
|text| |
|
129 |
||
130 |
aPointOrNil notNil ifTrue:[ |
|
131 |
(aModel respondsTo:#flyByHelpTextFor:at:) ifTrue:[ |
|
132 |
text := aModel flyByHelpTextFor:aView at:aPointOrNil. |
|
2754 | 133 |
text notNil ifTrue:[^ text]. |
1536 | 134 |
]. |
135 |
]. |
|
2754 | 136 |
(aModel respondsTo:#flyByHelpTextFor:) ifTrue:[ |
137 |
text := aModel flyByHelpTextFor:aView. |
|
138 |
text notNil ifTrue:[^ text]. |
|
1536 | 139 |
]. |
2754 | 140 |
^ nil |
1536 | 141 |
! |
142 |
||
143 |
helpTextFromView:aView at:aPointOrNil |
|
144 |
"helper: ask aView for its helpText." |
|
145 |
||
2754 | 146 |
|text key app| |
1536 | 147 |
|
148 |
aPointOrNil notNil ifTrue:[ |
|
149 |
(aView respondsTo:#flyByHelpTextAt:) ifTrue:[ |
|
150 |
text := aView flyByHelpTextAt:aPointOrNil. |
|
2754 | 151 |
text notNil ifTrue:[^ text]. |
1536 | 152 |
]. |
153 |
]. |
|
2754 | 154 |
(aView respondsTo:#flyByHelpText) ifTrue:[ |
155 |
text := aView flyByHelpText. |
|
156 |
text notNil ifTrue:[^ text]. |
|
157 |
]. |
|
158 |
(aView respondsTo:#helpKey) ifTrue:[ |
|
159 |
key := aView helpKey. |
|
160 |
key notNil ifTrue:[ |
|
161 |
app := aView application. |
|
162 |
app isNil ifTrue:[ |
|
163 |
app := Error handle:[:ex | nil] do:[ aView windowGroup mainGroup application ]. |
|
164 |
]. |
|
165 |
app notNil ifTrue:[ |
|
166 |
^ app flyByHelpTextForKey:key |
|
167 |
]. |
|
168 |
^ aView resources string:key |
|
1536 | 169 |
]. |
170 |
]. |
|
2754 | 171 |
^ nil. |
2392 | 172 |
! ! |
173 |
||
174 |
!FlyByHelp methodsFor:'private'! |
|
1536 | 175 |
|
176 |
hideIfPointerLeft:aView |
|
177 |
"hide help, if the pointer is not in aView" |
|
178 |
||
179 |
|whereOnScreen| |
|
180 |
||
181 |
currentFrame notNil ifTrue:[ |
|
182 |
whereOnScreen := aView graphicsDevice pointerPosition. |
|
183 |
||
184 |
(currentFrame notNil |
|
185 |
and:[(currentFrame insetBy:1@1) containsPoint:whereOnScreen]) ifFalse:[ |
|
186 |
self hideHelp. |
|
187 |
]. |
|
188 |
]. |
|
189 |
||
190 |
"Modified: 28.5.1996 / 20:18:28 / cg" |
|
191 |
! |
|
192 |
||
193 |
initiateHelpFor:aView at:aPointOrNil now:showItNow |
|
194 |
"ask aView for helpText, passing x/y coordinates; |
|
195 |
start a timeout process to display this helpText after some delay; |
|
196 |
Normally used internally, but can also be used by widgets to force |
|
197 |
re-negotiation of the displayed helpText |
|
198 |
(for example in a menu, when the selection changes)" |
|
199 |
||
2679
552847065fb3
car not to hog the cpu by flyByHelp processing
Claus Gittinger <cg@exept.de>
parents:
2651
diff
changeset
|
200 |
|text delayTime now| |
1536 | 201 |
|
202 |
(self interestedIn:aView) ifFalse:[ |
|
203 |
^ self |
|
204 |
]. |
|
205 |
||
2679
552847065fb3
car not to hog the cpu by flyByHelp processing
Claus Gittinger <cg@exept.de>
parents:
2651
diff
changeset
|
206 |
now := Timestamp now. |
552847065fb3
car not to hog the cpu by flyByHelp processing
Claus Gittinger <cg@exept.de>
parents:
2651
diff
changeset
|
207 |
|
2680 | 208 |
"/ do not allow for more than 200 ms to be spent in the |
2679
552847065fb3
car not to hog the cpu by flyByHelp processing
Claus Gittinger <cg@exept.de>
parents:
2651
diff
changeset
|
209 |
"/ helpText gatherer (the codeView parses the code for the variable under the cursor) |
552847065fb3
car not to hog the cpu by flyByHelp processing
Claus Gittinger <cg@exept.de>
parents:
2651
diff
changeset
|
210 |
[ |
2826
74bd82edee5a
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
211 |
Error handle:[:ex | |
74bd82edee5a
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
212 |
('error in flyByhelp: ',ex description) errorPrintCR. |
2901
fed697afcef8
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2900
diff
changeset
|
213 |
"/ ex suspendedContext fullPrintAllOn:Transcript. |
2872
ea7e6fe01727
comment/format in: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2848
diff
changeset
|
214 |
"/ self halt. |
2826
74bd82edee5a
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
215 |
] do:[ |
74bd82edee5a
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
216 |
text := self helpTextFor:aView at:aPointOrNil. |
74bd82edee5a
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
217 |
]. |
2684 | 218 |
] valueWithWatchDog:[ ^ self ] afterMilliseconds:(self flyByHelpTimeoutMillis). |
2679
552847065fb3
car not to hog the cpu by flyByHelp processing
Claus Gittinger <cg@exept.de>
parents:
2651
diff
changeset
|
219 |
|
1536 | 220 |
lastHelpText = text ifTrue:[ |
2392 | 221 |
self toolTipFollowsMouse ifFalse:[ |
222 |
^ self |
|
223 |
] |
|
1536 | 224 |
]. |
225 |
||
226 |
text size > 0 ifTrue:[ |
|
2778 | 227 |
(showItNow not and:[(delayTime := self delayTime) > 0]) ifTrue:[ |
1536 | 228 |
self stopHelpDisplayProcess. |
2392 | 229 |
showProcess := |
230 |
[ |
|
2680 | 231 |
Delay waitForSeconds:delayTime. |
2774
7894ba397774
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
232 |
[ |
7894ba397774
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
233 |
aView device anyButtonPressed ifFalse:[ |
2777
4cdef981fdb3
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2774
diff
changeset
|
234 |
showProcess := nil. |
2774
7894ba397774
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
235 |
self showHelp:text for:aView |
7894ba397774
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
236 |
] |
7894ba397774
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
237 |
] ensure:[ |
7894ba397774
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
238 |
showProcess := nil. |
2680 | 239 |
] |
2392 | 240 |
] forkAt:(Processor userSchedulingPriority + 1). |
1536 | 241 |
] ifFalse:[ |
242 |
self showHelp:text for:aView |
|
243 |
] |
|
1542 | 244 |
] ifFalse:[ |
245 |
self hideHelp |
|
1536 | 246 |
]. |
2872
ea7e6fe01727
comment/format in: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2848
diff
changeset
|
247 |
|
2901
fed697afcef8
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2900
diff
changeset
|
248 |
"Modified: / 22-03-2011 / 19:10:28 / cg" |
1536 | 249 |
! ! |
250 |
||
2392 | 251 |
!FlyByHelp methodsFor:'queries'! |
252 |
||
2692 | 253 |
currentlyShownView |
254 |
^ currentHelpView |
|
255 |
! |
|
256 |
||
2392 | 257 |
toolTipFollowsMouse |
258 |
^ false |
|
259 |
! ! |
|
260 |
||
1768 | 261 |
!FlyByHelp methodsFor:'show & hide help'! |
1536 | 262 |
|
263 |
hideHelp |
|
264 |
"hide the help text" |
|
265 |
||
266 |
|p| |
|
267 |
||
1540 | 268 |
lastHelpText := nil. |
1536 | 269 |
self stopHelpDisplayProcess. |
270 |
||
271 |
currentHelpView notNil ifTrue:[ |
|
272 |
[ |
|
2780 | 273 |
currentHelpView notNil ifTrue:[ |
274 |
currentHelpView unmap. |
|
275 |
currentHelpView destroy. |
|
276 |
currentHelpView := nil. |
|
277 |
currentView := nil. |
|
278 |
] |
|
1536 | 279 |
] valueUninterruptably |
280 |
]. |
|
281 |
currentFrame := nil. |
|
282 |
closeProcess notNil ifTrue:[ |
|
283 |
p := closeProcess. closeProcess := nil. |
|
284 |
p terminate. |
|
285 |
] |
|
286 |
||
287 |
"Modified: 28.6.1997 / 14:03:50 / cg" |
|
288 |
! |
|
289 |
||
290 |
showHelp:aHelpText for:view |
|
291 |
"show the help text for aView" |
|
292 |
||
2848 | 293 |
|wg org p v dev helpViewWidth helpViewHeight| |
1536 | 294 |
|
2781 | 295 |
"/ thisContext fullPrintAllOn:Transcript. |
2651 | 296 |
(wg := view windowGroup) notNil ifTrue:[ |
297 |
wg isInModalLoop ifTrue:[ |
|
298 |
wg isModal ifFalse:[ |
|
299 |
^ self |
|
300 |
]. |
|
2628
03a41945fb37
do not show flyBy help for a view,
Claus Gittinger <cg@exept.de>
parents:
2612
diff
changeset
|
301 |
]. |
03a41945fb37
do not show flyBy help for a view,
Claus Gittinger <cg@exept.de>
parents:
2612
diff
changeset
|
302 |
]. |
03a41945fb37
do not show flyBy help for a view,
Claus Gittinger <cg@exept.de>
parents:
2612
diff
changeset
|
303 |
|
1536 | 304 |
view == currentView ifTrue:[ |
305 |
lastHelpText = aHelpText ifTrue:[ |
|
306 |
^ self |
|
307 |
] |
|
308 |
]. |
|
309 |
||
310 |
lastHelpText := aHelpText. |
|
311 |
||
2780 | 312 |
(p := closeProcess) notNil ifTrue:[ |
313 |
closeProcess := nil. |
|
1536 | 314 |
p terminate. |
315 |
]. |
|
316 |
currentHelpView notNil ifTrue:[ |
|
317 |
self hideHelp |
|
318 |
]. |
|
319 |
||
320 |
org := view originRelativeTo:nil. |
|
321 |
currentFrame := org extent:view extent. |
|
2848 | 322 |
org := org + (view extent // 2). |
1536 | 323 |
|
1677
dc49ab70b762
open helpView on the correcdt device
Claus Gittinger <cg@exept.de>
parents:
1657
diff
changeset
|
324 |
dev := view graphicsDevice. |
1536 | 325 |
|
1963
fb6663696d20
removed withCRs in showHelp:
Claus Gittinger <cg@exept.de>
parents:
1893
diff
changeset
|
326 |
v := ActiveHelpView for:aHelpText onDevice:dev. |
2848 | 327 |
helpViewWidth := v width. |
328 |
helpViewHeight := v height. |
|
1677
dc49ab70b762
open helpView on the correcdt device
Claus Gittinger <cg@exept.de>
parents:
1657
diff
changeset
|
329 |
|
1536 | 330 |
org := dev pointerPosition. |
1657 | 331 |
org := org + (0@18"24"). |
2848 | 332 |
(org x + helpViewWidth) > (dev usableExtent x) ifTrue:[ |
333 |
org := ((dev usableExtent x) - helpViewWidth - 2) @ org y |
|
1536 | 334 |
]. |
2848 | 335 |
(org y + helpViewHeight) > (dev usableHeightAt:org) ifTrue:[ |
336 |
org := org x @ ((dev usableHeightAt:org) - helpViewHeight). |
|
1536 | 337 |
]. |
338 |
||
339 |
v origin:org. |
|
340 |
v realize. |
|
341 |
v enableButtonMotionEvents. |
|
342 |
v enableMotionEvents. |
|
343 |
currentHelpView := v. |
|
2392 | 344 |
currentView := view. |
1536 | 345 |
|
2392 | 346 |
self showTime notNil ifTrue:[ |
347 |
closeProcess := [ |
|
1546 | 348 |
[ |
2392 | 349 |
(Delay forSeconds:self showTime) wait. |
350 |
[ |
|
2780 | 351 |
|v| |
352 |
(v := currentHelpView) notNil ifTrue:[ |
|
2392 | 353 |
currentHelpView := nil. |
2780 | 354 |
v unmap. |
355 |
v destroy. |
|
2392 | 356 |
] |
357 |
] valueUninterruptably |
|
358 |
] ifCurtailed:[ |
|
359 |
closeProcess := nil. |
|
360 |
]. |
|
361 |
] newProcess. |
|
362 |
closeProcess priority:(Processor userSchedulingPriority + 1). |
|
363 |
closeProcess resume. |
|
364 |
]. |
|
1536 | 365 |
|
1963
fb6663696d20
removed withCRs in showHelp:
Claus Gittinger <cg@exept.de>
parents:
1893
diff
changeset
|
366 |
"Modified: / 31-08-1995 / 19:20:45 / claus" |
2848 | 367 |
"Modified: / 16-07-2010 / 14:33:13 / cg" |
1536 | 368 |
! |
369 |
||
370 |
stopHelpDisplayProcess |
|
371 |
|p| |
|
372 |
||
2680 | 373 |
(p := showProcess) notNil ifTrue:[ |
374 |
showProcess := nil. |
|
1536 | 375 |
p terminate. |
376 |
]. |
|
377 |
||
378 |
"Created: 28.6.1997 / 14:03:17 / cg" |
|
379 |
! ! |
|
380 |
||
381 |
!FlyByHelp class methodsFor:'documentation'! |
|
382 |
||
2979
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
383 |
version |
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
384 |
^ '$Header: /cvs/stx/stx/libview2/FlyByHelp.st,v 1.51 2011-12-25 09:25:41 cg Exp $' |
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
385 |
! |
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
386 |
|
2754 | 387 |
version_CVS |
2979
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
388 |
^ '$Header: /cvs/stx/stx/libview2/FlyByHelp.st,v 1.51 2011-12-25 09:25:41 cg Exp $' |
1536 | 389 |
! ! |