ActiveHelp.st
changeset 1657 447db4aae998
parent 1591 4e75531ffacf
child 1713 bc8a1d16e60f
--- a/ActiveHelp.st	Tue Oct 29 11:26:12 2002 +0100
+++ b/ActiveHelp.st	Tue Oct 29 12:41:13 2002 +0100
@@ -219,8 +219,8 @@
 initialize
     "set default delay & help-display times"
 
-    ShowTime := 15.
-    DelayTime := 2.
+    ShowTime := 10.
+    DelayTime := 0.4.
 
     "
      ActiveHelp initialize
@@ -334,23 +334,10 @@
 !ActiveHelp methodsFor:'listening'!
 
 buttonMotion:state x:x y:y view:aView
-    "handle motion events - if the mousepointer left the 
-     previous helped view, hide the help"
+    "handle motion events - prepare to show help"
 
-    Object errorSignal handle:[:ex |
-        ex description infoPrintCR.
-        ex suspendedContext fullPrintAll.
-        ex return
-    ] do:[
-        (self interestedIn:aView) ifTrue:[
-            self stopHelpDisplayProcess.
-            self hideIfPointerLeft:aView.
-            self initiateHelpFor:aView at:(x @ y).
-        ].
-    ].
+    self handleMouseIn:aView x:x y:y.
     ^ false
-
-    "Modified: / 28.7.1998 / 02:51:51 / cg"
 !
 
 buttonPress:state x:x y:y view:view
@@ -372,9 +359,10 @@
 !
 
 pointerEnter:state x:x y:y view:aView
-    "handle pointer entering a view; setup timeOut to show help"
+    "handle pointer entering a view; prepare to show help"
 
-    ^ self buttonMotion:state x:x y:y view:aView
+    self handleMouseIn:aView x:x y:y.
+    ^ false
 !
 
 pointerLeave:state view:view
@@ -518,6 +506,23 @@
 
 !ActiveHelp methodsFor:'show / hide help'!
 
+handleMouseIn:aView x:x y:y
+    "handle motion events - if the mousepointer left the 
+     previous helped view, hide the help"
+
+    Object errorSignal handle:[:ex |
+        ex description infoPrintCR.
+        ex suspendedContext fullPrintAll.
+        ex return
+    ] do:[
+        (self interestedIn:aView) ifTrue:[
+            self stopHelpDisplayProcess.
+            self hideIfPointerLeft:aView.
+            self initiateHelpFor:aView at:(x @ y).
+        ].
+    ].
+!
+
 hideHelp
     "hide the help text - nothing done here"
 !
@@ -540,8 +545,7 @@
      re-negotiation of the displayed helpText 
      (for example in a menu, when the selection changes)"
 
-    self
-        initiateHelpFor:aView at:aPointOrNil now:false
+    self initiateHelpFor:aView at:aPointOrNil now:false
 
     "Modified: 28.6.1997 / 14:45:57 / cg"
 !
@@ -640,6 +644,7 @@
 !ActiveHelp class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ActiveHelp.st,v 1.47 2002-08-08 10:56:33 tm Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ActiveHelp.st,v 1.48 2002-10-29 11:41:13 cg Exp $'
 ! !
+
 ActiveHelp initialize!