Static Public Attributes

Detailed Description

This is the class of window that pops up to display a tooltip (with the yellow color and 1-pixel border).

In addition Toolip provides number of static functions for managing a single private instance, and making this pop up when the mouse is pointing at various rectangles in the GUI. FLTK calls these as the mouse moves between widgets, and a widget's handle() method can call these to present tooltips for various parts of itself.

Member Function Documentation

Acts as though enter(widget) was done but does not pop up a tooltip. However, this makes it ignore a subsequent call to enter() for this same widget. This is useful to prevent a tooltip from reappearing when a modal overlapping window is deleted. FLTK does this automatically when a popup window disappears.

The default version calls draw_box() and draw_label(), thus drawing the box() to fill the widget and putting the label() and image() inside it to fill it, unless the align() flags are set to put it outside.

Get ready to display a tooltip. The widget and the rectangle inside it define an area the tooltip is for. The mouse is assummed to currently be inside this rectangle.

After a timeout period a tooltip is created and it will appear at the edge of the rectangle. If enter() with a different widget, generator, or data is called, or exit() is called, the tooltip will not appear.

The generator callback is for deferring the calculation of the text until it is actually needed. Just before popping up the tooltip generator is called with the widget and data as arguments, and it should return a pointer to a static buffer containing the tooltip text. You can use '@' commands to insert arbitrary fltk::Symbol graphics into it. If generator returns NULL no tooltip will be popped up.

Locates either widget or the closest parent with an non-null Widget::tooltip() value and then does an enter() using this widget's area and that widget's tooltip(). If widget is NULL or there is no tooltip found then exit() is done instead.

This is automatically called by FLTK when Widget::below_mouse() is changed.

void Tooltip::exit

(

)

[static]

Indicate that the mouse is no longer pointing at a tooltip area. Makes any visible tooltip disappear and cancel any pending one. No tooltip will appear until after enter() is called again.