more control over the shape style
authorClaus Gittinger <cg@exept.de>
Mon, 16 Sep 2013 12:56:13 +0200
changeset 3248 d72c8e4f7684
parent 3247 768269b26ad3
child 3249 38845952e1d4
more control over the shape style (tooltips vs. window information)
FlyByHelp.st
--- a/FlyByHelp.st	Fri Sep 13 10:55:12 2013 +0200
+++ b/FlyByHelp.st	Mon Sep 16 12:56:13 2013 +0200
@@ -297,6 +297,13 @@
 
 !FlyByHelp methodsFor:'show & hide help'!
 
+activeHelpViewForApplication:applicationOrNil text:helpText onDevice:aDevice
+    applicationOrNil notNil ifTrue:[
+        ^ applicationOrNil activeHelpViewFor:helpText onDevice:aDevice
+    ].
+    ^ ActiveHelpView for:helpText onDevice:aDevice.
+!
+
 hideHelp
     "hide the help text"
 
@@ -327,7 +334,7 @@
 showHelp:aHelpText for:view
     "show the help text for aView"
 
-    |wg org p v dev helpViewWidth helpViewHeight usableWidth monitorBounds usableHeight|
+    |wg applicationOrNil org p v dev helpViewWidth helpViewHeight usableWidth monitorBounds usableHeight|
 
     "/ thisContext fullPrintAllOn:Transcript.
     (wg := view windowGroup) notNil ifTrue:[
@@ -360,12 +367,9 @@
     org := org + (view extent // 2).
 
     dev := view graphicsDevice.
+    wg notNil ifTrue:[ applicationOrNil := wg application ].
+    v := self activeHelpViewForApplication:applicationOrNil text:aHelpText onDevice:dev.
 
-    (wg notNil and:[wg application notNil]) ifTrue:[
-        v := wg application activeHelpViewFor:aHelpText onDevice:dev
-    ] ifFalse:[
-        v := ActiveHelpView for:aHelpText onDevice:dev.
-    ].
     helpViewWidth := v width.
     helpViewHeight := v height.
 
@@ -429,10 +433,10 @@
 !FlyByHelp class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/FlyByHelp.st,v 1.59 2013-09-13 08:55:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/FlyByHelp.st,v 1.60 2013-09-16 10:56:13 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview2/FlyByHelp.st,v 1.59 2013-09-13 08:55:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/FlyByHelp.st,v 1.60 2013-09-16 10:56:13 cg Exp $'
 ! !