FLTK 1.3.3
Fl_Tooltip Class Reference

The Fl_Tooltip class provides tooltip support for all FLTK widgets. More...

#include <Fl_Tooltip.H>

Static Public Member Functions

static Fl_Color color ()
 Gets the background color for tooltips. More...
 
static void color (Fl_Color c)
 Sets the background color for tooltips. More...
 
static Fl_Widgetcurrent ()
 Gets the current widget target.
 
static void current (Fl_Widget *)
 Sets the current widget target. More...
 
static float delay ()
 Gets the tooltip delay. More...
 
static void delay (float f)
 Sets the tooltip delay. More...
 
static void disable ()
 Same as enable(0), disables tooltips on all widgets. More...
 
static void enable (int b=1)
 Enables tooltips on all widgets (or disables if b is false). More...
 
static int enabled ()
 Returns non-zero if tooltips are enabled. More...
 
static void enter_area (Fl_Widget *w, int X, int Y, int W, int H, const char *tip)
 You may be able to use this to provide tooltips for internal pieces of your widget. More...
 
static Fl_Font font ()
 Gets the typeface for the tooltip text. More...
 
static void font (Fl_Font i)
 Sets the typeface for the tooltip text. More...
 
static float hoverdelay ()
 Gets the tooltip hover delay, the delay between tooltips. More...
 
static void hoverdelay (float f)
 Sets the tooltip hover delay, the delay between tooltips. More...
 
static int margin_height ()
 
static int margin_width ()
 
static Fl_Fontsize size ()
 Gets the size of the tooltip text. More...
 
static void size (Fl_Fontsize s)
 Sets the size of the tooltip text. More...
 
static Fl_Color textcolor ()
 Gets the color of the text in the tooltip. More...
 
static void textcolor (Fl_Color c)
 Sets the color of the text in the tooltip. More...
 
static int wrap_width ()
 

Static Public Attributes

static void(* enter )(Fl_Widget *w) = nothing
 
static void(* exit )(Fl_Widget *w) = nothing
 

Friends

void Fl_Widget::copy_tooltip (const char *)
 
void Fl_Widget::tooltip (const char *)
 

Detailed Description

The Fl_Tooltip class provides tooltip support for all FLTK widgets.

It contains only static methods.

tooltip-options.png
Fl_Tooltip Options

Member Function Documentation

static Fl_Color Fl_Tooltip::color ( )
inlinestatic

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.

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.

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.

static Fl_Fontsize Fl_Tooltip::size ( )
inlinestatic

Gets the size of the tooltip text.

static void Fl_Tooltip::size ( Fl_Fontsize  s)
inlinestatic

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: