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