*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Mon, 02 Nov 2009 13:59:43 +0100
changeset 2699 22dd96b4e37f
parent 2698 64d179f1eae7
child 2700 bad11f9b735f
*** empty log message ***
FlyByWindowInformation.st
--- a/FlyByWindowInformation.st	Fri Oct 30 17:01:05 2009 +0100
+++ b/FlyByWindowInformation.st	Mon Nov 02 13:59:43 2009 +0100
@@ -12,7 +12,7 @@
 "{ Package: 'stx:libtool2' }"
 
 FlyByHelp subclass:#FlyByWindowInformation
-	instanceVariableNames:'lastApplication lastView cleanupAction finishSemaphore'
+	instanceVariableNames:'lastApplication lastView cleanupAction finishSemaphore finished'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Interface-Help'
@@ -50,7 +50,7 @@
 
 !FlyByWindowInformation methodsFor:'accessing'!
 
-cleanupAction:something
+cleanupAction:something 
     cleanupAction := something.
 !
 
@@ -71,6 +71,7 @@
 !FlyByWindowInformation methodsFor:'event handling'!
 
 buttonMotion:buttonAndModifierState x:x y:y view:aView
+finished == true ifTrue:[self halt].
     super buttonMotion:buttonAndModifierState x:x y:y view:aView.
     ^ true
 !
@@ -80,6 +81,12 @@
     ^ true
 !
 
+handleMouseIn:aView x:x y:y
+
+finished == true ifTrue:[self halt].
+    super handleMouseIn:aView x:x y:y
+!
+
 keyPress:key x:x y:y view:aView
     |obj action lcKey|
 
@@ -130,6 +137,8 @@
 !FlyByWindowInformation methodsFor:'help texts'!
 
 helpTextFor:aView at:aPointOrNil
+    "generate the text to be shown as popup-flyby info"
+
     lastView := aView.
     lastApplication := aView application.
 
@@ -165,6 +174,32 @@
             s nextPutLine:('Masterapplication: ' , masterApplicationToInspect class name).
         ].
 
+        "/ identity it as component
+        masterApplicationToInspect "applicationToInspect" notNil ifTrue:[
+            masterApplicationToInspect "applicationToInspect" builder notNil ifTrue:[
+                |components v|
+
+                components := masterApplicationToInspect "applicationToInspect" builder namedComponents.
+
+                v := aView.
+                [   (components includes:v) not
+                    and:[v container notNil]
+                ] whileTrue:[
+                    v := v container.
+                ].
+                (components includes:v) ifTrue:[
+                    |k|
+
+                    k := components keyAtValue:v.
+                    v == aView ifTrue:[
+                        s nextPutLine:('Component: ' , k).
+                    ] ifFalse:[
+                        s nextPutLine:('Subview of Component: ' , k).
+                    ].
+                ].
+            ]
+        ].
+
         s cr.
         s nextPutLine:'Press:'.
         s nextPutLine:'    ? to show the viewtree'.
@@ -197,19 +232,32 @@
 
 !FlyByWindowInformation methodsFor:'start & stop'!
 
+initiateHelpFor:aView at:aPointOrNil
+finished == true ifTrue:[self halt].
+    self initiateHelpFor:aView at:aPointOrNil now:true
+!
+
+initiateHelpFor:aView at:aPointOrNil now:showItNow
+finished == true ifTrue:[self halt].
+    super initiateHelpFor:aView at:aPointOrNil now:showItNow
+!
+
 start
     |l|
 
+finished == true ifTrue:[self halt].
     l := FlyByHelp currentHelpListener.
     l notNil ifTrue:[
         FlyByHelp stop.
         cleanupAction := [ FlyByHelp start ].
     ].
     finishSemaphore := Semaphore new.
+    finished := false.
     super start.
 !
 
 stop
+    finished := true.
     super stop.
     cleanupAction value.
     finishSemaphore notNil ifTrue:[