The Fl_Tooltip class provides tooltip support for all FLTK widgets.
More...
#include <Fl_Tooltip.H>
|
static void(* | enter )(Fl_Widget *w) = nothing |
|
static void(* | exit )(Fl_Widget *w) = nothing |
|
|
void | Fl_Widget::copy_tooltip (const char *) |
|
void | Fl_Widget::tooltip (const char *) |
|
The Fl_Tooltip class provides tooltip support for all FLTK widgets.
It contains only static methods.
Fl_Tooltip Options
Gets the background color for tooltips.
The default background color is a pale yellow.
static void Fl_Tooltip::color |
( |
Fl_Color |
c | ) |
|
|
inlinestatic |
Sets the background color for tooltips.
The default background color is a pale yellow.
Sets the current widget target.
Acts as though enter(widget) was done but does not pop up a tooltip. This is useful to prevent a tooltip from reappearing when a modal overlapping window is deleted. FLTK does this automatically when you click the mouse button.
static float Fl_Tooltip::delay |
( |
| ) |
|
|
inlinestatic |
Gets the tooltip delay.
The default delay is 1.0 seconds.
static void Fl_Tooltip::delay |
( |
float |
f | ) |
|
|
inlinestatic |
Sets the tooltip delay.
The default delay is 1.0 seconds.
static void Fl_Tooltip::disable |
( |
| ) |
|
|
inlinestatic |
Same as enable(0), disables tooltips on all widgets.
static void Fl_Tooltip::enable |
( |
int |
b = 1 | ) |
|
|
inlinestatic |
Enables tooltips on all widgets (or disables if b is false).
static int Fl_Tooltip::enabled |
( |
| ) |
|
|
inlinestatic |
Returns non-zero if tooltips are enabled.
void Fl_Tooltip::enter_area |
( |
Fl_Widget * |
wid, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
w, |
|
|
int |
h, |
|
|
const char * |
t |
|
) |
| |
|
static |
You may be able to use this to provide tooltips for internal pieces of your widget.
Call this after setting Fl::belowmouse() to your widget (because that calls the above enter() method). Then figure out what thing the mouse is pointing at, and call this with the widget (this pointer is used to remove the tooltip if the widget is deleted or hidden, and to locate the tooltip), the rectangle surrounding the area, relative to the top-left corner of the widget (used to calculate where to put the tooltip), and the text of the tooltip (which must be a pointer to static data as it is not copied).
static Fl_Font Fl_Tooltip::font |
( |
| ) |
|
|
inlinestatic |
Gets the typeface for the tooltip text.
static void Fl_Tooltip::font |
( |
Fl_Font |
i | ) |
|
|
inlinestatic |
Sets the typeface for the tooltip text.
static float Fl_Tooltip::hoverdelay |
( |
| ) |
|
|
inlinestatic |
Gets the tooltip hover delay, the delay between tooltips.
The default delay is 0.2 seconds.
static void Fl_Tooltip::hoverdelay |
( |
float |
f | ) |
|
|
inlinestatic |
Sets the tooltip hover delay, the delay between tooltips.
The default delay is 0.2 seconds.
Gets the size of the tooltip text.
Sets the size of the tooltip text.
static Fl_Color Fl_Tooltip::textcolor |
( |
| ) |
|
|
inlinestatic |
Gets the color of the text in the tooltip.
The default is black.
static void Fl_Tooltip::textcolor |
( |
Fl_Color |
c | ) |
|
|
inlinestatic |
Sets the color of the text in the tooltip.
The default is black.
The documentation for this class was generated from the following files: