--- a/ActiveHelp.st Thu Dec 07 22:25:39 1995 +0100
+++ b/ActiveHelp.st Thu Dec 07 22:46:32 1995 +0100
@@ -11,8 +11,6 @@
"
-'From Smalltalk/X, Version:2.10.5 on 26-mar-1995 at 10:19:20 am'!
-
EventListener subclass:#ActiveHelp
instanceVariableNames:'currentView currentHelpView currentFrame showProcess closeProcess'
classVariableNames:'DelayTime ShowTime TheOneAndOnlyHelpListener'
@@ -22,8 +20,19 @@
!ActiveHelp class methodsFor:'documentation'!
-version
- ^ '$Header: /cvs/stx/stx/libview2/ActiveHelp.st,v 1.7 1995-11-11 16:04:06 cg Exp $'
+copyright
+"
+ COPYRIGHT (c) 1995 by Claus Gittinger
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
+
!
documentation
@@ -133,21 +142,6 @@
top open
"
-!
-
-copyright
-"
- COPYRIGHT (c) 1995 by Claus Gittinger
- All Rights Reserved
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice. This software may not
- be provided or otherwise made available to, or used by, any
- other person. No title to or ownership of the software is
- hereby transferred.
-"
-
! !
!ActiveHelp class methodsFor:'initialization'!
@@ -161,35 +155,11 @@
"
! !
-!ActiveHelp class methodsFor:'times'!
-
-showTime:numberOfSeconds
- "set the number of seconds, a help messages is to be shown.
- The default is 15 seconds."
-
- ShowTime := numberOfSeconds
-
- "
- ActiveHelp showTime:10
- ActiveHelp showTime:99999
- ActiveHelp showTime:30
- "
-!
+!ActiveHelp class methodsFor:'startup'!
-delayTime:numberOfSeconds
- "set the delay (the time, the cursor has to be in the view
- before help is shown). The default is 2 seconds."
-
- DelayTime := numberOfSeconds
-
- "
- ActiveHelp delayTime:0.5
- ActiveHelp delayTime:2
- ActiveHelp delayTime:10
- "
-! !
-
-!ActiveHelp class methodsFor:'startup'!
+isActive
+ ^ TheOneAndOnlyHelpListener notNil
+!
start
TheOneAndOnlyHelpListener isNil ifTrue:[
@@ -211,10 +181,72 @@
"
ActiveHelp stop
"
+! !
+
+!ActiveHelp class methodsFor:'times'!
+
+delayTime:numberOfSeconds
+ "set the delay (the time, the cursor has to be in the view
+ before help is shown). The default is 2 seconds."
+
+ DelayTime := numberOfSeconds
+
+ "
+ ActiveHelp delayTime:0.5
+ ActiveHelp delayTime:2
+ ActiveHelp delayTime:10
+ "
!
-isActive
- ^ TheOneAndOnlyHelpListener notNil
+showTime:numberOfSeconds
+ "set the number of seconds, a help messages is to be shown.
+ The default is 15 seconds."
+
+ ShowTime := numberOfSeconds
+
+ "
+ ActiveHelp showTime:10
+ ActiveHelp showTime:99999
+ ActiveHelp showTime:30
+ "
+! !
+
+!ActiveHelp methodsFor:'listening'!
+
+buttonMotion:state x:x y:y view:view
+ self hideIfPointerLeft:view.
+ ^ false
+!
+
+buttonPress:state x:x y:y view:view
+ self hideHelp.
+ ^ false
+!
+
+keyPress:state x:x y:y view:view
+ self hideHelp.
+ ^ false
+!
+
+pointerEnter:state x:x y:y view:aView
+ |text p|
+
+ showProcess notNil ifTrue:[
+ p := showProcess. showProcess := nil.
+ p terminate.
+ ].
+ self hideIfPointerLeft:aView.
+ aView topView == currentHelpView ifTrue:[
+ ^ true
+ ].
+
+ self initiateHelpFor:aView atX:x y:y.
+ ^ false
+!
+
+pointerLeave:state view:view
+ self hideIfPointerLeft:view.
+ ^ false
! !
!ActiveHelp methodsFor:'private'!
@@ -305,6 +337,23 @@
"Modified: 31.8.1995 / 20:38:00 / claus"
!
+hideIfPointerLeft:aView
+ |whereOnScreen p|
+
+"/ showProcess notNil ifTrue:[
+"/ p := showProcess. showProcess := nil.
+"/ p terminate.
+"/ ].
+
+ whereOnScreen := aView device pointerPosition.
+
+ (currentFrame notNil
+ and:[(currentFrame insetBy:1@1) containsPoint:whereOnScreen]) ifFalse:[
+ self hideHelp.
+ currentView := nil
+ ].
+!
+
initiateHelpFor:aView atX:x y:y
|text p|
@@ -325,61 +374,6 @@
self showHelp:text for:aView
]
].
-!
-
-hideIfPointerLeft:aView
- |whereOnScreen p|
-
-"/ showProcess notNil ifTrue:[
-"/ p := showProcess. showProcess := nil.
-"/ p terminate.
-"/ ].
-
- whereOnScreen := aView device pointerPosition.
-
- (currentFrame notNil
- and:[(currentFrame insetBy:1@1) containsPoint:whereOnScreen]) ifFalse:[
- self hideHelp.
- currentView := nil
- ].
-! !
-
-!ActiveHelp methodsFor:'listening'!
-
-buttonPress:state x:x y:y view:view
- self hideHelp.
- ^ false
-!
-
-pointerEnter:state x:x y:y view:aView
- |text p|
-
- showProcess notNil ifTrue:[
- p := showProcess. showProcess := nil.
- p terminate.
- ].
- self hideIfPointerLeft:aView.
- aView topView == currentHelpView ifTrue:[
- ^ true
- ].
-
- self initiateHelpFor:aView atX:x y:y.
- ^ false
-!
-
-pointerLeave:state view:view
- self hideIfPointerLeft:view.
- ^ false
-!
-
-keyPress:state x:x y:y view:view
- self hideHelp.
- ^ false
-!
-
-buttonMotion:state x:x y:y view:view
- self hideIfPointerLeft:view.
- ^ false
! !
!ActiveHelp methodsFor:'show / hide help'!
@@ -458,4 +452,9 @@
"Modified: 31.8.1995 / 19:20:45 / claus"
! !
+!ActiveHelp class methodsFor:'documentation'!
+
+version
+ ^ '$Header: /cvs/stx/stx/libview2/ActiveHelp.st,v 1.8 1995-12-07 21:46:20 cg Exp $'
+! !
ActiveHelp initialize!