W Wrapl, The Programming Language

Libraries:Gtk:Gtk:Tooltips

Types

T

Inherits from:

T has been deprecated in GTK+ 2.12, in favor of the new Gtk.Gtk.Tooltip.T API.

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 descriptions of things such as buttons in a toolbar.

An individual tooltip belongs to a group of tooltips. A group is created with a call to gtk_tooltips_new(). 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 SetDelay. This is set on a 'per group of tooltips' basis.

To assign a tip to a particular Gtk.Gtk.Widget.T, SetTip is used.

Note

Tooltips can only be set on widgets which have their own X window and receive enter and leave events. To check if a widget has its own window use GTK_WIDGET_NO_WINDOW(). To add a tooltip to a widget that doesn't have its own window, place the widget inside a Gtk.Gtk.EventBox.T 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 Gtk.Gtk.TooltipsData.Get.

Example 65. Adding tooltips to buttons.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
GtkWidget *load_button, *save_button, *hbox;
GtkTooltips *button_bar_tips;
button_bar_tips = gtk_tooltips_new ();
/* Create the buttons and pack them into a GtkHBox */
hbox = gtk_hbox_new (TRUE, 2);
load_button = gtk_button_new_with_label ("Load a file");
gtk_box_pack_start (GTK_BOX (hbox), load_button, TRUE, TRUE, 2);
gtk_widget_show (load_button);
save_button = gtk_button_new_with_label ("Save a file");
gtk_box_pack_start (GTK_BOX (hbox), save_button, TRUE, TRUE, 2);
gtk_widget_show (save_button);
gtk_widget_show (hbox);
/* Add the tips */
gtk_tooltips_set_tip (GTK_TOOLTIPS (button_bar_tips), load_button,
                 "Load a new document into this window",
                 "Requests the filename of a document.
                  This will then be loaded into the current
                  window, replacing the contents of whatever
                  is already loaded.");
gtk_tooltips_set_tip (GTK_TOOLTIPS (button_bar_tips), save_button,
                 "Saves the current document to a file",
                 "If you have saved the document previously,
                  then the new version will be saved over the
                  old one. Otherwise, you will be prompted for
                  a filename.");





Constants

Nil : T

Functions

GetInfoFromTipWindow(tip_window @ Gtk.Gtk.Window.T, tooltips @ Std.Object.T, current_widget @ Std.Object.T) : Std.Symbol.T

Warning

GetInfoFromTipWindow has been deprecated since version 2.12 and should not be used in newly-written code.



GetType() : Gtk.GObject.Type.T



New() : Gtk.Gtk.Tooltips.T

Warning

gtk_tooltips_new has been deprecated since version 2.12 and should not be used in newly-written code.



Methods

:ActiveTipsData(self @ T) : Gtk.Gtk.TooltipsData.T

:Delay(self @ T) : Std.Integer.SmallT

:Disable(self @ T) : Std.Object.T

Warning

Disable has been deprecated since version 2.12 and should not be used in newly-written code.



:Enable(self @ T) : Std.Object.T

Warning

Enable has been deprecated since version 2.12 and should not be used in newly-written code.



:Enabled(self @ T) : Std.Integer.SmallT

:ForceWindow(self @ T) : Std.Object.T

Warning

ForceWindow has been deprecated since version 2.12 and should not be used in newly-written code.



:HaveGrab(self @ T) : Std.Integer.SmallT

:LastPopdown(self @ T) : Gtk.Glib.GTimeVal.T

:SetDelay(self @ T, delay @ Std.Integer.SmallT) : Std.Object.T

Warning

SetDelay has been deprecated since version 2.12 and should not be used in newly-written code.



:SetTip(self @ T, widget @ Gtk.Gtk.Widget.T, tip_text @ Std.String.T, tip_private @ Std.String.T) : Std.Object.T

Warning

SetTip has been deprecated since version 2.12 and should not be used in newly-written code.



:TimerTag(self @ T) : Std.Integer.SmallT

:TipLabel(self @ T) : Gtk.Gtk.Widget.T

:TipWindow(self @ T) : Gtk.Gtk.Widget.T

:TipsDataList(self @ T) : Std.Object.T

:UseStickyDelay(self @ T) : Std.Integer.SmallT

:setActiveTipsData(self @ T, value @ Gtk.Gtk.TooltipsData.T) : Gtk.Gtk.TooltipsData.T

:setDelay(self @ T, value @ Std.Integer.SmallT) : Std.Integer.SmallT

:setEnabled(self @ T, value @ Std.Integer.SmallT) : Std.Integer.SmallT

:setHaveGrab(self @ T, value @ Std.Integer.SmallT) : Std.Integer.SmallT

:setLastPopdown(self @ T, value @ Gtk.Glib.GTimeVal.T) : Gtk.Glib.GTimeVal.T

:setTimerTag(self @ T, value @ Std.Integer.SmallT) : Std.Integer.SmallT

:setTipLabel(self @ T, value @ Gtk.Gtk.Widget.T) : Gtk.Gtk.Widget.T

:setTipWindow(self @ T, value @ Gtk.Gtk.Widget.T) : Gtk.Gtk.Widget.T

:setTipsDataList(self @ T, value @ Std.Object.T) : Std.Object.T

:setUseStickyDelay(self @ T, value @ Std.Integer.SmallT) : Std.Integer.SmallT