FLTK 1.3.0
Fl_Tooltip Class Reference

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

#include <Fl_Tooltip.H>

List of all members.

Static Public Member Functions

static Fl_Color color ()
 Gets the background color for tooltips.
static void color (Fl_Color c)
 Sets the background color for tooltips.
static void current (Fl_Widget *)
 Sets the current widget target.
static Fl_Widgetcurrent ()
 Gets the current widget target.
static void delay (float f)
 Sets the tooltip delay.
static float delay ()
 Gets the tooltip delay.
static void disable ()
 Same as enable(0), disables tooltips on all widgets.
static void enable (int b=1)
 Enables tooltips on all widgets (or disables if b is false).
static int enabled ()
 Returns non-zero if tooltips are enabled.
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.
static Fl_Font font ()
 Gets the typeface for the tooltip text.
static void font (Fl_Font i)
 Sets the typeface for the tooltip text.
static void hoverdelay (float f)
 Sets the tooltip hover delay, the delay between tooltips.
static float hoverdelay ()
 Gets the tooltip hover delay, the delay between tooltips.
static Fl_Fontsize size ()
 Gets the size of the tooltip text.
static void size (Fl_Fontsize s)
 Sets the size of the tooltip text.
static Fl_Color textcolor ()
 Gets the color of the text in the tooltip.
static void textcolor (Fl_Color c)
 Sets the color of the text in the tooltip.

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.


Member Function Documentation

static Fl_Color Fl_Tooltip::color ( ) [inline, static]

Gets the background color for tooltips.

The default background color is a pale yellow.

static void Fl_Tooltip::color ( Fl_Color  c) [inline, static]

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 void Fl_Tooltip::delay ( float  f) [inline, static]

Sets the tooltip delay.

The default delay is 1.0 seconds.

static float Fl_Tooltip::delay ( ) [inline, static]

Gets the tooltip delay.

The default delay is 1.0 seconds.

static void Fl_Tooltip::disable ( ) [inline, static]

Same as enable(0), disables tooltips on all widgets.

static void Fl_Tooltip::enable ( int  b = 1) [inline, static]

Enables tooltips on all widgets (or disables if b is false).

static int Fl_Tooltip::enabled ( ) [inline, static]

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 ( ) [inline, static]

Gets the typeface for the tooltip text.

static void Fl_Tooltip::font ( Fl_Font  i) [inline, static]

Sets the typeface for the tooltip text.

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.

static float Fl_Tooltip::hoverdelay ( ) [inline, static]

Gets the tooltip hover delay, the delay between tooltips.

The default delay is 0.2 seconds.

static Fl_Fontsize Fl_Tooltip::size ( ) [inline, static]

Gets the size of the tooltip text.

static void Fl_Tooltip::size ( Fl_Fontsize  s) [inline, static]

Sets the size of the tooltip text.

static Fl_Color Fl_Tooltip::textcolor ( ) [inline, static]

Gets the color of the text in the tooltip.

The default is black.

static void Fl_Tooltip::textcolor ( Fl_Color  c) [inline, static]

Sets the color of the text in the tooltip.

The default is black.


The documentation for this class was generated from the following files: