|
fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation) ![]() |
#include <Fl_Tooltip.H>

Static Public Member Functions | |
| static float | delay () |
| static void | delay (float f) |
| static float | hoverdelay () |
| static void | hoverdelay (float f) |
| static int | enabled () |
| static void | enable (int b=1) |
| static void | disable () |
| static void | enter_area (Fl_Widget *w, int X, int Y, int W, int H, const char *tip) |
| static Fl_Widget * | current () |
| static void | current (Fl_Widget *) |
| static Fl_Font | font () |
| static void | font (Fl_Font i) |
| static Fl_Fontsize | size () |
| static void | size (Fl_Fontsize s) |
| static Fl_Color | color () |
| static void | color (Fl_Color c) |
| static Fl_Color | textcolor () |
| static void | textcolor (Fl_Color c) |
Static Public Attributes | |
| static void(* | enter )(Fl_Widget *w) = nothing |
| static void(* | exit )(Fl_Widget *w) = nothing |
Friends | |
| void | Fl_Widget::tooltip (const char *) |
| void | Fl_Widget::copy_tooltip (const char *) |
The Fl_Tooltip class provides tooltip support for all FLTK widgets. It contains only static methods.
Definition at line 41 of file Fl_Tooltip.H.
| static Fl_Color Fl_Tooltip::color | ( | ) | [inline, static] |
Gets the background color for tooltips. The default background color is a pale yellow.
Definition at line 79 of file Fl_Tooltip.H.
Referenced by Fl_TooltipBox::draw().
| static void Fl_Tooltip::color | ( | Fl_Color | c | ) | [inline, static] |
Sets the background color for tooltips. The default background color is a pale yellow.
Definition at line 81 of file Fl_Tooltip.H.
| void Fl_Tooltip::current | ( | Fl_Widget * | w | ) | [static] |
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.
Definition at line 183 of file Fl_Tooltip.cxx.
References Fl_Widget::parent(), Fl_Widget::tooltip(), and w.
| static Fl_Widget* Fl_Tooltip::current | ( | ) | [inline, static] |
Gets the current widget target
Definition at line 67 of file Fl_Tooltip.H.
Referenced by fl_throw_focus(), Fl::handle(), and Fl_TooltipBox::layout().
| static void Fl_Tooltip::delay | ( | float | f | ) | [inline, static] |
Sets the tooltip delay. The default delay is 1.0 seconds.
Definition at line 46 of file Fl_Tooltip.H.
References f.
| static float Fl_Tooltip::delay | ( | ) | [inline, static] |
Gets the tooltip delay. The default delay is 1.0 seconds.
Definition at line 44 of file Fl_Tooltip.H.
Referenced by enter_area().
| static void Fl_Tooltip::disable | ( | ) | [inline, static] |
Same as enable(0), disables tooltips on all widgets.
Definition at line 62 of file Fl_Tooltip.H.
Referenced by Fl::arg().
| static void Fl_Tooltip::enable | ( | int | b = 1 | ) | [inline, static] |
Enables tooltips on all widgets (or disables if b is false).
Definition at line 60 of file Fl_Tooltip.H.
References b, Fl::option(), and Fl::OPTION_SHOW_TOOLTIPS.
Referenced by Fl::arg(), make_settings_window(), and Fl_Window::show().
| static int Fl_Tooltip::enabled | ( | ) | [inline, static] |
Returns non-zero if tooltips are enabled.
Definition at line 58 of file Fl_Tooltip.H.
References Fl::option(), and Fl::OPTION_SHOW_TOOLTIPS.
Referenced by enter_area().
| 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).
Definition at line 234 of file Fl_Tooltip.cxx.
References Fl::add_timeout(), delay(), enabled(), h, H, Fl_Menu_Window::hide(), hoverdelay(), Fl::remove_timeout(), Fl_Window::shown(), Fl_Widget::visible(), void(), and y.
| static Fl_Font Fl_Tooltip::font | ( | ) | [inline, static] |
Gets the typeface for the tooltip text.
Definition at line 71 of file Fl_Tooltip.H.
Referenced by Fl_TooltipBox::draw(), and Fl_TooltipBox::layout().
| static void Fl_Tooltip::font | ( | Fl_Font | i | ) | [inline, static] |
| static void Fl_Tooltip::hoverdelay | ( | float | f | ) | [inline, static] |
Sets the tooltip hover delay, the delay between tooltips. The default delay is 0.2 seconds.
Definition at line 56 of file Fl_Tooltip.H.
References f.
| static float Fl_Tooltip::hoverdelay | ( | ) | [inline, static] |
Gets the tooltip hover delay, the delay between tooltips. The default delay is 0.2 seconds.
Definition at line 51 of file Fl_Tooltip.H.
Referenced by enter_area().
| static Fl_Fontsize Fl_Tooltip::size | ( | ) | [inline, static] |
Gets the size of the tooltip text.
Definition at line 75 of file Fl_Tooltip.H.
Referenced by Fl_TooltipBox::draw(), and Fl_TooltipBox::layout().
| static void Fl_Tooltip::size | ( | Fl_Fontsize | s | ) | [inline, static] |
Sets the size of the tooltip text.
Definition at line 77 of file Fl_Tooltip.H.
| static Fl_Color Fl_Tooltip::textcolor | ( | ) | [inline, static] |
Gets the color of the text in the tooltip. The default is black.
Definition at line 83 of file Fl_Tooltip.H.
Referenced by Fl_TooltipBox::draw().
| static void Fl_Tooltip::textcolor | ( | Fl_Color | c | ) | [inline, static] |
Sets the color of the text in the tooltip. The default is black.
Definition at line 85 of file Fl_Tooltip.H.
| void Fl_Widget::copy_tooltip | ( | const char * | ) | [friend] |
| void Fl_Widget::tooltip | ( | const char * | ) | [friend] |
void(* Fl_Tooltip::enter)(Fl_Widget *) = nothing [static] |
Definition at line 63 of file Fl_Tooltip.H.
Referenced by fl_fix_focus(), Fl_Tabs::handle(), Fl::handle(), and Fl_X::make().
void(* Fl_Tooltip::exit)(Fl_Widget *) = nothing [static] |
Definition at line 65 of file Fl_Tooltip.H.
Referenced by fl_throw_focus(), and Fl_Window::show().