fltk.tooltip

Tooltip control module for FLTK.

This module provides the Tooltip static class for controlling tooltip behavior globally, including appearance, timing, and enable/disable.

Example:

import fltk.tooltip;

// Configure tooltip appearance
Tooltip.delay = 0.5;
Tooltip.color = Color.yellow;
Tooltip.textColor = Color.black;

// Disable tooltips globally
Tooltip.disable();

struct Tooltip

Types 1

structTooltip

Static class for controlling tooltip behavior.

Fl_Tooltip provides global control over tooltip appearance and timing for all FLTK widgets. All methods are static since there is only one global tooltip configuration.

Example:

// Set tooltip delay to half a second
Tooltip.delay = 0.5;

// Change tooltip colors
Tooltip.color = Color.yellow;
Tooltip.textColor = Color.black;

// Temporarily disable tooltips
Tooltip.disable();
// ... do something ...
Tooltip.enable();

Methods
float delay() @property nothrow @nogcGets or sets the tooltip delay in seconds.
void delay(float f) @property nothrow @nogcditto
float hoverDelay() @property nothrow @nogcGets or sets the tooltip hover delay in seconds.
void hoverDelay(float f) @property nothrow @nogcditto
bool enabled() @property nothrow @nogcChecks if tooltips are enabled.
void enable() nothrow @nogcEnables tooltips on all widgets.
void disable() nothrow @nogcDisables tooltips on all widgets.
Font font() @property nothrow @nogcGets or sets the typeface for tooltip text.
void font(Font f) @property nothrow @nogcditto
int size() @property nothrow @nogcGets or sets the size of tooltip text.
void size(int s) @property nothrow @nogcditto
Color color() @property nothrow @nogcGets or sets the background color for tooltips.
void color(Color c) @property nothrow @nogcditto
Color textColor() @property nothrow @nogcGets or sets the text color for tooltips.
void textColor(Color c) @property nothrow @nogcditto
int marginWidth() @property nothrow @nogcGets or sets the margin width (extra space left/right of text).
void marginWidth(int v) @property nothrow @nogcditto
int marginHeight() @property nothrow @nogcGets or sets the margin height (extra space above/below text).
void marginHeight(int v) @property nothrow @nogcditto
int wrapWidth() @property nothrow @nogcGets or sets the maximum width for tooltip text before word wrap.
void wrapWidth(int v) @property nothrow @nogcditto
WidgetPtr current() @property nothrow @nogcGets the current tooltip target widget.
void current(WidgetPtr w) @property nothrow @nogcSets the current tooltip target widget.
void enterArea(WidgetPtr w, int x, int y, int width, int height, const(char) * tip) nothrow @nogcManually enters a tooltip area for a widget.
void enterArea(WidgetPtr w, int x, int y, int width, int height, string tip)ditto
Constructors