FlyByWindowInformation.st
author Claus Gittinger <cg@exept.de>
Mon, 02 Nov 2009 13:59:43 +0100
changeset 2699 22dd96b4e37f
parent 2587 81f38cd168a7
child 2700 bad11f9b735f
permissions -rw-r--r--
*** empty log message ***
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
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
FlyByHelp subclass:#FlyByWindowInformation
2699
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
    15
	instanceVariableNames:'lastApplication lastView cleanupAction finishSemaphore finished'
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	classVariableNames:''
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	category:'Interface-Help'
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!FlyByWindowInformation class methodsFor:'documentation'!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
2587
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
    23
copyright
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
    24
"
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
    25
 COPYRIGHT (c) 2008 by eXept Software AG
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
    26
              All Rights Reserved
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
 This software is furnished under a license and may be used
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
    29
 only in accordance with the terms of that license and with the
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
    31
 be provided or otherwise made available to, or used by, any
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
    32
 other person.  No title to or ownership of the software is
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
    33
 hereby transferred.
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
    34
"
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
    35
!
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
    36
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
examples
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
"
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
    self shownInformationOfViewUnderMouseUntilButtonIsPressed
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
shownInformationOfViewUnderMouseUntilButtonIsPressed
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    self start waitUntilFinished
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    "
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
     self shownInformationOfViewUnderMouseUntilButtonIsPressed
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    "
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
! !
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
!FlyByWindowInformation methodsFor:'accessing'!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
2699
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
    53
cleanupAction:something 
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    cleanupAction := something.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
lastApplication
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
    ^ lastApplication
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
lastView
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
    ^ lastView
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
! !
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
2543
7ad308542625 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2493
diff changeset
    65
!FlyByWindowInformation methodsFor:'defaults'!
7ad308542625 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2493
diff changeset
    66
7ad308542625 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2493
diff changeset
    67
flyByHelpTimeoutMillis
7ad308542625 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2493
diff changeset
    68
    ^ 1000
7ad308542625 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2493
diff changeset
    69
! !
7ad308542625 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2493
diff changeset
    70
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
!FlyByWindowInformation methodsFor:'event handling'!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
2340
e51e52c8e849 code cleanup (arg-names)
Claus Gittinger <cg@exept.de>
parents: 2314
diff changeset
    73
buttonMotion:buttonAndModifierState x:x y:y view:aView
2699
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
    74
finished == true ifTrue:[self halt].
2340
e51e52c8e849 code cleanup (arg-names)
Claus Gittinger <cg@exept.de>
parents: 2314
diff changeset
    75
    super buttonMotion:buttonAndModifierState x:x y:y view:aView.
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
    ^ true
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
buttonPress:button x:x y:y view:aView
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
    self stop.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
    ^ true
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
2699
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
    84
handleMouseIn:aView x:x y:y
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
    85
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
    86
finished == true ifTrue:[self halt].
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
    87
    super handleMouseIn:aView x:x y:y
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
    88
!
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
    89
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
keyPress:key x:x y:y view:aView
2435
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
    91
    |obj action lcKey|
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
    key == #Escape ifTrue:[
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
        self stop.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
        ^ true
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
    ].
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
2435
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
    98
    key == $? ifTrue:[
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
    99
        [
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   100
            WindowTreeView openOn:(lastView topView) initialSelection:lastView.
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   101
        ] fork.
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   102
        self stop.
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   103
        ^ true.
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
    ].
2435
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   105
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   106
    key isCharacter ifTrue:[
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   107
        lcKey := key asLowercase.
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   108
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   109
        lcKey == $a ifTrue:[
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   110
            obj := lastApplication
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   111
        ].
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   112
        lcKey == $o ifTrue:[
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   113
            obj := lastView model
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   114
        ].
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   115
        lcKey == $m ifTrue:[
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   116
            obj := lastApplication masterApplication
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
        ].
2435
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   118
        lcKey == $v ifTrue:[
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   119
            obj := lastView
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   120
        ].
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   121
        lcKey == $t ifTrue:[
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   122
            obj := lastView topView
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   123
        ].
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   124
        obj notNil ifTrue:[
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   125
            key isLowercase ifTrue:[
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   126
                action := [ obj inspect ].
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   127
            ] ifFalse:[
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   128
                action := [ obj browse ].
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   129
            ].
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   130
            action forkAt:8.
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   131
        ].
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
    ].
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
    ^ true
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
! !
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
!FlyByWindowInformation methodsFor:'help texts'!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
helpTextFor:aView at:aPointOrNil
2699
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   140
    "generate the text to be shown as popup-flyby info"
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   141
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
    lastView := aView.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
    lastApplication := aView application.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
    ^ String streamContents:[:s |
2314
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   146
        |topViewToInspect applicationToInspect masterApplicationToInspect modelToInspect|
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   147
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
        aView topView ~~ aView ifTrue:[
2314
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   149
            topViewToInspect := aView topView.
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
        ].
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
        lastApplication notNil ifTrue:[
2314
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   152
            applicationToInspect := lastApplication.
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   153
            masterApplicationToInspect := lastApplication masterApplication.
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   154
        ].
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   155
        aView model notNil ifTrue:[
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   156
            modelToInspect := aView model.
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   157
            ((modelToInspect == applicationToInspect)
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   158
            or:[ modelToInspect == masterApplicationToInspect ]) ifTrue:[
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   159
                modelToInspect := nil.
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
            ].
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
        ].
2314
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   162
2352
ed9a6f37f85b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2340
diff changeset
   163
        s nextPutLine:('View: ' , aView class name, ' "',aView name printString,'"').
2314
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   164
        modelToInspect notNil ifTrue:[
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   165
            s nextPutLine:('Model: ' , modelToInspect class name).
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   166
        ].
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   167
        topViewToInspect notNil ifTrue:[
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   168
            s nextPutLine:('Topview: ' , topViewToInspect class name).
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   169
        ].
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   170
        applicationToInspect notNil ifTrue:[
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   171
            s nextPutLine:('Application: ' , applicationToInspect class name).
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   172
        ].
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   173
        masterApplicationToInspect notNil ifTrue:[
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   174
            s nextPutLine:('Masterapplication: ' , masterApplicationToInspect class name).
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   175
        ].
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   176
2699
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   177
        "/ identity it as component
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   178
        masterApplicationToInspect "applicationToInspect" notNil ifTrue:[
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   179
            masterApplicationToInspect "applicationToInspect" builder notNil ifTrue:[
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   180
                |components v|
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   181
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   182
                components := masterApplicationToInspect "applicationToInspect" builder namedComponents.
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   183
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   184
                v := aView.
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   185
                [   (components includes:v) not
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   186
                    and:[v container notNil]
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   187
                ] whileTrue:[
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   188
                    v := v container.
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   189
                ].
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   190
                (components includes:v) ifTrue:[
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   191
                    |k|
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   192
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   193
                    k := components keyAtValue:v.
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   194
                    v == aView ifTrue:[
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   195
                        s nextPutLine:('Component: ' , k).
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   196
                    ] ifFalse:[
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   197
                        s nextPutLine:('Subview of Component: ' , k).
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   198
                    ].
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   199
                ].
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   200
            ]
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   201
        ].
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   202
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
        s cr.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
        s nextPutLine:'Press:'.
2435
f803a14907b4 ? - command added
Claus Gittinger <cg@exept.de>
parents: 2352
diff changeset
   205
        s nextPutLine:'    ? to show the viewtree'.
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
        s nextPutLine:'    v to inspect view (V to browse)'.
2314
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   207
        modelToInspect notNil ifTrue:[
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   208
            s nextPutLine:'    o to inspect model (O to browse)'.
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   209
        ].
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   210
        topViewToInspect notNil ifTrue:[
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
            s nextPutLine:'    t to inspect topView (T to browse)'.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
        ].
2314
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   213
        applicationToInspect notNil ifTrue:[
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
            s nextPutLine:'    a to inspect application (A to browse)'.
2314
e65082256c46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
   215
            masterApplicationToInspect notNil ifTrue:[
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
                s nextPutLine:'    m to inspect masterApplication (M to browse)'.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
            ].
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
        ].
2493
b19544e382b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2435
diff changeset
   219
        s nextPutAll:'ESC or button to leave flyBy-info mode.'.
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
    ]
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
    "
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
     self shownInformationOfViewUnderMouseUntilButtonIsPressed
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
    "
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
! !
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
!FlyByWindowInformation methodsFor:'queries'!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
toolTipFollowsMouse
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
    ^ true
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
! !
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
!FlyByWindowInformation methodsFor:'start & stop'!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
2699
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   235
initiateHelpFor:aView at:aPointOrNil
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   236
finished == true ifTrue:[self halt].
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   237
    self initiateHelpFor:aView at:aPointOrNil now:true
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   238
!
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   239
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   240
initiateHelpFor:aView at:aPointOrNil now:showItNow
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   241
finished == true ifTrue:[self halt].
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   242
    super initiateHelpFor:aView at:aPointOrNil now:showItNow
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   243
!
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   244
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
start
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
    |l|
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
2699
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   248
finished == true ifTrue:[self halt].
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
    l := FlyByHelp currentHelpListener.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
    l notNil ifTrue:[
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
        FlyByHelp stop.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
        cleanupAction := [ FlyByHelp start ].
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
    ].
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
    finishSemaphore := Semaphore new.
2699
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   255
    finished := false.
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
    super start.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
stop
2699
22dd96b4e37f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   260
    finished := true.
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
    super stop.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
    cleanupAction value.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
    finishSemaphore notNil ifTrue:[
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
        finishSemaphore signalIf.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
    ].
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
waitUntilFinished
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   269
    finishSemaphore wait.
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
! !
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
!FlyByWindowInformation class methodsFor:'documentation'!
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
version
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
    ^ '$Header$'
2587
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
   276
!
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
   277
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
   278
version_CVS
81f38cd168a7 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2543
diff changeset
   279
    ^ '$Header$'
2300
afddc24415dc initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
! !