--- a/ActiveHelp.st Tue Feb 26 11:22:48 2008 +0100
+++ b/ActiveHelp.st Tue Feb 26 11:25:51 2008 +0100
@@ -245,7 +245,7 @@
!
delayTime
- ^ DelayTime
+ ^ DelayTime ? 0.4
!
isActive
@@ -257,7 +257,7 @@
!
showTime
- ^ ShowTime
+ ^ ShowTime ? 10
! !
!ActiveHelp class methodsFor:'start & stop'!
@@ -265,10 +265,16 @@
start
"start activeHelp for all apps"
+ TheOneAndOnlyHelpListener notNil ifTrue:[
+ TheOneAndOnlyHelpListener stop.
+ TheOneAndOnlyHelpListener := nil.
+ ].
+
TheOneAndOnlyHelpListener isNil ifTrue:[
TheOneAndOnlyHelpListener := self new.
].
- TheOneAndOnlyHelpListener listenForAll
+ TheOneAndOnlyHelpListener start.
+ ^ TheOneAndOnlyHelpListener
"
ActiveHelp start
@@ -293,7 +299,7 @@
"stop activeHelp for all (except for individual apps)"
TheOneAndOnlyHelpListener notNil ifTrue:[
- TheOneAndOnlyHelpListener unlistenAll.
+ TheOneAndOnlyHelpListener stop.
TheOneAndOnlyHelpListener := nil.
].
@@ -333,7 +339,7 @@
showTime:numberOfSeconds
"set the number of seconds, a help messages is to be shown.
- The default is 15 seconds."
+ The default is 10 seconds."
ShowTime := numberOfSeconds
@@ -344,7 +350,7 @@
"
! !
-!ActiveHelp methodsFor:'listening'!
+!ActiveHelp methodsFor:'event handling'!
buttonMotion:state x:x y:y view:aView
"handle motion events - prepare to show help"
@@ -395,7 +401,7 @@
^ false
! !
-!ActiveHelp methodsFor:'private'!
+!ActiveHelp methodsFor:'help texts'!
helpTextFor:aView at:aDevicePointOrNil
"retrieve helptext for aView as a string;
@@ -509,7 +515,9 @@
].
].
^ text.
-!
+! !
+
+!ActiveHelp methodsFor:'private'!
hideIfPointerLeft:aView
"hide help, if the pointer is not in aView"
@@ -538,6 +546,16 @@
"Modified: / 8.8.1998 / 13:36:19 / cg"
! !
+!ActiveHelp methodsFor:'queries'!
+
+delayTime
+ ^ self class delayTime
+!
+
+showTime
+ ^ self class showTime
+! !
+
!ActiveHelp methodsFor:'show & hide help'!
handleMouseIn:aView x:x y:y
@@ -659,6 +677,14 @@
"Created: / 26.10.1997 / 23:19:30 / cg"
!
+start
+ self listenForAll
+!
+
+stop
+ self unlistenAll
+!
+
unlistenAll
"stop listening"
@@ -694,7 +720,7 @@
!ActiveHelp class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/ActiveHelp.st,v 1.59 2008-01-10 12:50:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/ActiveHelp.st,v 1.60 2008-02-26 10:25:51 cg Exp $'
! !
ActiveHelp initialize!