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