--- a/ActiveHelp.st Fri Jun 27 19:24:28 1997 +0200
+++ b/ActiveHelp.st Sat Jun 28 14:06:19 1997 +0200
@@ -12,7 +12,8 @@
EventListener subclass:#ActiveHelp
- instanceVariableNames:'currentView currentHelpView currentFrame showProcess closeProcess'
+ instanceVariableNames:'currentView currentHelpView currentFrame showProcess closeProcess
+ lastHelpText'
classVariableNames:'DelayTime ShowTime TheOneAndOnlyHelpListener'
poolDictionaries:''
category:'Interface-Help'
@@ -179,6 +180,14 @@
!ActiveHelp class methodsFor:'startup'!
+currentHelpListener
+ "return the activeHelp listener if activeHelp is turned on, nil otherwise"
+
+ ^ TheOneAndOnlyHelpListener
+
+ "Created: 28.6.1997 / 13:59:44 / cg"
+!
+
isActive
"return true, if activeHelp is turned on"
@@ -280,10 +289,7 @@
|p|
- showProcess notNil ifTrue:[
- p := showProcess. showProcess := nil.
- p terminate.
- ].
+ self stopHelpDisplayProcess.
self hideIfPointerLeft:aView.
aView topView == currentHelpView ifTrue:[
^ true
@@ -292,7 +298,7 @@
self initiateHelpFor:aView atX:x y:y.
^ false
- "Modified: 27.4.1996 / 15:10:27 / cg"
+ "Modified: 28.6.1997 / 14:04:09 / cg"
!
pointerLeave:state view:view
@@ -437,10 +443,7 @@
text notNil ifTrue:[
DelayTime > 0 ifTrue:[
- showProcess notNil ifTrue:[
- p := showProcess. showProcess := nil.
- p terminate.
- ].
+ self stopHelpDisplayProcess.
showProcess := [
Delay waitForSeconds:DelayTime.
showProcess := nil.
@@ -451,7 +454,18 @@
]
].
- "Modified: 7.6.1996 / 10:02:19 / cg"
+ "Modified: 28.6.1997 / 14:05:33 / cg"
+!
+
+stopHelpDisplayProcess
+ |p|
+
+ showProcess notNil ifTrue:[
+ p := showProcess. showProcess := nil.
+ p terminate.
+ ].
+
+ "Created: 28.6.1997 / 14:03:17 / cg"
! !
!ActiveHelp methodsFor:'show / hide help'!
@@ -461,10 +475,8 @@
|p|
- showProcess notNil ifTrue:[
- p := showProcess. showProcess := nil.
- p terminate.
- ].
+ self stopHelpDisplayProcess.
+
currentHelpView notNil ifTrue:[
[
currentHelpView destroy.
@@ -478,7 +490,7 @@
p terminate.
]
- "Modified: 27.4.1996 / 15:12:13 / cg"
+ "Modified: 28.6.1997 / 14:03:50 / cg"
!
showHelp:aHelpText for:view
@@ -486,7 +498,13 @@
|org p v dev top app|
- view == currentView ifTrue:[^ self].
+ view == currentView ifTrue:[
+ lastHelpText = aHelpText ifTrue:[
+ ^ self
+ ]
+ ].
+
+ lastHelpText := aHelpText.
"/ give the views application a chance
"/ to decide where to show the help text
@@ -547,12 +565,12 @@
] forkAt:(Processor userSchedulingPriority + 1).
"Modified: 31.8.1995 / 19:20:45 / claus"
- "Modified: 16.10.1996 / 00:36:22 / cg"
+ "Modified: 28.6.1997 / 14:02:26 / cg"
! !
!ActiveHelp class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/ActiveHelp.st,v 1.20 1997-06-16 16:58:43 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/ActiveHelp.st,v 1.21 1997-06-28 12:06:19 cg Exp $'
! !
ActiveHelp initialize!