Gtk-- Reference: Gtk::Tooltips

Class Index | Cross Index | Namespace Index

# Class Gtk::Tooltips

Tooltip group
Contained in: Gtk
Derived from: Gtk::Data
Derived by: none

#include <gtk--/tooltips.h>

### public function member index:
`` | `Tooltips` | `()`;
``void`` | `disable` | `()`;
``void`` | `enable` | `()`;
``void`` | `force_window` | `()`;
``GtkTooltips`*` | `gtkobj` | `()`;
``const` `GtkTooltips`*` | `gtkobj` | `() `const``;
``static` `bool`` | `isA` | `(`Object`* `object`)`;
``void`` | `set_colors` | `(`const` `Gdk_Color`& `background`, `const` `Gdk_Color`& `foreground`)`;
``void`` | `set_delay` | `(`guint` `delay`)`;
``void`` | `set_tip` | `(`const` `Widget`& `widget`, `const` `nstring`& `tip_text`=0, `const` `nstring`& `tip_private`=0)`;
``virtual`` | `~Tooltips` | `()`;
### protected function member index:
``static` `GtkTooltipsData`*` | `data_get` | `(`Widget`& `widget`)`;

## Description:

Tooltips are the messages that appear next to a widget when the mouse pointer is held over it for a short amount of time. They are especially helpful for adding more verbose description of things such as buttons in a toolbar.

An individual tooltip belongs to a group of tooltips. Every tooltip in the group can then be turned off with a call to `disable` and enabled with `enable`.

The length of time the user must keep the mouse over a widget before the tip is shown, can be altered with `set_delay`. This is set on a 'per group of tooltips' basis.

To assign a tip to a particular ``Gtk`::`Widget``, `set_tip` is used.

Note: Tooltips can only be set on widgets which have their own X window. To add a tooltip to a widget that doesn't have its own window, place the widget inside a ``Gtk`::`EventBox`` and add a tooltip to that instead.

The default appearance of all tooltips in a program is determined by the current gtk theme that the user has selected.

Information about the tooltip (if any) associated with an arbitrary widget can be retrieved using `data_get`.

## Function Member Descriptions:

Gtk::Tooltips::data_get - get tips data from a widget (internal)

``static` `GtkTooltipsData`*` `data_get``(`Widget`& `widget`)`;
Gtk::Tooltips::disable - Disable this tooltip group.

``void`` `disable``()`;
Gtk::Tooltips::enable - Enable this tooltip group.

``void`` `enable``()`;
Gtk::Tooltips::gtkobj - Returns the underlaying gtk+ object.

``GtkTooltips`*` `gtkobj``()`;
Gtk::Tooltips::isA - Returns true if object is this type.

``static` `bool`` `isA``(`Object`* `object`)`;
Gtk::Tooltips::set_colors - This function is unimplemented because tooltip colors are instead determined by the theme.

``void`` `set_colors``(`const` `Gdk_Color`& `background`, `const` `Gdk_Color`& `foreground`)`;
Gtk::Tooltips::set_delay - Set the time before tooltips are displayed.

``void`` `set_delay``(`guint` `delay`)`;

> `delay` is in seconds.

Gtk::Tooltips::set_tip - Set a tip for a widget.

``void`` `set_tip``(`const` `Widget`& `widget`, `const` `nstring`& `tip_text`=0, `const` `nstring`& `tip_private`=0)`;