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