author | Claus Gittinger <cg@exept.de> |
Sun, 21 Jul 2019 07:09:43 +0200 | |
changeset 4314 | 23fdaa63f239 |
parent 4313 | d390ecfb7670 |
child 4318 | ca938bab6a5d |
permissions | -rw-r--r-- |
4313 | 1 |
"{ Encoding: utf8 }" |
2 |
||
1802 | 3 |
" |
4 |
COPYRIGHT (c) 2001 by eXept Software AG |
|
5 |
All Rights Reserved |
|
6 |
||
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
1536 | 14 |
"{ Package: 'stx:libview2' }" |
15 |
||
3656 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
1536 | 18 |
ActiveHelp subclass:#FlyByHelp |
4119 | 19 |
instanceVariableNames:'currentFrame currentView currentHelpView showProcess closeProcess' |
20 |
classVariableNames:'MaxNumberOfLines MaxNumberOfColumns' |
|
21 |
poolDictionaries:'' |
|
22 |
category:'Interface-Help' |
|
1536 | 23 |
! |
24 |
||
4231 | 25 |
Query subclass:#HelpKeyInsteadOfHelpTextQuery |
26 |
instanceVariableNames:'' |
|
27 |
classVariableNames:'' |
|
28 |
poolDictionaries:'' |
|
29 |
privateIn:FlyByHelp |
|
30 |
! |
|
31 |
||
1802 | 32 |
!FlyByHelp class methodsFor:'documentation'! |
33 |
||
34 |
copyright |
|
35 |
" |
|
36 |
COPYRIGHT (c) 2001 by eXept Software AG |
|
37 |
All Rights Reserved |
|
38 |
||
39 |
This software is furnished under a license and may be used |
|
40 |
only in accordance with the terms of that license and with the |
|
41 |
inclusion of the above copyright notice. This software may not |
|
42 |
be provided or otherwise made available to, or used by, any |
|
43 |
other person. No title to or ownership of the software is |
|
44 |
hereby transferred. |
|
45 |
" |
|
1893 | 46 |
! |
47 |
||
4055 | 48 |
documentation |
49 |
" |
|
50 |
an instance of me is used to provide tooltips |
|
4313 | 51 |
sigh: Smalltalk was ahead of its time in the early 90's: |
52 |
initially called 'activeHelp', |
|
53 |
then renamed to 'flyByHelp' |
|
54 |
and is now commonly known as 'tooltip'. |
|
4055 | 55 |
|
56 |
I will watch the mouse movements via an event hook, and determine |
|
4313 | 57 |
where the mouse pointer is. |
58 |
Then ask the underlying view about its helpText |
|
59 |
and display it in a little floating popup view. |
|
60 |
||
61 |
The tool is installed via: |
|
62 |
FlyByHelp start |
|
63 |
and possibly deactivated/uninstalled via: |
|
64 |
FlyByHelp stop |
|
4055 | 65 |
|
4313 | 66 |
There can be only one FlyByHelp at any time - the start/stop methods assure that. |
4055 | 67 |
|
4313 | 68 |
Additional features: |
69 |
if you press CTRL, the helpKey which was responsible for the helptext |
|
70 |
is shown instead of the full text. This helps to find out which text to modify |
|
71 |
in case of typing errors or missing translations. |
|
72 |
||
73 |
if you press LEFTSHIFT+RIGHTSHIFT+CTRL (in that order), a menu developper menu appears, |
|
74 |
but only if Smalltalk is in the debeloper mode (i.e. not in end-user applications). |
|
4055 | 75 |
" |
76 |
! |
|
77 |
||
1893 | 78 |
examples |
79 |
" |
|
3220 | 80 |
UserPreferences current toolTipShapeStyle:nil |
81 |
UserPreferences current toolTipShapeStyle:#cartoon |
|
82 |
||
1893 | 83 |
FlyByHelp isActive |
84 |
||
85 |
FlyByHelp stop |
|
86 |
FlyByHelp start |
|
87 |
" |
|
1802 | 88 |
! ! |
1536 | 89 |
|
2692 | 90 |
!FlyByHelp class methodsFor:'accessing'! |
91 |
||
92 |
currentlyShownView |
|
2846
e90ba00f9df1
changed: #currentlyShownView
Claus Gittinger <cg@exept.de>
parents:
2826
diff
changeset
|
93 |
TheOneAndOnlyHelpListener isNil ifTrue:[^ nil]. |
2692 | 94 |
^ TheOneAndOnlyHelpListener currentlyShownView |
2846
e90ba00f9df1
changed: #currentlyShownView
Claus Gittinger <cg@exept.de>
parents:
2826
diff
changeset
|
95 |
|
e90ba00f9df1
changed: #currentlyShownView
Claus Gittinger <cg@exept.de>
parents:
2826
diff
changeset
|
96 |
"Modified: / 09-06-2010 / 16:35:48 / cg" |
3255 | 97 |
! |
98 |
||
4231 | 99 |
helpKeyInsteadOfHelpTextQuery |
100 |
^ HelpKeyInsteadOfHelpTextQuery |
|
101 |
||
102 |
"Created: / 22-02-2019 / 09:38:18 / Claus Gittinger" |
|
103 |
! |
|
104 |
||
3255 | 105 |
maxNumberOfColumns |
106 |
^ MaxNumberOfColumns ? 200 |
|
107 |
! |
|
108 |
||
109 |
maxNumberOfLines |
|
110 |
^ MaxNumberOfLines ? 40 |
|
2692 | 111 |
! ! |
112 |
||
2684 | 113 |
!FlyByHelp methodsFor:'defaults'! |
114 |
||
115 |
flyByHelpTimeoutMillis |
|
116 |
"abort flyby help text generation, if no text can be generated within that |
|
117 |
time delta. This is used to abort long-lasting parsing/scanning/analysis in |
|
118 |
large methods when the mouse is moved over some syntactic constructs, and |
|
119 |
it takes too long to parse... |
|
120 |
The returned time is given in ms" |
|
121 |
||
122 |
^ 300 |
|
123 |
! ! |
|
124 |
||
4233 | 125 |
!FlyByHelp methodsFor:'developer menu'! |
126 |
||
127 |
openDeveloperMenuFor:aView at:aPoint |
|
128 |
"with CTRL+SHIFT, this menu appears" |
|
129 |
||
130 |
|app helpText helpKey| |
|
131 |
||
132 |
app := aView topView application. |
|
4308 | 133 |
app isNil ifTrue:[ Transcript showCR:'no app for view: %1' with:aView. ^ self ]. |
134 |
||
4233 | 135 |
app enqueueDelayedAction:[ |
4313 | 136 |
|editor m canDefineTranslationForLabel canDefineTranslationForHelpText menuItem| |
4233 | 137 |
|
4290 | 138 |
canDefineTranslationForHelpText := lastHelpText notEmptyOrNil. |
139 |
canDefineTranslationForHelpText := canDefineTranslationForHelpText or:[ (helpText := aView helpTextAt:aPoint) notEmptyOrNil]. |
|
140 |
canDefineTranslationForHelpText := canDefineTranslationForHelpText or:[ (helpText := aView helpText) notEmptyOrNil]. |
|
141 |
canDefineTranslationForHelpText := canDefineTranslationForHelpText or:[ (helpKey := aView helpKey) notNil]. |
|
142 |
canDefineTranslationForHelpText := canDefineTranslationForHelpText or:[ (helpText := app helpTextFor:aView) notEmptyOrNil ]. |
|
143 |
||
4233 | 144 |
m := Menu new. |
145 |
m addItem:(MenuItem |
|
4313 | 146 |
label:(((aView fullName ? 'unnamed')) withColor:Color grey)). |
147 |
||
148 |
aView isMenu ifTrue:[ |
|
149 |
menuItem := aView itemAtPoint:aPoint. |
|
4314 | 150 |
menuItem notNil ifTrue:[ |
151 |
m addItem:(MenuItem |
|
152 |
label:(('MenuItem''s NameKey: ',(menuItem nameKey printString)) withColor:Color grey)). |
|
153 |
]. |
|
4313 | 154 |
]. |
155 |
||
156 |
m addSeparator. |
|
4308 | 157 |
m addItem:(MenuItem |
4290 | 158 |
label: 'Copy Helptext' |
159 |
itemValue:[ |
|
160 |
|package key | |
|
161 |
||
162 |
key := (lastHelpText ? helpText ? helpKey) asString string. |
|
163 |
aView topView setClipboardText:key. |
|
164 |
] |
|
165 |
enabled:canDefineTranslationForHelpText). |
|
166 |
m addSeparator. |
|
167 |
||
168 |
m addItem:(MenuItem |
|
4233 | 169 |
label: 'Edit Resources' |
170 |
itemValue:[ |
|
171 |
app enqueueDelayedAction:[ |
|
172 |
app withWaitCursorDo:[ |
|
173 |
editor := Tools::InternationalLanguageTranslationEditor |
|
174 |
openOnPackage:((aView topView application ? aView) class package). |
|
175 |
editor selectOrAddKey:(lastHelpText storeString withoutCRs). |
|
176 |
Transcript showCR:'help text is: %1' with:lastHelpText storeString withoutCRs. |
|
177 |
||
178 |
]. |
|
179 |
]. |
|
180 |
]). |
|
181 |
m addItem:(MenuItem |
|
182 |
label: 'Browse Resources' |
|
183 |
itemValue:[ |
|
184 |
app enqueueDelayedAction:[ |
|
185 |
app withWaitCursorDo:[ |
|
186 |
FileBrowser default |
|
187 |
openOn:(app class projectDefinitionClass |
|
188 |
packageDirectory / 'resources'). |
|
189 |
]. |
|
190 |
]. |
|
191 |
]). |
|
192 |
||
193 |
canDefineTranslationForLabel := |
|
194 |
[ |
|
195 |
(aView isKindOf:Label) or:[aView respondsTo:#label] |
|
196 |
]. |
|
197 |
||
198 |
m addItem:(MenuItem |
|
199 |
label: 'Define Translation for Label...' |
|
200 |
itemValue:[ |
|
201 |
|package key | |
|
202 |
||
203 |
key := aView label asString string. |
|
204 |
package := app class package. |
|
205 |
ResourcePack defineResourceFor:key package:package. |
|
206 |
] |
|
207 |
enabled:canDefineTranslationForLabel). |
|
208 |
m addItem:(MenuItem |
|
209 |
label: 'Define Translation for Helptext...' |
|
210 |
itemValue:[ |
|
211 |
|package key | |
|
212 |
||
213 |
key := (lastHelpText ? helpText ? helpKey) asString string. |
|
214 |
package := app class package. |
|
215 |
ResourcePack defineResourceFor:key package:package. |
|
216 |
] |
|
217 |
enabled:canDefineTranslationForHelpText). |
|
218 |
||
219 |
m addSeparator. |
|
220 |
m addItem:(MenuItem |
|
221 |
label: 'Browse Application' |
|
222 |
itemValue:[ SystemBrowser default openInClass:aView application class]). |
|
223 |
||
224 |
m addItem:(MenuItem |
|
225 |
label: 'UI Painter' |
|
226 |
itemValue:[ UIPainter openOnClass:aView application class andSelector:#windowSpec]). |
|
227 |
||
228 |
aView application ~~ app ifTrue:[ |
|
229 |
m addSeparator. |
|
230 |
m addItem:(MenuItem |
|
231 |
label: 'Browse Top Application' |
|
232 |
itemValue:[ SystemBrowser default openInClass:app class]). |
|
233 |
||
234 |
m addItem:(MenuItem |
|
235 |
label: 'UI Painter on Top Application' |
|
236 |
itemValue:[ UIPainter openOnClass:app class andSelector:#windowSpec]). |
|
237 |
]. |
|
238 |
||
4313 | 239 |
m addSeparator. |
240 |
m addItem:(MenuItem label: 'Inspect Application' itemValue:[ app inspect ]). |
|
241 |
m addItem:(MenuItem label: 'Inspect View' itemValue:[ aView inspect ]). |
|
242 |
||
243 |
menuItem notNil ifTrue:[ |
|
244 |
m addItem:(MenuItem label: 'Inspect Menuitem' itemValue:[ menuItem inspect ]). |
|
245 |
]. |
|
246 |
||
4233 | 247 |
m showAtPointer. |
248 |
]. |
|
249 |
||
250 |
"Created: / 22-02-2019 / 09:32:35 / Claus Gittinger" |
|
4314 | 251 |
"Modified: / 21-07-2019 / 07:04:08 / Claus Gittinger" |
4233 | 252 |
! ! |
253 |
||
2392 | 254 |
!FlyByHelp methodsFor:'event handling'! |
1540 | 255 |
|
2474 | 256 |
buttonMotion:buttonAndModifierState x:x y:y view:aView |
4252 | 257 |
"/ DebuggingEvents := true |
258 |
"/ DebuggingEvents := false |
|
259 |
DebuggingEvents == true ifTrue:[ |
|
260 |
('%1: ==== ButtonMotion view:%2' |
|
4281 | 261 |
bindWith:self className |
4252 | 262 |
with:aView) infoPrintCR. |
263 |
]. |
|
264 |
||
2519 | 265 |
aView == currentHelpView ifTrue:[ |
266 |
"/ the help-bubble itself |
|
267 |
^ false |
|
268 |
]. |
|
269 |
||
4055 | 270 |
"/ don't start tooltip, if this view is not active. |
271 |
"/ The following line does not work, because motion events are reported for the current focus-view, |
|
3321 | 272 |
"/ which is always active. Must check after we have determined the view under the pointer |
3675 | 273 |
"/ aView topView isActive ifFalse:[^ false]. |
2477
b009e0b51999
suppress tooltip for inactive (lower) windows
Claus Gittinger <cg@exept.de>
parents:
2474
diff
changeset
|
274 |
|
2474 | 275 |
^ super buttonMotion:buttonAndModifierState x:x y:y view:aView |
4281 | 276 |
|
277 |
"Modified: / 28-06-2019 / 08:43:54 / Claus Gittinger" |
|
1540 | 278 |
! |
279 |
||
2611
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
280 |
buttonPress:button x:x y:y view:aView |
3198 | 281 |
|prevView| |
282 |
||
4252 | 283 |
"/ DebuggingEvents := true |
284 |
"/ DebuggingEvents := false |
|
285 |
DebuggingEvents == true ifTrue:[ |
|
286 |
('%1: ButtonPress view:%2' |
|
4281 | 287 |
bindWith:self className |
4252 | 288 |
with:aView) infoPrintCR. |
289 |
]. |
|
290 |
||
3198 | 291 |
"/ hideHelp nils the currentView |
292 |
"/ we restore it, so the tooltip is not shown again for this view |
|
293 |
"/ until the mouse really leaves the view |
|
294 |
"/ let's call this the "do-not-show-in-this-view mode" |
|
295 |
prevView := currentView. |
|
2978
4358a9302b95
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2925
diff
changeset
|
296 |
self hideHelp. |
3198 | 297 |
currentView := prevView. |
298 |
||
299 |
^ false |
|
2978
4358a9302b95
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2925
diff
changeset
|
300 |
|
4358a9302b95
changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2925
diff
changeset
|
301 |
"Modified: / 23-12-2011 / 20:37:28 / cg" |
4281 | 302 |
"Modified: / 28-06-2019 / 08:43:57 / Claus Gittinger" |
2611
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
303 |
! |
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
304 |
|
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
305 |
keyPress:key x:x y:y view:aView |
4308 | 306 |
"care for the special keys: |
307 |
Ctrl (while help is shown) |
|
308 |
L-Shift+R-Shift+Ctrl (while nothing is shown) |
|
309 |
" |
|
310 |
||
4226 | 311 |
<resource: #keyboard (#Escape #Control #Shift)> |
3216 | 312 |
|
4228 | 313 |
|prevView text| |
3198 | 314 |
|
4252 | 315 |
"/ DebuggingEvents := true |
316 |
"/ DebuggingEvents := false |
|
4307 | 317 |
"/ Debugging := true. |
318 |
"/ Debugging := false. |
|
4252 | 319 |
DebuggingEvents == true ifTrue:[ |
4307 | 320 |
'-----' infoPrintCR. |
321 |
('%1: KeyPress view:%2 (currentHelpView=%3)' |
|
4281 | 322 |
bindWith:self className |
4307 | 323 |
with:aView |
324 |
with:currentHelpView) infoPrintCR. |
|
4252 | 325 |
]. |
2885
a70144d85a81
changed: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2884
diff
changeset
|
326 |
currentHelpView notNil ifTrue:[ |
4313 | 327 |
"/ Transcript show:'with help view shown: '; showCR:key. |
2979
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
328 |
key == #Escape ifTrue:[ |
3198 | 329 |
prevView := currentView. |
2979
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
330 |
self hideHelp. |
3198 | 331 |
currentView := prevView. |
4230 | 332 |
^ false |
2885
a70144d85a81
changed: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2884
diff
changeset
|
333 |
]. |
4228 | 334 |
(#(#'Control' #'Control_L' #'Control_R') includes:key) ifTrue:[ |
4226 | 335 |
"/ reopen showing the key |
4313 | 336 |
"/ Transcript show:'re initialize help: '; showCR:key. |
4226 | 337 |
self initiateHelpFor:aView at:(x@y) now:true. |
4230 | 338 |
^ false |
4226 | 339 |
]. |
4313 | 340 |
Smalltalk isStandAloneApp ifFalse:[ |
341 |
key == $§ ifTrue:[ |
|
342 |
"/ generate a line suitable for the resources file (a null translation) |
|
343 |
"/ into the clipboard; makes it easy to add missing translations to a .rs file, |
|
344 |
"/ by pressing paragraph whenever you see an untranslated helptext |
|
345 |
text := (lastHelpText storeString withoutCRs, ' ' , lastHelpText storeString withoutCRs). |
|
346 |
aView setClipboardText:text. |
|
347 |
self hideHelp. |
|
348 |
^ false |
|
349 |
]. |
|
350 |
(#(#'Shift' #'Shift_L' #'Shift_R') includes:key) ifTrue:[ |
|
351 |
aView device ctrlDown ifTrue:[ |
|
352 |
self hideHelp. |
|
353 |
self openDeveloperMenuFor:aView at:x@y |
|
354 |
]. |
|
355 |
^ false |
|
356 |
]. |
|
357 |
]. |
|
358 |
(#('Shift' #'Shift_L' #'Shift_R' ) includes:key) ifTrue:[ |
|
3216 | 359 |
"/ do not close on those... |
360 |
^ false |
|
361 |
]. |
|
4307 | 362 |
] ifFalse:[ |
4313 | 363 |
"/ Transcript show:'without help view shown: '; showCR:key. |
364 |
Smalltalk isStandAloneApp ifFalse:[ |
|
365 |
"/ both shifts AND then ctrl... |
|
366 |
(#(#'Control' #'Control_L' #'Control_R') includes:key) ifTrue:[ |
|
367 |
aView device leftShiftDown ifTrue:[ |
|
368 |
aView device rightShiftDown ifTrue:[ |
|
369 |
self hideHelp. |
|
370 |
self openDeveloperMenuFor:aView at:x@y |
|
371 |
]. |
|
4307 | 372 |
]. |
4313 | 373 |
^ false |
4307 | 374 |
]. |
4313 | 375 |
]. |
4226 | 376 |
]. |
3198 | 377 |
|
378 |
"/ hideHelp nils the currentView |
|
379 |
"/ we restore it, so the tooltip is not shown again for this view |
|
380 |
"/ until the mouse really leaves the view |
|
381 |
"/ let's call this the "do-not-show-in-this-view mode" |
|
382 |
prevView := currentView. |
|
383 |
self hideHelpIgnoringErrors. |
|
384 |
currentView := prevView. |
|
385 |
||
386 |
^ false |
|
387 |
"/ ^ 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
|
388 |
|
2979
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
389 |
"Modified (format): / 25-12-2011 / 10:25:23 / cg" |
4082 | 390 |
"Modified (format): / 16-04-2018 / 16:53:15 / stefan" |
4313 | 391 |
"Modified: / 20-07-2019 / 08:55:01 / Claus Gittinger" |
4226 | 392 |
! |
393 |
||
394 |
keyRelease:key x:x y:y view:aView |
|
395 |
<resource: #keyboard (#Control)> |
|
396 |
||
4252 | 397 |
"/ DebuggingEvents := true |
398 |
"/ DebuggingEvents := false |
|
399 |
DebuggingEvents == true ifTrue:[ |
|
400 |
('%1: KeyRelease view:%2' |
|
4281 | 401 |
bindWith:self className |
4252 | 402 |
with:aView) infoPrintCR. |
403 |
]. |
|
4226 | 404 |
currentHelpView notNil ifTrue:[ |
405 |
(#(#'Control' #'Control_L' #'Control_R') includes:key) ifTrue:[ |
|
406 |
"/ reopen showing the text |
|
407 |
self initiateHelpFor:aView at:(x@y) now:true. |
|
408 |
^ true |
|
409 |
]. |
|
410 |
(#('Shift' #'Shift_L' #'Shift_R' #'Control' #'Control_L' #'Control_R') includes:key) ifTrue:[ |
|
411 |
"/ do not close on those... |
|
412 |
^ false |
|
413 |
]. |
|
414 |
]. |
|
415 |
^ super keyRelease:key x:x y:y view:aView |
|
416 |
||
417 |
"Created: / 20-02-2019 / 11:26:19 / Claus Gittinger" |
|
4281 | 418 |
"Modified: / 28-06-2019 / 08:44:06 / Claus Gittinger" |
2611
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
419 |
! |
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
420 |
|
2521
7e51aa294156
care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents:
2519
diff
changeset
|
421 |
mouseWheelMotion:state x:x y:y amount:amount deltaTime:dTime view:aView |
4252 | 422 |
"/ DebuggingEvents := true |
423 |
"/ DebuggingEvents := false |
|
424 |
DebuggingEvents == true ifTrue:[ |
|
425 |
('%1: MouseWheel view:%2' |
|
4281 | 426 |
bindWith:self className |
4252 | 427 |
with:aView) infoPrintCR. |
428 |
]. |
|
2521
7e51aa294156
care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents:
2519
diff
changeset
|
429 |
currentHelpView notNil ifTrue:[ |
7e51aa294156
care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents:
2519
diff
changeset
|
430 |
self handleMouseIn:aView x:x y:y. |
7e51aa294156
care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents:
2519
diff
changeset
|
431 |
]. |
7e51aa294156
care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents:
2519
diff
changeset
|
432 |
^ false |
4281 | 433 |
|
434 |
"Modified: / 28-06-2019 / 08:44:10 / Claus Gittinger" |
|
2521
7e51aa294156
care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents:
2519
diff
changeset
|
435 |
! |
7e51aa294156
care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents:
2519
diff
changeset
|
436 |
|
1540 | 437 |
pointerLeave:state view:aView |
4252 | 438 |
"/ DebuggingEvents := true |
439 |
"/ DebuggingEvents := false |
|
440 |
DebuggingEvents == true ifTrue:[ |
|
441 |
('%1: **** PointerLeave view:%2' |
|
4281 | 442 |
bindWith:self className |
4252 | 443 |
with:aView) infoPrintCR. |
444 |
]. |
|
445 |
||
2611
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
446 |
aView == currentHelpView ifTrue:[^ true]. |
3198 | 447 |
|
448 |
"/ clear the do-not-show-in-this-view mode (see keyPress) |
|
449 |
"/ (currentHelpView isNil and:[currentView notNil]) ifTrue:[currentView := nil]. |
|
450 |
||
2611
f578b9c43a6f
handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents:
2521
diff
changeset
|
451 |
^ super pointerLeave:state view:aView |
4281 | 452 |
|
453 |
"Modified: / 28-06-2019 / 08:44:13 / Claus Gittinger" |
|
1540 | 454 |
! ! |
455 |
||
2392 | 456 |
!FlyByHelp methodsFor:'help texts'! |
1536 | 457 |
|
458 |
helpTextFromModel:aModel view:aView at:aPointOrNil |
|
459 |
"helper: ask aModel for its helpText." |
|
460 |
||
461 |
|text| |
|
462 |
||
4048 | 463 |
(aPointOrNil notNil and:[aModel respondsTo:#helpTextFor:at:]) ifTrue:[ |
464 |
text := aModel helpTextFor:aView at:aPointOrNil. |
|
4121 | 465 |
text notNil ifTrue:[ |
466 |
"/ Transcript showCR:aModel. |
|
467 |
"/ Transcript showCR:'via model-text'; showCR:text. |
|
468 |
^ text |
|
469 |
]. |
|
1536 | 470 |
]. |
4048 | 471 |
(aModel respondsTo:#helpTextFor:) ifTrue:[ |
472 |
text := aModel helpTextFor:aView. |
|
4121 | 473 |
text notNil ifTrue:[ |
474 |
"/ Transcript showCR:aModel. |
|
475 |
"/ Transcript showCR:'via model-text'; showCR:text. |
|
476 |
^ text |
|
477 |
]. |
|
1536 | 478 |
]. |
2754 | 479 |
^ nil |
4040 | 480 |
|
481 |
"Modified: / 09-01-2018 / 17:35:26 / stefan" |
|
4121 | 482 |
"Modified: / 11-06-2018 / 09:53:40 / Claus Gittinger" |
1536 | 483 |
! |
484 |
||
485 |
helpTextFromView:aView at:aPointOrNil |
|
486 |
"helper: ask aView for its helpText." |
|
487 |
||
2754 | 488 |
|text key app| |
1536 | 489 |
|
4121 | 490 |
"/ is there any view which does not understand helpTextAt: ??? |
4048 | 491 |
(aPointOrNil notNil and:[aView respondsTo:#helpTextAt:]) ifTrue:[ |
492 |
text := aView helpTextAt:aPointOrNil. |
|
4121 | 493 |
text notNil ifTrue:[ |
494 |
"/ Transcript showCR:'via helpTextAt:'; showCR:text. |
|
495 |
^ text |
|
496 |
]. |
|
1536 | 497 |
]. |
4121 | 498 |
"/ is there any view which does not understand helpText ??? |
4048 | 499 |
(aView respondsTo:#helpText) ifTrue:[ |
500 |
text := aView helpText. |
|
4121 | 501 |
text notNil ifTrue:[ |
502 |
"/ Transcript showCR:'via helpText'; showCR:text. |
|
4220 | 503 |
^ text value |
4121 | 504 |
]. |
2754 | 505 |
]. |
3804 | 506 |
"/ to be enabled in next release... |
507 |
"/ (aView superView notNil |
|
4048 | 508 |
"/ and:[aView superView respondsTo:#helpTextFor:]) ifTrue:[ |
509 |
"/ text := aView superView helpTextFor:aView. |
|
3804 | 510 |
"/ text notNil ifTrue:[^ text]. |
511 |
"/ ]. |
|
4121 | 512 |
|
513 |
"/ is there any view which does not understand helpKey ??? |
|
2754 | 514 |
(aView respondsTo:#helpKey) ifTrue:[ |
515 |
key := aView helpKey. |
|
516 |
key notNil ifTrue:[ |
|
517 |
app := aView application. |
|
518 |
app isNil ifTrue:[ |
|
4175 | 519 |
|topView topViewsHelpSpec| |
520 |
||
3763 | 521 |
"/ special case for oldStyle Dialog subclasses. |
4175 | 522 |
topView := aView topView. |
523 |
(topViewsHelpSpec := topView helpSpec) notNil ifTrue:[ |
|
524 |
text := topViewsHelpSpec at:key ifAbsent:nil. |
|
3763 | 525 |
text notNil ifTrue:[ |
4121 | 526 |
"/ Transcript showCR:'via topViewspec+helpKey'; showCR:text. |
4175 | 527 |
^ topView resources stringWithCRs:text. |
3763 | 528 |
]. |
529 |
]. |
|
2754 | 530 |
app := Error handle:[:ex | nil] do:[ aView windowGroup mainGroup application ]. |
531 |
]. |
|
532 |
app notNil ifTrue:[ |
|
4121 | 533 |
text := app helpTextForKey:key. |
534 |
true "text notNil" ifTrue:[ |
|
535 |
"/ Transcript showCR:'via helpKey+helpTextForKey:'; showCR:text. |
|
536 |
^ text |
|
537 |
]. |
|
2754 | 538 |
]. |
4121 | 539 |
text := aView resources string:key. |
540 |
true "(text notNil and:[text ~= key])" ifTrue:[ |
|
541 |
"/ Transcript showCR:'via helpKey'; showCR:text. |
|
4110 | 542 |
^ text |
543 |
] |
|
1536 | 544 |
]. |
545 |
]. |
|
2754 | 546 |
^ nil. |
4040 | 547 |
|
548 |
"Modified: / 09-01-2018 / 17:38:42 / stefan" |
|
4111 | 549 |
"Modified (format): / 07-06-2018 / 09:51:41 / sr" |
4220 | 550 |
"Modified: / 07-02-2019 / 19:18:39 / Claus Gittinger" |
2392 | 551 |
! ! |
552 |
||
4119 | 553 |
!FlyByHelp methodsFor:'queries'! |
554 |
||
555 |
currentlyShownView |
|
556 |
^ currentHelpView |
|
557 |
! |
|
558 |
||
559 |
toolTipFollowsMouse |
|
560 |
"if true, the tooltip-window moves with the pointer |
|
561 |
so that it stays away from (does not cover) the mouse pointer" |
|
562 |
||
563 |
^ false |
|
564 |
||
565 |
"Modified: / 06-06-2018 / 17:37:19 / Claus Gittinger" |
|
566 |
! ! |
|
567 |
||
568 |
!FlyByHelp methodsFor:'show & hide help'! |
|
569 |
||
570 |
activeHelpViewForApplication:applicationOrNil text:helpText onDevice:aDevice |
|
571 |
applicationOrNil notNil ifTrue:[ |
|
572 |
^ applicationOrNil activeHelpViewFor:helpText onDevice:aDevice |
|
573 |
]. |
|
574 |
^ ActiveHelpView for:helpText onDevice:aDevice. |
|
575 |
||
576 |
" |
|
577 |
(ActiveHelpView for:'Hello' onDevice:Display) open |
|
578 |
" |
|
579 |
! |
|
580 |
||
581 |
hideHelp |
|
582 |
"hide the help text" |
|
583 |
||
4313 | 584 |
|p v| |
4119 | 585 |
|
586 |
"/ lastHelpText := nil. |
|
587 |
self stopHelpDisplayProcess. |
|
588 |
lastHelpText := nil. |
|
589 |
||
590 |
currentHelpView notNil ifTrue:[ |
|
591 |
[ |
|
4313 | 592 |
(v := currentHelpView) notNil ifTrue:[ |
4119 | 593 |
currentHelpView := nil. |
4313 | 594 |
v destroy. |
4119 | 595 |
currentView := nil. |
596 |
] |
|
597 |
] valueUninterruptably |
|
598 |
]. |
|
4313 | 599 |
|
4119 | 600 |
currentFrame := nil. |
601 |
(p := closeProcess) notNil ifTrue:[ |
|
602 |
closeProcess := nil. |
|
603 |
p terminate. |
|
604 |
] |
|
605 |
||
606 |
"Modified: / 28-06-1997 / 14:03:50 / cg" |
|
607 |
"Modified: / 16-04-2018 / 16:51:01 / stefan" |
|
4313 | 608 |
"Modified: / 20-07-2019 / 08:48:34 / Claus Gittinger" |
4119 | 609 |
! |
1536 | 610 |
|
611 |
hideIfPointerLeft:aView |
|
612 |
"hide help, if the pointer is not in aView" |
|
613 |
||
4119 | 614 |
|helpFrame whereOnScreen| |
1536 | 615 |
|
4119 | 616 |
(helpFrame := currentFrame) notNil ifTrue:[ |
1536 | 617 |
whereOnScreen := aView graphicsDevice pointerPosition. |
618 |
||
4119 | 619 |
((helpFrame insetBy:1@1) containsPoint:whereOnScreen) ifFalse:[ |
1536 | 620 |
self hideHelp. |
4119 | 621 |
] ifTrue:[ |
622 |
pointerPositionAtShowTime notNil ifTrue:[ |
|
623 |
(whereOnScreen dist:pointerPositionAtShowTime) > 10 ifTrue:[ |
|
624 |
self hideHelp. |
|
625 |
]. |
|
626 |
]. |
|
627 |
]. |
|
1536 | 628 |
]. |
629 |
||
4082 | 630 |
"Modified: / 28-05-1996 / 20:18:28 / cg" |
631 |
"Modified: / 16-04-2018 / 16:59:48 / stefan" |
|
4119 | 632 |
"Modified: / 08-06-2018 / 10:30:04 / Claus Gittinger" |
1536 | 633 |
! |
634 |
||
635 |
initiateHelpFor:aView at:aPointOrNil now:showItNow |
|
636 |
"ask aView for helpText, passing x/y coordinates; |
|
637 |
start a timeout process to display this helpText after some delay; |
|
638 |
Normally used internally, but can also be used by widgets to force |
|
639 |
re-negotiation of the displayed helpText |
|
640 |
(for example in a menu, when the selection changes)" |
|
641 |
||
4110 | 642 |
|text delayTime| |
1536 | 643 |
|
4252 | 644 |
Debugging ifTrue:[ |
4281 | 645 |
('%1: initiateHelpFor:at:now: %2' bindWith:self className with:aView) infoPrintCR. |
4252 | 646 |
]. |
1536 | 647 |
(self interestedIn:aView) ifFalse:[ |
4237 | 648 |
Debugging ifTrue:[ |
4252 | 649 |
('%1: not interested' bindWith:self class name) infoPrintCR |
4237 | 650 |
]. |
1536 | 651 |
^ self |
652 |
]. |
|
653 |
||
2680 | 654 |
"/ 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
|
655 |
"/ 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
|
656 |
[ |
2826
74bd82edee5a
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
657 |
Error handle:[:ex | |
4252 | 658 |
('%1: [warning]: error while asking for helpText: %2' bindWith:self class name with:ex description) errorPrintCR. |
659 |
'-------------------------' errorPrintCR. |
|
660 |
ex suspendedContext fullPrintAllOn:(Transcript ? Stderr). |
|
2872
ea7e6fe01727
comment/format in: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2848
diff
changeset
|
661 |
"/ self halt. |
2826
74bd82edee5a
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
662 |
] do:[ |
4231 | 663 |
HelpKeyInsteadOfHelpTextQuery answer:(aView device ctrlDown) do:[ |
664 |
text := self helpTextFor:aView at:aPointOrNil. |
|
665 |
]. |
|
2826
74bd82edee5a
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
666 |
]. |
3656 | 667 |
] valueWithWatchDog:[ |
4252 | 668 |
('%1 [info]: flyBy text generation took too long' bindWith:self class name) infoPrintCR. |
3656 | 669 |
^ self |
670 |
] afterMilliseconds:(self flyByHelpTimeoutMillis). |
|
2679
552847065fb3
car not to hog the cpu by flyByHelp processing
Claus Gittinger <cg@exept.de>
parents:
2651
diff
changeset
|
671 |
|
4110 | 672 |
false ifTrue:[ |
673 |
(text notNil and:[text isEmpty]) ifTrue:[ |
|
674 |
Logger warning:('empty help from: ',aView class printString) |
|
675 |
] ifFalse:[ |
|
676 |
text isEmptyOrNil ifTrue:[ |
|
677 |
Logger warning:('no help from: ',aView class printString) |
|
678 |
]. |
|
679 |
]. |
|
680 |
]. |
|
681 |
||
4252 | 682 |
(lastHelpText = text and:[lastHelpWidget == aView]) ifTrue:[ |
683 |
"/ Debugging := true |
|
4237 | 684 |
Debugging == true ifTrue:[ |
685 |
'same text: ' infoPrint. text infoPrintCR. |
|
686 |
]. |
|
4082 | 687 |
self toolTipFollowsMouse ifFalse:[ |
4252 | 688 |
Debugging == true ifTrue:[ |
689 |
'tooltip does not follow mouse: ' infoPrint. text infoPrintCR. |
|
690 |
]. |
|
4082 | 691 |
^ self |
2392 | 692 |
] |
1536 | 693 |
]. |
694 |
||
4110 | 695 |
((text size > 0) or:[text notNil and:[text isString not]]) ifTrue:[ |
2778 | 696 |
(showItNow not and:[(delayTime := self delayTime) > 0]) ifTrue:[ |
1536 | 697 |
self stopHelpDisplayProcess. |
2392 | 698 |
showProcess := |
699 |
[ |
|
2680 | 700 |
Delay waitForSeconds:delayTime. |
2774
7894ba397774
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
701 |
[ |
3766 | 702 |
aView device notNil ifTrue:[ |
703 |
aView device anyButtonPressed ifFalse:[ |
|
704 |
showProcess := nil. |
|
705 |
self showHelp:text for:aView |
|
706 |
] |
|
707 |
]. |
|
2774
7894ba397774
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
708 |
] ensure:[ |
7894ba397774
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
709 |
showProcess := nil. |
2680 | 710 |
] |
2392 | 711 |
] forkAt:(Processor userSchedulingPriority + 1). |
1536 | 712 |
] ifFalse:[ |
713 |
self showHelp:text for:aView |
|
714 |
] |
|
1542 | 715 |
] ifFalse:[ |
4252 | 716 |
Debugging == true ifTrue:[ |
717 |
'empty text: ' infoPrint. text infoPrintCR. |
|
718 |
]. |
|
1542 | 719 |
self hideHelp |
1536 | 720 |
]. |
2872
ea7e6fe01727
comment/format in: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2848
diff
changeset
|
721 |
|
2901
fed697afcef8
changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents:
2900
diff
changeset
|
722 |
"Modified: / 22-03-2011 / 19:10:28 / cg" |
4082 | 723 |
"Modified: / 16-04-2018 / 12:20:33 / stefan" |
4281 | 724 |
"Modified: / 28-06-2019 / 08:44:00 / Claus Gittinger" |
1536 | 725 |
! |
726 |
||
727 |
showHelp:aHelpText for:view |
|
728 |
"show the help text for aView" |
|
729 |
||
3786 | 730 |
|wg applicationOrNil org p v device helpTextShown textLines |
3334 | 731 |
helpViewWidth helpViewHeight usableWidth monitorBounds usableHeight |
4119 | 732 |
showTime cursorView pos pointerPosition| |
1536 | 733 |
|
2781 | 734 |
"/ thisContext fullPrintAllOn:Transcript. |
2651 | 735 |
(wg := view windowGroup) notNil ifTrue:[ |
736 |
wg isInModalLoop ifTrue:[ |
|
737 |
wg isModal ifFalse:[ |
|
4252 | 738 |
Debugging ifTrue:[ 'FlyByHelp: not modal' infoPrintCR ]. |
2651 | 739 |
^ self |
740 |
]. |
|
2628
03a41945fb37
do not show flyBy help for a view,
Claus Gittinger <cg@exept.de>
parents:
2612
diff
changeset
|
741 |
]. |
03a41945fb37
do not show flyBy help for a view,
Claus Gittinger <cg@exept.de>
parents:
2612
diff
changeset
|
742 |
]. |
03a41945fb37
do not show flyBy help for a view,
Claus Gittinger <cg@exept.de>
parents:
2612
diff
changeset
|
743 |
|
3786 | 744 |
device := view graphicsDevice. |
4119 | 745 |
pointerPosition := device pointerPosition. |
746 |
||
3418 | 747 |
"/ mouse still over that view? |
4119 | 748 |
cursorView := device viewFromPoint:pointerPosition. |
3418 | 749 |
cursorView ~~ view ifTrue:[ |
4252 | 750 |
Debugging ifTrue:[ 'FlyByHelp: mouse no longer in view' infoPrintCR ]. |
3418 | 751 |
^ self |
752 |
]. |
|
753 |
||
4082 | 754 |
(view == currentView and:[lastHelpText = aHelpText]) ifTrue:[ |
4252 | 755 |
Debugging ifTrue:[ 'FlyByHelp: same text and widget' infoPrintCR ]. |
4082 | 756 |
^ self |
1536 | 757 |
]. |
4119 | 758 |
|
759 |
pointerPositionAtShowTime := pointerPosition. |
|
3228 | 760 |
lastHelpWidget := view. |
1536 | 761 |
lastHelpText := aHelpText. |
3251
afc7d588b25b
handle key press and close help.
Claus Gittinger <cg@exept.de>
parents:
3248
diff
changeset
|
762 |
helpTextShown := aHelpText. |
4129 | 763 |
|
3257 | 764 |
"/ the text originator must already have generated CRs; |
4114 | 765 |
"/ no longer done here (otherwise, we could not generate tooltips with Windows filenames in it) |
3681 | 766 |
textLines := helpTextShown isStringCollection |
767 |
ifTrue:[helpTextShown] |
|
3767 | 768 |
ifFalse:[ |
769 |
helpTextShown isString |
|
4129 | 770 |
ifTrue:[helpTextShown asCollectionOfLines asStringCollection] |
3767 | 771 |
ifFalse:[nil]]. |
772 |
textLines notNil ifTrue:[ |
|
773 |
textLines size > (self class maxNumberOfLines) ifTrue:[ |
|
774 |
textLines := (textLines copyTo:(self class maxNumberOfLines)) copyWith:'...' |
|
775 |
]. |
|
776 |
textLines := textLines collect:[:l | l contractAtEndTo:(self class maxNumberOfColumns)]. |
|
777 |
helpTextShown := textLines asString. |
|
3251
afc7d588b25b
handle key press and close help.
Claus Gittinger <cg@exept.de>
parents:
3248
diff
changeset
|
778 |
]. |
3767 | 779 |
|
2780 | 780 |
(p := closeProcess) notNil ifTrue:[ |
781 |
closeProcess := nil. |
|
1536 | 782 |
p terminate. |
783 |
]. |
|
784 |
currentHelpView notNil ifTrue:[ |
|
785 |
self hideHelp |
|
786 |
]. |
|
787 |
||
3770 | 788 |
"/ Transcript showCR:helpTextShown storeString. |
3769 | 789 |
helpTextShown isEmptyOrNil ifTrue:[^ self]. |
790 |
||
1536 | 791 |
org := view originRelativeTo:nil. |
792 |
currentFrame := org extent:view extent. |
|
2848 | 793 |
org := org + (view extent // 2). |
1536 | 794 |
|
3248
d72c8e4f7684
more control over the shape style
Claus Gittinger <cg@exept.de>
parents:
3247
diff
changeset
|
795 |
wg notNil ifTrue:[ applicationOrNil := wg application ]. |
3786 | 796 |
v := self activeHelpViewForApplication:applicationOrNil text:helpTextShown onDevice:device. |
3251
afc7d588b25b
handle key press and close help.
Claus Gittinger <cg@exept.de>
parents:
3248
diff
changeset
|
797 |
v perform:#controllingHelpListener: with:self ifNotUnderstood:[]. |
1536 | 798 |
|
2848 | 799 |
helpViewWidth := v width. |
800 |
helpViewHeight := v height. |
|
1677
dc49ab70b762
open helpView on the correcdt device
Claus Gittinger <cg@exept.de>
parents:
1657
diff
changeset
|
801 |
|
4082 | 802 |
"https://expeccoalm.exept.de/D226383: keep the help window away from the pointer under any circumstances |
803 |
(especially when the window touches the bottom or the right edge of the screen). |
|
804 |
When the pointer is no longer in the current window, the help window is closed!!" |
|
805 |
pos := device pointerPosition. |
|
806 |
org := pos + (10@18). |
|
3786 | 807 |
monitorBounds := device monitorBoundsAt:org. |
3114 | 808 |
usableWidth := monitorBounds width - 2. |
3786 | 809 |
usableHeight := device usableHeightAt:org. |
3114 | 810 |
|
811 |
helpViewWidth > usableWidth ifTrue:[v width:(helpViewWidth := usableWidth)]. |
|
3247 | 812 |
helpViewHeight > usableHeight ifTrue:[v height:(helpViewHeight := usableHeight)]. |
3114 | 813 |
|
814 |
(org x + helpViewWidth) > (monitorBounds left + usableWidth) ifTrue:[ |
|
4082 | 815 |
org x:(monitorBounds left + usableWidth - helpViewWidth). |
1536 | 816 |
]. |
3114 | 817 |
(org y + helpViewHeight) > (monitorBounds top + usableHeight) ifTrue:[ |
4082 | 818 |
org y:(monitorBounds top + usableHeight - helpViewHeight). |
1536 | 819 |
]. |
4082 | 820 |
((org extent:v extent) containsPoint:pos) ifTrue:[ |
821 |
"pointer would be in the help window (see comment above). |
|
822 |
Help window is at the lower right edge. Move it to the left of the pointer" |
|
823 |
org x:(pos x - helpViewWidth - 20). |
|
824 |
]. |
|
1536 | 825 |
v origin:org. |
826 |
v realize. |
|
827 |
currentHelpView := v. |
|
2392 | 828 |
currentView := view. |
1536 | 829 |
|
3334 | 830 |
showTime := self showTime. |
4082 | 831 |
(showTime > 0) ifTrue:[ |
3959 | 832 |
p := |
833 |
[ |
|
1546 | 834 |
[ |
4082 | 835 |
Delay waitForSeconds:showTime. |
2392 | 836 |
[ |
2780 | 837 |
|v| |
838 |
(v := currentHelpView) notNil ifTrue:[ |
|
2392 | 839 |
currentHelpView := nil. |
2780 | 840 |
v destroy. |
2392 | 841 |
] |
842 |
] valueUninterruptably |
|
843 |
] ifCurtailed:[ |
|
3959 | 844 |
(p == closeProcess) ifTrue:[ closeProcess := nil ]. |
2392 | 845 |
]. |
846 |
] newProcess. |
|
3959 | 847 |
p priority:(Processor userSchedulingPriority + 1). |
848 |
closeProcess := p. |
|
849 |
p resume. |
|
2392 | 850 |
]. |
1536 | 851 |
|
1963
fb6663696d20
removed withCRs in showHelp:
Claus Gittinger <cg@exept.de>
parents:
1893
diff
changeset
|
852 |
"Modified: / 31-08-1995 / 19:20:45 / claus" |
3959 | 853 |
"Modified: / 06-06-2017 / 15:06:41 / cg" |
4082 | 854 |
"Modified (format): / 16-04-2018 / 17:29:10 / stefan" |
4119 | 855 |
"Modified: / 08-06-2018 / 10:28:32 / Claus Gittinger" |
4129 | 856 |
"Modified (format): / 14-06-2018 / 08:29:43 / Claus Gittinger" |
1536 | 857 |
! |
858 |
||
859 |
stopHelpDisplayProcess |
|
860 |
|p| |
|
861 |
||
2680 | 862 |
(p := showProcess) notNil ifTrue:[ |
863 |
showProcess := nil. |
|
1536 | 864 |
p terminate. |
865 |
]. |
|
866 |
||
867 |
"Created: 28.6.1997 / 14:03:17 / cg" |
|
868 |
! ! |
|
869 |
||
4231 | 870 |
!FlyByHelp::HelpKeyInsteadOfHelpTextQuery class methodsFor:'documentation'! |
871 |
||
872 |
documentation |
|
873 |
" |
|
874 |
kludge to force application to return the helpKey instead of the |
|
875 |
help text. |
|
876 |
Answering true will tell the ApplicationModel to return the key. |
|
877 |
(see AppModel >> helpTextForKey:) |
|
878 |
||
879 |
[author:] |
|
880 |
Claus Gittinger |
|
881 |
||
882 |
[instance variables:] |
|
883 |
||
884 |
[class variables:] |
|
885 |
||
886 |
[see also:] |
|
887 |
||
888 |
" |
|
889 |
! ! |
|
890 |
||
891 |
!FlyByHelp::HelpKeyInsteadOfHelpTextQuery methodsFor:'defaults'! |
|
892 |
||
893 |
defaultResumeValue |
|
894 |
^ false |
|
895 |
||
896 |
"Created: / 22-02-2019 / 09:48:28 / Claus Gittinger" |
|
897 |
! ! |
|
898 |
||
1536 | 899 |
!FlyByHelp class methodsFor:'documentation'! |
900 |
||
2979
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
901 |
version |
3656 | 902 |
^ '$Header$' |
2979
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
903 |
! |
306456bdfb61
comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents:
2978
diff
changeset
|
904 |
|
2754 | 905 |
version_CVS |
3656 | 906 |
^ '$Header$' |
1536 | 907 |
! ! |
3114 | 908 |