FlyByHelp.st
author Claus Gittinger <cg@exept.de>
Wed, 27 Feb 2019 15:56:55 +0100
changeset 4237 4c0ddd2ce72e
parent 4233 7bc96946d912
child 4252 ebdd626ee83b
permissions -rw-r--r--
#QUALITY by cg class: FlyByHelp changed: #initiateHelpFor:at:now:
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
4119
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
    17
	instanceVariableNames:'currentFrame currentView currentHelpView showProcess closeProcess'
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
    18
	classVariableNames:'MaxNumberOfLines MaxNumberOfColumns'
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
    19
	poolDictionaries:''
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
    20
	category:'Interface-Help'
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
4231
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
    23
Query subclass:#HelpKeyInsteadOfHelpTextQuery
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
    24
	instanceVariableNames:''
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
    25
	classVariableNames:''
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
    26
	poolDictionaries:''
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
    27
	privateIn:FlyByHelp
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
    28
!
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
    29
1802
ef3539bf86b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1768
diff changeset
    30
!FlyByHelp class methodsFor:'documentation'!
ef3539bf86b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1768
diff changeset
    31
ef3539bf86b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1768
diff changeset
    32
copyright
ef3539bf86b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1768
diff changeset
    33
"
ef3539bf86b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1768
diff changeset
    34
 COPYRIGHT (c) 2001 by eXept Software AG
ef3539bf86b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1768
diff changeset
    35
              All Rights Reserved
ef3539bf86b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1768
diff changeset
    36
ef3539bf86b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1768
diff changeset
    37
 This software is furnished under a license and may be used
ef3539bf86b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1768
diff changeset
    38
 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
    39
 inclusion of the above copyright notice.   This software may not
ef3539bf86b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1768
diff changeset
    40
 be provided or otherwise made available to, or used by, any
ef3539bf86b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1768
diff changeset
    41
 other person.  No title to or ownership of the software is
ef3539bf86b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1768
diff changeset
    42
 hereby transferred.
ef3539bf86b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1768
diff changeset
    43
"
1893
f369ffca3d9f *** empty log message ***
ca
parents: 1892
diff changeset
    44
!
f369ffca3d9f *** empty log message ***
ca
parents: 1892
diff changeset
    45
4055
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    46
documentation
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    47
"
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    48
    an instance of me is used to provide tooltips 
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    49
    (sigh: smalltalk was ahead of its time in the early 90's:
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    50
     initially called 'activeHelp', then renamed to 'flyByHelp' 
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    51
     and now commonly known as tooltip).
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    52
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    53
    I will watch the mouse movements via an event hook, and determine
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    54
    where the mouse pointer is. Then ask the underlying view about its
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    55
    helpText and display it in a little floating popup view.
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    56
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    57
    The hool is installed via:
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    58
     FlyByHelp start
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    59
    and possibly deactivated/uninstalled via:
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    60
     FlyByHelp stop
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    61
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    62
    There can be only one FlyByHelp at any time - the start/stop methods
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    63
    assure that.
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    64
"
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    65
!
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
    66
1893
f369ffca3d9f *** empty log message ***
ca
parents: 1892
diff changeset
    67
examples
f369ffca3d9f *** empty log message ***
ca
parents: 1892
diff changeset
    68
"
3220
1181c3afbb10 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3216
diff changeset
    69
    UserPreferences current toolTipShapeStyle:nil
1181c3afbb10 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3216
diff changeset
    70
    UserPreferences current toolTipShapeStyle:#cartoon
1181c3afbb10 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3216
diff changeset
    71
1893
f369ffca3d9f *** empty log message ***
ca
parents: 1892
diff changeset
    72
     FlyByHelp isActive
f369ffca3d9f *** empty log message ***
ca
parents: 1892
diff changeset
    73
f369ffca3d9f *** empty log message ***
ca
parents: 1892
diff changeset
    74
     FlyByHelp stop
f369ffca3d9f *** empty log message ***
ca
parents: 1892
diff changeset
    75
     FlyByHelp start
f369ffca3d9f *** empty log message ***
ca
parents: 1892
diff changeset
    76
"
1802
ef3539bf86b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1768
diff changeset
    77
! !
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
2692
5fe75b7fb83a access to current flyBy
Claus Gittinger <cg@exept.de>
parents: 2684
diff changeset
    79
!FlyByHelp class methodsFor:'accessing'!
5fe75b7fb83a access to current flyBy
Claus Gittinger <cg@exept.de>
parents: 2684
diff changeset
    80
5fe75b7fb83a access to current flyBy
Claus Gittinger <cg@exept.de>
parents: 2684
diff changeset
    81
currentlyShownView
2846
e90ba00f9df1 changed: #currentlyShownView
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
    82
    TheOneAndOnlyHelpListener isNil ifTrue:[^ nil].
2692
5fe75b7fb83a access to current flyBy
Claus Gittinger <cg@exept.de>
parents: 2684
diff changeset
    83
    ^ TheOneAndOnlyHelpListener currentlyShownView
2846
e90ba00f9df1 changed: #currentlyShownView
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
    84
e90ba00f9df1 changed: #currentlyShownView
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
    85
    "Modified: / 09-06-2010 / 16:35:48 / cg"
3255
358f5696bc0d class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3251
diff changeset
    86
!
358f5696bc0d class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3251
diff changeset
    87
4231
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
    88
helpKeyInsteadOfHelpTextQuery
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
    89
    ^ HelpKeyInsteadOfHelpTextQuery
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
    90
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
    91
    "Created: / 22-02-2019 / 09:38:18 / Claus Gittinger"
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
    92
!
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
    93
3255
358f5696bc0d class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3251
diff changeset
    94
maxNumberOfColumns
358f5696bc0d class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3251
diff changeset
    95
    ^ MaxNumberOfColumns ? 200
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
358f5696bc0d class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3251
diff changeset
    98
maxNumberOfLines
358f5696bc0d class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3251
diff changeset
    99
    ^ MaxNumberOfLines ? 40
2692
5fe75b7fb83a access to current flyBy
Claus Gittinger <cg@exept.de>
parents: 2684
diff changeset
   100
! !
5fe75b7fb83a access to current flyBy
Claus Gittinger <cg@exept.de>
parents: 2684
diff changeset
   101
2684
de2d170a80ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2680
diff changeset
   102
!FlyByHelp methodsFor:'defaults'!
de2d170a80ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2680
diff changeset
   103
de2d170a80ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2680
diff changeset
   104
flyByHelpTimeoutMillis
de2d170a80ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2680
diff changeset
   105
    "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
   106
     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
   107
     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
   108
     it takes too long to parse...
de2d170a80ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2680
diff changeset
   109
     The returned time is given in ms"
de2d170a80ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2680
diff changeset
   110
de2d170a80ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2680
diff changeset
   111
    ^ 300
de2d170a80ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2680
diff changeset
   112
! !
de2d170a80ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2680
diff changeset
   113
4233
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   114
!FlyByHelp methodsFor:'developer menu'!
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   115
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   116
openDeveloperMenuFor:aView at:aPoint
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   117
    "with CTRL+SHIFT, this menu appears"
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   118
    
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   119
    |app helpText helpKey|
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   120
    
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   121
    app := aView topView application.
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   122
    app enqueueDelayedAction:[
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   123
        |editor m canDefineTranslationForLabel canDefineTranslationForHelpText|
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   124
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   125
        m := Menu new.
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   126
        m addItem:(MenuItem 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   127
            label: 'Edit Resources'
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   128
            itemValue:[ 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   129
                app enqueueDelayedAction:[
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   130
                    app withWaitCursorDo:[
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   131
                        editor := Tools::InternationalLanguageTranslationEditor
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   132
                                        openOnPackage:((aView topView application ? aView) class package).
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   133
                        editor selectOrAddKey:(lastHelpText storeString withoutCRs).
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   134
                        Transcript showCR:'help text is: %1' with:lastHelpText storeString withoutCRs.
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   135
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   136
                    ].    
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   137
                ].    
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   138
            ]).
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   139
        m addItem:(MenuItem 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   140
            label: 'Browse Resources'
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   141
            itemValue:[ 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   142
                app enqueueDelayedAction:[
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   143
                    app withWaitCursorDo:[
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   144
                        FileBrowser default 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   145
                            openOn:(app class projectDefinitionClass 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   146
                                        packageDirectory / 'resources').
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   147
                    ].    
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   148
                ].    
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   149
            ]).
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   150
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   151
        canDefineTranslationForLabel := 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   152
            [
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   153
                (aView isKindOf:Label) or:[aView respondsTo:#label]
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   154
            ].    
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   155
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   156
        canDefineTranslationForHelpText := 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   157
            [
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   158
                |ok|
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   159
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   160
                ok := lastHelpText notEmptyOrNil.
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   161
                ok := ok or:[ (helpText := aView helpTextAt:aPoint) notEmptyOrNil].
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   162
                ok := ok or:[ (helpText := aView helpText) notEmptyOrNil].
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   163
                ok := ok or:[ (helpKey := aView helpKey) notNil].
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   164
                ok := ok or:[ (helpText := app helpTextFor:aView) notEmptyOrNil ].
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   165
                ok
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   166
            ].
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   167
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   168
        m addItem:(MenuItem 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   169
            label: 'Define Translation for Label...'
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   170
            itemValue:[
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   171
                |package key |
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   172
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   173
                key := aView label asString string.
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   174
                package := app class package.
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   175
                ResourcePack defineResourceFor:key package:package.
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   176
            ]
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   177
            enabled:canDefineTranslationForLabel).
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   178
        m addItem:(MenuItem 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   179
            label: 'Define Translation for Helptext...'
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   180
            itemValue:[
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   181
                |package key |
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   182
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   183
                key := (lastHelpText ? helpText ? helpKey) asString string.
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   184
                package := app class package.
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   185
                ResourcePack defineResourceFor:key package:package.
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   186
            ]
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   187
            enabled:canDefineTranslationForHelpText).
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   188
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   189
        m addSeparator. 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   190
        m addItem:(MenuItem 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   191
            label: 'Browse Application'
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   192
            itemValue:[ SystemBrowser default openInClass:aView application class]).
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   193
            
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   194
        m addItem:(MenuItem 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   195
            label: 'UI Painter'
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   196
            itemValue:[ UIPainter openOnClass:aView application class andSelector:#windowSpec]).
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   197
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   198
        aView application ~~ app ifTrue:[    
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   199
            m addSeparator. 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   200
            m addItem:(MenuItem 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   201
                label: 'Browse Top Application'
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   202
                itemValue:[ SystemBrowser default openInClass:app class]).
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   203
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   204
            m addItem:(MenuItem 
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   205
                label: 'UI Painter on Top Application'
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   206
                itemValue:[ UIPainter openOnClass:app class andSelector:#windowSpec]).
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 showAtPointer.
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   210
    ].
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   211
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   212
    "Created: / 22-02-2019 / 09:32:35 / Claus Gittinger"
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   213
! !
7bc96946d912 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4231
diff changeset
   214
2392
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   215
!FlyByHelp methodsFor:'event handling'!
1540
f6948fc36460 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
   216
2474
ef24105ee7a2 code cleanup (arg-names)
Claus Gittinger <cg@exept.de>
parents: 2392
diff changeset
   217
buttonMotion:buttonAndModifierState x:x y:y view:aView
2519
af89806c67e4 comment
Claus Gittinger <cg@exept.de>
parents: 2518
diff changeset
   218
    aView == currentHelpView ifTrue:[
af89806c67e4 comment
Claus Gittinger <cg@exept.de>
parents: 2518
diff changeset
   219
        "/ the help-bubble itself
af89806c67e4 comment
Claus Gittinger <cg@exept.de>
parents: 2518
diff changeset
   220
        ^ false
af89806c67e4 comment
Claus Gittinger <cg@exept.de>
parents: 2518
diff changeset
   221
    ].
af89806c67e4 comment
Claus Gittinger <cg@exept.de>
parents: 2518
diff changeset
   222
4055
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
   223
    "/ don't start tooltip, if this view is not active.
92c2d38634c1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4048
diff changeset
   224
    "/ 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
   225
    "/ 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
   226
    "/      aView topView isActive ifFalse:[^ false].
2477
b009e0b51999 suppress tooltip for inactive (lower) windows
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   227
2474
ef24105ee7a2 code cleanup (arg-names)
Claus Gittinger <cg@exept.de>
parents: 2392
diff changeset
   228
    ^ super buttonMotion:buttonAndModifierState x:x y:y view:aView
1540
f6948fc36460 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
   229
!
f6948fc36460 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
   230
2611
f578b9c43a6f handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   231
buttonPress:button x:x y:y view:aView
3198
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   232
    |prevView|
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   233
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   234
    "/ hideHelp nils the currentView
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   235
    "/ 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
   236
    "/ until the mouse really leaves the view
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   237
    "/ let's call this the "do-not-show-in-this-view mode"
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   238
    prevView := currentView.
2978
4358a9302b95 changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents: 2925
diff changeset
   239
    self hideHelp.
3198
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   240
    currentView := prevView.
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   241
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   242
    ^ false
2978
4358a9302b95 changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents: 2925
diff changeset
   243
4358a9302b95 changed: #buttonPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents: 2925
diff changeset
   244
    "Modified: / 23-12-2011 / 20:37:28 / cg"
2611
f578b9c43a6f handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   245
!
f578b9c43a6f handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   246
f578b9c43a6f handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   247
keyPress:key x:x y:y view:aView
4226
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   248
    <resource: #keyboard (#Escape #Control #Shift)>
3216
f9312a1f2e9d class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   249
4228
699d09d62316 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4227
diff changeset
   250
    |prevView text|
3198
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   251
2885
a70144d85a81 changed: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents: 2884
diff changeset
   252
    currentHelpView notNil ifTrue:[
4237
4c0ddd2ce72e #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4233
diff changeset
   253
        key == $§ ifTrue:[
2979
306456bdfb61 comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   254
            "/ generate a line suitable for the resources file (a null translation)
3216
f9312a1f2e9d class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   255
            "/ into the clipboard; makes it easy to add missing translations to a .rs file,
4082
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   256
            "/ by pressing paragraph whenever you see an untranslated helptext
4228
699d09d62316 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4227
diff changeset
   257
            text := (lastHelpText storeString withoutCRs, '    ' , lastHelpText storeString withoutCRs).
699d09d62316 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4227
diff changeset
   258
            aView setClipboardText:text.
2612
Claus Gittinger <cg@exept.de>
parents: 2611
diff changeset
   259
            self hideHelp.
4230
240c17007808 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4228
diff changeset
   260
            ^ false
2612
Claus Gittinger <cg@exept.de>
parents: 2611
diff changeset
   261
        ].
2979
306456bdfb61 comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   262
        key == #Escape ifTrue:[
3198
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   263
            prevView := currentView.
2979
306456bdfb61 comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   264
            self hideHelp.
3198
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   265
            currentView := prevView.
4230
240c17007808 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4228
diff changeset
   266
            ^ false
2885
a70144d85a81 changed: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents: 2884
diff changeset
   267
        ].
4228
699d09d62316 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4227
diff changeset
   268
        (#(#'Shift' #'Shift_L' #'Shift_R') includes:key) ifTrue:[
699d09d62316 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4227
diff changeset
   269
            aView device ctrlDown ifTrue:[
4230
240c17007808 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4228
diff changeset
   270
                self hideHelp.
4231
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   271
                self openDeveloperMenuFor:aView at:x@y
4230
240c17007808 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4228
diff changeset
   272
            ].
240c17007808 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4228
diff changeset
   273
            ^ false
4228
699d09d62316 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4227
diff changeset
   274
        ].
699d09d62316 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4227
diff changeset
   275
        
699d09d62316 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4227
diff changeset
   276
        (#(#'Control' #'Control_L' #'Control_R') includes:key) ifTrue:[
4226
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   277
            "/ reopen showing the key
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   278
            self initiateHelpFor:aView at:(x@y) now:true.
4230
240c17007808 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4228
diff changeset
   279
            ^ false
4226
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   280
        ].
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   281
        
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   282
        (#('Shift' #'Shift_L' #'Shift_R' #'Control' #'Control_L' #'Control_R') includes:key) ifTrue:[
3216
f9312a1f2e9d class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   283
            "/ do not close on those...
f9312a1f2e9d class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   284
            ^ false
f9312a1f2e9d class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   285
        ].
4226
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   286
    ].    
3198
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   287
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   288
    "/ hideHelp nils the currentView
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   289
    "/ 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
   290
    "/ until the mouse really leaves the view
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   291
    "/ let's call this the "do-not-show-in-this-view mode"
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   292
    prevView := currentView.
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   293
    self hideHelpIgnoringErrors.
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   294
    currentView := prevView.
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   295
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   296
    ^ false
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   297
    "/ ^ 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
   298
2979
306456bdfb61 comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   299
    "Modified (format): / 25-12-2011 / 10:25:23 / cg"
4082
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   300
    "Modified (format): / 16-04-2018 / 16:53:15 / stefan"
4231
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   301
    "Modified: / 22-02-2019 / 09:32:28 / Claus Gittinger"
4226
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   302
!
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   303
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   304
keyRelease:key x:x y:y view:aView
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   305
    <resource: #keyboard (#Control)>
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   306
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   307
    currentHelpView notNil ifTrue:[
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   308
        (#(#'Control' #'Control_L' #'Control_R') includes:key) ifTrue:[
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   309
            "/ reopen showing the text
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   310
            self initiateHelpFor:aView at:(x@y) now:true.
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   311
            ^ true
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   312
        ].
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   313
        (#('Shift' #'Shift_L' #'Shift_R' #'Control' #'Control_L' #'Control_R') includes:key) ifTrue:[
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   314
            "/ do not close on those...
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   315
            ^ false
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   316
        ].
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   317
    ].
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   318
    ^ super keyRelease:key x:x y:y view:aView
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   319
d1dcdcb20574 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4220
diff changeset
   320
    "Created: / 20-02-2019 / 11:26:19 / Claus Gittinger"
2611
f578b9c43a6f handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   321
!
f578b9c43a6f handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   322
2521
7e51aa294156 care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents: 2519
diff changeset
   323
mouseWheelMotion:state x:x y:y amount:amount deltaTime:dTime view:aView
7e51aa294156 care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents: 2519
diff changeset
   324
    currentHelpView notNil ifTrue:[
7e51aa294156 care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents: 2519
diff changeset
   325
        self handleMouseIn:aView x:x y:y.
7e51aa294156 care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents: 2519
diff changeset
   326
    ].
7e51aa294156 care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents: 2519
diff changeset
   327
    ^ false
7e51aa294156 care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents: 2519
diff changeset
   328
!
7e51aa294156 care for mousewheel while showing help
Claus Gittinger <cg@exept.de>
parents: 2519
diff changeset
   329
1540
f6948fc36460 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
   330
pointerLeave:state view:aView
2611
f578b9c43a6f handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   331
    aView == currentHelpView ifTrue:[^ true].
3198
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   332
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   333
    "/ clear the do-not-show-in-this-view mode (see keyPress)
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   334
"/     (currentHelpView isNil and:[currentView notNil]) ifTrue:[currentView := nil].
a43053b56eb3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   335
2611
f578b9c43a6f handle escape key to close flyByHelp
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   336
    ^ super pointerLeave:state view:aView
1540
f6948fc36460 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
   337
! !
f6948fc36460 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
   338
2392
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   339
!FlyByHelp methodsFor:'help texts'!
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   341
helpTextFromModel:aModel view:aView at:aPointOrNil 
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
    "helper: ask aModel for its helpText."
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
    |text|
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
4048
eceffed47e1c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4040
diff changeset
   346
    (aPointOrNil notNil and:[aModel respondsTo:#helpTextFor:at:]) ifTrue:[
eceffed47e1c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4040
diff changeset
   347
        text := aModel helpTextFor:aView at:aPointOrNil.
4121
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   348
        text notNil ifTrue:[
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   349
            "/ Transcript showCR:aModel.
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   350
            "/ Transcript showCR:'via model-text'; showCR:text.
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   351
            ^ text
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   352
        ].
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
    ].
4048
eceffed47e1c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4040
diff changeset
   354
    (aModel respondsTo:#helpTextFor:) ifTrue:[
eceffed47e1c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4040
diff changeset
   355
        text := aModel helpTextFor:aView.
4121
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   356
        text notNil ifTrue:[
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   357
            "/ Transcript showCR:aModel.
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   358
            "/ Transcript showCR:'via model-text'; showCR:text.
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   359
            ^ text
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   360
        ].
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
    ].
2754
4c3b40eba71b changed:
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
   362
    ^ nil
4040
1d540ba7a1d1 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3959
diff changeset
   363
1d540ba7a1d1 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3959
diff changeset
   364
    "Modified: / 09-01-2018 / 17:35:26 / stefan"
4121
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   365
    "Modified: / 11-06-2018 / 09:53:40 / Claus Gittinger"
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   366
!
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   368
helpTextFromView:aView at:aPointOrNil 
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
    "helper: ask aView for its helpText."
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
2754
4c3b40eba71b changed:
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
   371
    |text key app|
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
4121
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   373
    "/ is there any view which does not understand helpTextAt: ???
4048
eceffed47e1c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4040
diff changeset
   374
    (aPointOrNil notNil and:[aView respondsTo:#helpTextAt:]) ifTrue:[
eceffed47e1c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4040
diff changeset
   375
        text := aView helpTextAt:aPointOrNil.
4121
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   376
        text notNil ifTrue:[
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   377
            "/ Transcript showCR:'via helpTextAt:'; showCR:text.
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   378
            ^ text
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   379
        ].
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
    ].
4121
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   381
    "/ is there any view which does not understand helpText ???
4048
eceffed47e1c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4040
diff changeset
   382
    (aView respondsTo:#helpText) ifTrue:[
eceffed47e1c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4040
diff changeset
   383
        text := aView helpText.
4121
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   384
        text notNil ifTrue:[
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   385
            "/ Transcript showCR:'via helpText'; showCR:text.
4220
3cd77e608abb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4175
diff changeset
   386
            ^ text value
4121
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   387
        ].
2754
4c3b40eba71b changed:
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
   388
    ].
3804
23207b26bfee #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3803
diff changeset
   389
    "/ to be enabled in next release...
23207b26bfee #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3803
diff changeset
   390
"/    (aView superView notNil
4048
eceffed47e1c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4040
diff changeset
   391
"/    and:[aView superView respondsTo:#helpTextFor:]) ifTrue:[
eceffed47e1c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4040
diff changeset
   392
"/        text := aView superView helpTextFor:aView.
3804
23207b26bfee #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3803
diff changeset
   393
"/        text notNil ifTrue:[^ text].
23207b26bfee #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3803
diff changeset
   394
"/    ].
4121
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   395
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   396
    "/ is there any view which does not understand helpKey ???
2754
4c3b40eba71b changed:
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
   397
    (aView respondsTo:#helpKey) ifTrue:[
4c3b40eba71b changed:
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
   398
        key := aView helpKey.
4c3b40eba71b changed:
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
   399
        key notNil ifTrue:[
4c3b40eba71b changed:
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
   400
            app := aView application.
4c3b40eba71b changed:
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
   401
            app isNil ifTrue:[
4175
b78ca1f5c2ee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4129
diff changeset
   402
                |topView topViewsHelpSpec|
b78ca1f5c2ee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4129
diff changeset
   403
                
3763
72a6db06eee5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3681
diff changeset
   404
                "/ special case for oldStyle Dialog subclasses.
4175
b78ca1f5c2ee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4129
diff changeset
   405
                topView := aView topView.
b78ca1f5c2ee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4129
diff changeset
   406
                (topViewsHelpSpec := topView helpSpec) notNil ifTrue:[
b78ca1f5c2ee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4129
diff changeset
   407
                    text := topViewsHelpSpec at:key ifAbsent:nil.
3763
72a6db06eee5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3681
diff changeset
   408
                    text notNil ifTrue:[
4121
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   409
                        "/ Transcript showCR:'via topViewspec+helpKey'; showCR:text.
4175
b78ca1f5c2ee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4129
diff changeset
   410
                        ^ topView resources stringWithCRs:text.
3763
72a6db06eee5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3681
diff changeset
   411
                    ].    
72a6db06eee5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3681
diff changeset
   412
                ].    
2754
4c3b40eba71b changed:
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
   413
                app := Error handle:[:ex | nil] do:[ aView windowGroup mainGroup application ].
4c3b40eba71b changed:
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
   414
            ].
4c3b40eba71b changed:
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
   415
            app notNil ifTrue:[
4121
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   416
                text := app helpTextForKey:key.
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   417
                true "text notNil" ifTrue:[
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   418
                    "/ Transcript showCR:'via helpKey+helpTextForKey:'; showCR:text.
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   419
                    ^ text
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   420
                ].
2754
4c3b40eba71b changed:
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
   421
            ].
4121
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   422
            text := aView resources string:key.
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   423
            true "(text notNil and:[text ~= key])" ifTrue:[
c9c15ae83c1c #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   424
                "/ Transcript showCR:'via helpKey'; showCR:text.
4110
1a4cf666aafe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4082
diff changeset
   425
                ^ text
1a4cf666aafe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4082
diff changeset
   426
            ]    
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
        ].
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
    ].
2754
4c3b40eba71b changed:
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
   429
    ^ nil.
4040
1d540ba7a1d1 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3959
diff changeset
   430
1d540ba7a1d1 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3959
diff changeset
   431
    "Modified: / 09-01-2018 / 17:38:42 / stefan"
4111
f42780e51cc1 #REFACTORING by sr
sr
parents: 4110
diff changeset
   432
    "Modified (format): / 07-06-2018 / 09:51:41 / sr"
4220
3cd77e608abb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4175
diff changeset
   433
    "Modified: / 07-02-2019 / 19:18:39 / Claus Gittinger"
2392
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   434
! !
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   435
4119
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   436
!FlyByHelp methodsFor:'queries'!
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   437
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   438
currentlyShownView
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   439
    ^ currentHelpView
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   440
!
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   441
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   442
toolTipFollowsMouse
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   443
    "if true, the tooltip-window moves with the pointer
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   444
     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
   445
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   446
    ^ false
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   447
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   448
    "Modified: / 06-06-2018 / 17:37:19 / Claus Gittinger"
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   449
! !
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   450
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   451
!FlyByHelp methodsFor:'show & hide help'!
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   452
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   453
activeHelpViewForApplication:applicationOrNil text:helpText onDevice:aDevice
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   454
    applicationOrNil notNil ifTrue:[
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   455
        ^ applicationOrNil activeHelpViewFor:helpText onDevice:aDevice
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   456
    ].
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   457
    ^ ActiveHelpView for:helpText onDevice:aDevice.
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   458
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   459
    "
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   460
     (ActiveHelpView for:'Hello' onDevice:Display) open
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   461
    "
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   462
!
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   463
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   464
hideHelp
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   465
    "hide the help text"
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   466
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   467
    |p|
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   468
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   469
    "/ lastHelpText := nil.
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   470
    self stopHelpDisplayProcess.
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   471
    lastHelpText := nil.
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   472
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   473
    currentHelpView notNil ifTrue:[
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   474
        [
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   475
            currentHelpView notNil ifTrue:[
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   476
                currentHelpView destroy.
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   477
                currentHelpView := nil.
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   478
                currentView := nil.
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   479
            ]
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   480
        ] valueUninterruptably
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   481
    ].
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   482
    currentFrame := nil.
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   483
    (p := closeProcess) notNil ifTrue:[
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   484
        closeProcess := nil.
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   485
        p terminate.
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   486
    ]
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   487
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   488
    "Modified: / 28-06-1997 / 14:03:50 / cg"
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   489
    "Modified: / 16-04-2018 / 16:51:01 / stefan"
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   490
!
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   491
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   492
hideIfPointerLeft:aView
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   493
    "hide help, if the pointer is not in aView"
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   494
4119
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   495
    |helpFrame whereOnScreen|
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   496
4119
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   497
    (helpFrame := currentFrame) notNil ifTrue:[
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   498
        whereOnScreen := aView graphicsDevice pointerPosition.
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   499
4119
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   500
        ((helpFrame insetBy:1@1) containsPoint:whereOnScreen) ifFalse:[
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
            self hideHelp.
4119
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   502
        ] ifTrue:[
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   503
            pointerPositionAtShowTime notNil ifTrue:[
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   504
                (whereOnScreen dist:pointerPositionAtShowTime) > 10 ifTrue:[
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   505
                    self hideHelp.
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   506
                ].    
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   507
            ].    
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   508
        ].            
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   509
    ].
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   510
4082
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   511
    "Modified: / 28-05-1996 / 20:18:28 / cg"
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   512
    "Modified: / 16-04-2018 / 16:59:48 / stefan"
4119
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   513
    "Modified: / 08-06-2018 / 10:30:04 / Claus Gittinger"
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   514
!
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   515
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   516
initiateHelpFor:aView at:aPointOrNil now:showItNow
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   517
    "ask aView for helpText, passing x/y coordinates;
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   518
     start a timeout process to display this helpText after some delay;
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   519
     Normally used internally, but can also be used by widgets to force 
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   520
     re-negotiation of the displayed helpText 
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   521
     (for example in a menu, when the selection changes)"
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   522
4110
1a4cf666aafe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4082
diff changeset
   523
    |text delayTime|
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   524
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   525
    (self interestedIn:aView) ifFalse:[
4237
4c0ddd2ce72e #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4233
diff changeset
   526
        Debugging ifTrue:[
4c0ddd2ce72e #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4233
diff changeset
   527
            'not interested' infoPrintCR
4c0ddd2ce72e #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4233
diff changeset
   528
        ].    
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   529
        ^ self
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
    ].
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
2680
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
   532
    "/ 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
   533
    "/ 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
   534
    [
2826
74bd82edee5a changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents: 2799
diff changeset
   535
        Error handle:[:ex |
3394
d1f97f49ea4f class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3334
diff changeset
   536
            ('FlyByhelp [warning]: error while asking for helpText: ',ex description) errorPrintCR.
3675
c7ba11759026 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3656
diff changeset
   537
            Transcript showCR:'-------------------------'.
3394
d1f97f49ea4f class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3334
diff changeset
   538
            ex suspendedContext fullPrintAllOn:Transcript.
2872
ea7e6fe01727 comment/format in: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   539
            "/ self halt.
2826
74bd82edee5a changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents: 2799
diff changeset
   540
        ] do:[
4231
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   541
            HelpKeyInsteadOfHelpTextQuery answer:(aView device ctrlDown) do:[
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   542
                text := self helpTextFor:aView at:aPointOrNil.
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   543
            ].
2826
74bd82edee5a changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents: 2799
diff changeset
   544
        ].
3656
de582c82fa70 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   545
    ] valueWithWatchDog:[ 
de582c82fa70 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   546
        'FlyByhelp [info]: flyBy text generation took too long' infoPrintCR.
de582c82fa70 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   547
        ^ self 
de582c82fa70 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   548
    ] afterMilliseconds:(self flyByHelpTimeoutMillis).
2679
552847065fb3 car not to hog the cpu by flyByHelp processing
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
   549
4110
1a4cf666aafe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4082
diff changeset
   550
    false ifTrue:[
1a4cf666aafe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4082
diff changeset
   551
        (text notNil and:[text isEmpty]) ifTrue:[ 
1a4cf666aafe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4082
diff changeset
   552
            Logger warning:('empty help from: ',aView class printString)
1a4cf666aafe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4082
diff changeset
   553
        ] ifFalse:[
1a4cf666aafe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4082
diff changeset
   554
            text isEmptyOrNil ifTrue:[ 
1a4cf666aafe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4082
diff changeset
   555
                Logger warning:('no help from: ',aView class printString)
1a4cf666aafe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4082
diff changeset
   556
            ].
1a4cf666aafe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4082
diff changeset
   557
        ].
1a4cf666aafe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4082
diff changeset
   558
    ].
1a4cf666aafe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4082
diff changeset
   559
    
4082
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   560
    (lastHelpText = text and:[lastHelpWidget == aView]) ifTrue:[ 
4237
4c0ddd2ce72e #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4233
diff changeset
   561
        Debugging == true ifTrue:[
4c0ddd2ce72e #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4233
diff changeset
   562
            'same text: ' infoPrint. text infoPrintCR.
4c0ddd2ce72e #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4233
diff changeset
   563
        ].    
4082
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   564
        self toolTipFollowsMouse ifFalse:[
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   565
            ^ self
2392
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   566
        ]
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   567
    ].
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   568
4110
1a4cf666aafe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4082
diff changeset
   569
    ((text size > 0) or:[text notNil and:[text isString not]]) ifTrue:[
2778
8b91cf06a145 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2777
diff changeset
   570
        (showItNow not and:[(delayTime := self delayTime) > 0]) ifTrue:[
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   571
            self stopHelpDisplayProcess.
2392
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   572
            showProcess := 
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   573
                [
2680
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
   574
                    Delay waitForSeconds:delayTime.
2774
7894ba397774 changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents: 2754
diff changeset
   575
                    [
3766
4d3c0206456a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3763
diff changeset
   576
                        aView device notNil ifTrue:[    
4d3c0206456a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3763
diff changeset
   577
                            aView device anyButtonPressed ifFalse:[
4d3c0206456a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3763
diff changeset
   578
                                showProcess := nil.
4d3c0206456a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3763
diff changeset
   579
                                self showHelp:text for:aView
4d3c0206456a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3763
diff changeset
   580
                            ]
4d3c0206456a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3763
diff changeset
   581
                        ].
2774
7894ba397774 changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents: 2754
diff changeset
   582
                    ] ensure:[
7894ba397774 changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents: 2754
diff changeset
   583
                        showProcess := nil.
2680
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
   584
                    ]
2392
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   585
                ] forkAt:(Processor userSchedulingPriority + 1).
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   586
        ] ifFalse:[
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   587
            self showHelp:text for:aView
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   588
        ]
1542
f63515aab510 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1540
diff changeset
   589
    ] ifFalse:[
f63515aab510 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1540
diff changeset
   590
        self hideHelp
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   591
    ].
2872
ea7e6fe01727 comment/format in: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   592
2901
fed697afcef8 changed: #initiateHelpFor:at:now:
Claus Gittinger <cg@exept.de>
parents: 2900
diff changeset
   593
    "Modified: / 22-03-2011 / 19:10:28 / cg"
4082
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   594
    "Modified: / 16-04-2018 / 12:20:33 / stefan"
4237
4c0ddd2ce72e #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 4233
diff changeset
   595
    "Modified: / 27-02-2019 / 11:28:52 / Claus Gittinger"
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   596
!
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   597
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   598
showHelp:aHelpText for:view
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   599
    "show the help text for aView"
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   600
3786
c628a30083c3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3770
diff changeset
   601
    |wg applicationOrNil org p v device helpTextShown textLines
3334
d334c9dd9b76 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3321
diff changeset
   602
     helpViewWidth helpViewHeight usableWidth monitorBounds usableHeight
4119
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   603
     showTime cursorView pos pointerPosition|
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   604
2781
31725cdfbe43 leftover print
Claus Gittinger <cg@exept.de>
parents: 2780
diff changeset
   605
    "/ thisContext fullPrintAllOn:Transcript.
2651
7275384a60c7 care for nil windowGroup
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
   606
    (wg := view windowGroup) notNil ifTrue:[
7275384a60c7 care for nil windowGroup
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
   607
        wg isInModalLoop ifTrue:[
7275384a60c7 care for nil windowGroup
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
   608
            wg isModal ifFalse:[
7275384a60c7 care for nil windowGroup
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
   609
                ^ self
7275384a60c7 care for nil windowGroup
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
   610
            ].
2628
03a41945fb37 do not show flyBy help for a view,
Claus Gittinger <cg@exept.de>
parents: 2612
diff changeset
   611
        ].
03a41945fb37 do not show flyBy help for a view,
Claus Gittinger <cg@exept.de>
parents: 2612
diff changeset
   612
    ].
03a41945fb37 do not show flyBy help for a view,
Claus Gittinger <cg@exept.de>
parents: 2612
diff changeset
   613
3786
c628a30083c3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3770
diff changeset
   614
    device := view graphicsDevice.
4119
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   615
    pointerPosition := device pointerPosition.
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   616
    
3418
a758dd978f99 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
   617
    "/ mouse still over that view?
4119
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   618
    cursorView := device viewFromPoint:pointerPosition.
3418
a758dd978f99 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
   619
    cursorView ~~ view ifTrue:[
a758dd978f99 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
   620
        Debugging ifTrue:[ 'mouse no longer in view' infoPrintCR ].
a758dd978f99 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
   621
        ^ self
a758dd978f99 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
   622
    ].
a758dd978f99 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
   623
4082
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   624
    (view == currentView and:[lastHelpText = aHelpText]) ifTrue:[
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   625
        ^ self
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   626
    ].
4119
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   627
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   628
    pointerPositionAtShowTime := pointerPosition.
3228
187a4158a51a class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3220
diff changeset
   629
    lastHelpWidget := view.
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   630
    lastHelpText := aHelpText.
3251
afc7d588b25b handle key press and close help.
Claus Gittinger <cg@exept.de>
parents: 3248
diff changeset
   631
    helpTextShown := aHelpText.
4129
f6e152e7c328 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4121
diff changeset
   632
    
3257
382b74692cfc class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3255
diff changeset
   633
    "/ the text originator must already have generated CRs;
4114
4b0db85537e0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4111
diff changeset
   634
    "/ 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
   635
    textLines := helpTextShown isStringCollection 
c56b665d08a7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3675
diff changeset
   636
                    ifTrue:[helpTextShown]
3767
d88339439fb4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3766
diff changeset
   637
                    ifFalse:[ 
d88339439fb4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3766
diff changeset
   638
                        helpTextShown isString 
4129
f6e152e7c328 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4121
diff changeset
   639
                            ifTrue:[helpTextShown asCollectionOfLines asStringCollection]
3767
d88339439fb4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3766
diff changeset
   640
                            ifFalse:[nil]].
d88339439fb4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3766
diff changeset
   641
    textLines notNil ifTrue:[
d88339439fb4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3766
diff changeset
   642
        textLines size > (self class maxNumberOfLines) ifTrue:[
d88339439fb4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3766
diff changeset
   643
            textLines := (textLines copyTo:(self class maxNumberOfLines)) copyWith:'...'
d88339439fb4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3766
diff changeset
   644
        ].
d88339439fb4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3766
diff changeset
   645
        textLines := textLines collect:[:l | l contractAtEndTo:(self class maxNumberOfColumns)].
d88339439fb4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3766
diff changeset
   646
        helpTextShown := textLines asString.
3251
afc7d588b25b handle key press and close help.
Claus Gittinger <cg@exept.de>
parents: 3248
diff changeset
   647
    ].
3767
d88339439fb4 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3766
diff changeset
   648
    
2780
82e3e1061ae7 changed:
Claus Gittinger <cg@exept.de>
parents: 2778
diff changeset
   649
    (p := closeProcess) notNil ifTrue:[
82e3e1061ae7 changed:
Claus Gittinger <cg@exept.de>
parents: 2778
diff changeset
   650
        closeProcess := nil.
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   651
        p terminate.
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   652
    ].
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   653
    currentHelpView notNil ifTrue:[
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   654
        self hideHelp
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   655
    ].
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   656
3770
690e17824673 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3769
diff changeset
   657
    "/ Transcript showCR:helpTextShown storeString.
3769
09e08477457d #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3767
diff changeset
   658
    helpTextShown isEmptyOrNil ifTrue:[^ self].
09e08477457d #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3767
diff changeset
   659
    
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   660
    org := view originRelativeTo:nil.
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   661
    currentFrame := org extent:view extent.
2848
43346e94b6ce changed: #showHelp:for:
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
   662
    org := org + (view extent // 2).
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   663
3248
d72c8e4f7684 more control over the shape style
Claus Gittinger <cg@exept.de>
parents: 3247
diff changeset
   664
    wg notNil ifTrue:[ applicationOrNil := wg application ].
3786
c628a30083c3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3770
diff changeset
   665
    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
   666
    v perform:#controllingHelpListener: with:self ifNotUnderstood:[].
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   667
2848
43346e94b6ce changed: #showHelp:for:
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
   668
    helpViewWidth := v width.
43346e94b6ce changed: #showHelp:for:
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
   669
    helpViewHeight := v height.
1677
dc49ab70b762 open helpView on the correcdt device
Claus Gittinger <cg@exept.de>
parents: 1657
diff changeset
   670
4082
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   671
    "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
   672
     (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
   673
     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
   674
    pos := device pointerPosition.
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   675
    org := pos + (10@18).
3786
c628a30083c3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3770
diff changeset
   676
    monitorBounds := device monitorBoundsAt:org.
3114
fb742db4ee12 class: FlyByHelp
Stefan Vogel <sv@exept.de>
parents: 2979
diff changeset
   677
    usableWidth := monitorBounds width - 2.
3786
c628a30083c3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3770
diff changeset
   678
    usableHeight := device usableHeightAt:org.
3114
fb742db4ee12 class: FlyByHelp
Stefan Vogel <sv@exept.de>
parents: 2979
diff changeset
   679
fb742db4ee12 class: FlyByHelp
Stefan Vogel <sv@exept.de>
parents: 2979
diff changeset
   680
    helpViewWidth > usableWidth ifTrue:[v width:(helpViewWidth := usableWidth)].    
3247
768269b26ad3 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3243
diff changeset
   681
    helpViewHeight > usableHeight ifTrue:[v height:(helpViewHeight := usableHeight)].    
3114
fb742db4ee12 class: FlyByHelp
Stefan Vogel <sv@exept.de>
parents: 2979
diff changeset
   682
fb742db4ee12 class: FlyByHelp
Stefan Vogel <sv@exept.de>
parents: 2979
diff changeset
   683
    (org x + helpViewWidth) > (monitorBounds left + usableWidth) ifTrue:[
4082
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   684
        org x:(monitorBounds left + usableWidth - helpViewWidth).
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   685
    ].
3114
fb742db4ee12 class: FlyByHelp
Stefan Vogel <sv@exept.de>
parents: 2979
diff changeset
   686
    (org y + helpViewHeight) > (monitorBounds top + usableHeight) ifTrue:[
4082
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   687
        org y:(monitorBounds top + usableHeight - helpViewHeight).
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   688
    ].
4082
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   689
    ((org extent:v extent) containsPoint:pos) ifTrue:[
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   690
        "pointer would be in the help window (see comment above).
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   691
         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
   692
        org x:(pos x - helpViewWidth - 20).
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   693
    ].
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   694
    v origin:org.
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   695
    v realize.
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   696
    currentHelpView := v.
2392
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   697
    currentView := view.
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   698
3334
d334c9dd9b76 class: FlyByHelp
Claus Gittinger <cg@exept.de>
parents: 3321
diff changeset
   699
    showTime := self showTime.
4082
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   700
    (showTime > 0) ifTrue:[
3959
63a594820146 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   701
        p :=
63a594820146 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   702
            [
1546
1af738601dae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
   703
                [
4082
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   704
                    Delay waitForSeconds:showTime.
2392
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   705
                    [
2780
82e3e1061ae7 changed:
Claus Gittinger <cg@exept.de>
parents: 2778
diff changeset
   706
                        |v|
82e3e1061ae7 changed:
Claus Gittinger <cg@exept.de>
parents: 2778
diff changeset
   707
                        (v := currentHelpView) notNil ifTrue:[
2392
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   708
                            currentHelpView := nil.
2780
82e3e1061ae7 changed:
Claus Gittinger <cg@exept.de>
parents: 2778
diff changeset
   709
                            v destroy.
2392
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   710
                        ]
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   711
                    ] valueUninterruptably
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   712
                ] ifCurtailed:[
3959
63a594820146 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   713
                    (p == closeProcess) ifTrue:[ closeProcess := nil ].
2392
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   714
                ].
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   715
            ] newProcess.
3959
63a594820146 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   716
        p priority:(Processor userSchedulingPriority + 1).
63a594820146 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   717
        closeProcess := p.
63a594820146 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   718
        p resume.
2392
02244f5708b7 reafctored
Claus Gittinger <cg@exept.de>
parents: 2002
diff changeset
   719
    ].
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   720
1963
fb6663696d20 removed withCRs in showHelp:
Claus Gittinger <cg@exept.de>
parents: 1893
diff changeset
   721
    "Modified: / 31-08-1995 / 19:20:45 / claus"
3959
63a594820146 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3804
diff changeset
   722
    "Modified: / 06-06-2017 / 15:06:41 / cg"
4082
f2ffa50dcf0b #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4055
diff changeset
   723
    "Modified (format): / 16-04-2018 / 17:29:10 / stefan"
4119
eaee0352efdd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4114
diff changeset
   724
    "Modified: / 08-06-2018 / 10:28:32 / Claus Gittinger"
4129
f6e152e7c328 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4121
diff changeset
   725
    "Modified (format): / 14-06-2018 / 08:29:43 / Claus Gittinger"
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   726
!
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   727
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   728
stopHelpDisplayProcess
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   729
    |p|
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   730
2680
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
   731
    (p := showProcess) notNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
   732
        showProcess := nil.
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   733
        p terminate.
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
    "Created: 28.6.1997 / 14:03:17 / cg"
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   737
! !
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   738
4231
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   739
!FlyByHelp::HelpKeyInsteadOfHelpTextQuery class methodsFor:'documentation'!
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   740
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   741
documentation
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   742
"
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   743
    kludge to force application to return the helpKey instead of the
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   744
    help text. 
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   745
    Answering true will tell the ApplicationModel to return the key.
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   746
    (see AppModel >> helpTextForKey:)
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   747
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   748
    [author:]
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   749
        Claus Gittinger
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   750
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   751
    [instance variables:]
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   752
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   753
    [class variables:]
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   754
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   755
    [see also:]
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   756
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   757
"
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   758
! !
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   759
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   760
!FlyByHelp::HelpKeyInsteadOfHelpTextQuery methodsFor:'defaults'!
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   761
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   762
defaultResumeValue
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   763
    ^ false
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   764
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   765
    "Created: / 22-02-2019 / 09:48:28 / Claus Gittinger"
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   766
! !
5542e515b2d9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   767
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   768
!FlyByHelp class methodsFor:'documentation'!
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   769
2979
306456bdfb61 comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   770
version
3656
de582c82fa70 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   771
    ^ '$Header$'
2979
306456bdfb61 comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   772
!
306456bdfb61 comment in: #keyPress:x:y:view:
Claus Gittinger <cg@exept.de>
parents: 2978
diff changeset
   773
2754
4c3b40eba71b changed:
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
   774
version_CVS
3656
de582c82fa70 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   775
    ^ '$Header$'
1536
fa0601a87d6e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   776
! !
3114
fb742db4ee12 class: FlyByHelp
Stefan Vogel <sv@exept.de>
parents: 2979
diff changeset
   777