#DOCUMENTATION by cg
class: FlyByHelp
comment/format in: #buttonMotion:x:y:view:
class: FlyByHelp class
added: #documentation
--- a/FlyByHelp.st Fri Jan 19 10:43:10 2018 +0100
+++ b/FlyByHelp.st Fri Jan 19 10:43:24 2018 +0100
@@ -36,6 +36,27 @@
"
!
+documentation
+"
+ an instance of me is used to provide tooltips
+ (sigh: smalltalk was ahead of its time in the early 90's:
+ initially called 'activeHelp', then renamed to 'flyByHelp'
+ and now commonly known as tooltip).
+
+ I will watch the mouse movements via an event hook, and determine
+ where the mouse pointer is. Then ask the underlying view about its
+ helpText and display it in a little floating popup view.
+
+ The hool is installed via:
+ FlyByHelp start
+ and possibly deactivated/uninstalled via:
+ FlyByHelp stop
+
+ There can be only one FlyByHelp at any time - the start/stop methods
+ assure that.
+"
+!
+
examples
"
UserPreferences current toolTipShapeStyle:nil
@@ -85,8 +106,8 @@
^ false
].
- "/ don't start tooltip, if this view is not active
- "/ does not work, because motion events are reported for the current focus-view,
+ "/ don't start tooltip, if this view is not active.
+ "/ The following line does not work, because motion events are reported for the current focus-view,
"/ which is always active. Must check after we have determined the view under the pointer
"/ aView topView isActive ifFalse:[^ false].