eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'FlyByHelp':



Class: FlyByHelp



rev: 1.85 date: 2018/04/16 15:31:54
user: stefan
file: FlyByHelp.st directory: libview2
module: stx stc-classLibrary: libview2


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.

Class protocol:

o  currentlyShownView

o  maxNumberOfColumns

o  maxNumberOfLines

Instance protocol:

o  flyByHelpTimeoutMillis
abort flyby help text generation, if no text can be generated within that
time delta. This is used to abort long-lasting parsing/scanning/analysis in
large methods when the mouse is moved over some syntactic constructs, and
it takes too long to parse...
The returned time is given in ms

event handling
o  buttonMotion: buttonAndModifierState x: x y: y view: aView
the help-bubble itself

o  buttonPress: button x: x y: y view: aView
hideHelp nils the currentView

o  keyPress: key x: x y: y view: aView
generate a line suitable for the resources file (a null translation)
usage example(s):
^ super keyPress:key x:x y:y view:aView

o  mouseWheelMotion: state x: x y: y amount: amount deltaTime: dTime view: aView

o  pointerLeave: state view: aView
clear the do-not-show-in-this-view mode (see keyPress)

help texts
o  helpTextFromModel: aModel view: aView at: aPointOrNil
helper: ask aModel for its helpText.

o  helpTextFromView: aView at: aPointOrNil
helper: ask aView for its helpText.

o  hideIfPointerLeft: aView
hide help, if the pointer is not in aView

o  initiateHelpFor: aView at: aPointOrNil now: showItNow
ask aView for helpText, passing x/y coordinates;
start a timeout process to display this helpText after some delay;
Normally used internally, but can also be used by widgets to force
re-negotiation of the displayed helpText
(for example in a menu, when the selection changes)

o  currentlyShownView

o  toolTipFollowsMouse
if true, the tooltip-window moves with the pointer
so that it stays away from (does not cover) the mouse pointer

show & hide help
o  activeHelpViewForApplication: applicationOrNil text: helpText onDevice: aDevice
(ActiveHelpView for:'Hello' onDevice:Display) open

o  hideHelp
hide the help text

o  showHelp: aHelpText for: view
show the help text for aView

o  stopHelpDisplayProcess


UserPreferences current toolTipShapeStyle:nil UserPreferences current toolTipShapeStyle:#cartoon FlyByHelp isActive FlyByHelp stop FlyByHelp start

ST/X; WebServer 1.663 at exept.de:8081; Sun, 19 May 2019 07:08:17 GMT