type Gtk_Tooltips_Record is new Glib.Object.GObject_Record with private;
type Gtk_Tooltips is access all Gtk_Tooltips_Record'Class;
type Tooltips_Data (Text_Length : Natural; Private_Length : Natural) is record Tooltips : Gtk_Tooltips; -- the group of the tooltip Widget : Gtk.Widget.Gtk_Widget; -- the widget to which it applies Text : UTF8_String (1 .. Text_Length); -- the text of the tooltip Text_Private : UTF8_String (1 .. Private_Length); -- the private text end record;
procedure Initialize
( | Widget | : access Gtk_Tooltips_Record'Class); |
function Get_Type return Glib.GType;
procedure Enable
( | Tooltips | : access Gtk_Tooltips_Record); |
procedure Disable
( | Tooltips | : access Gtk_Tooltips_Record); |
procedure Set_Tip
( | Tooltips | : access Gtk_Tooltips_Record; |
Widget | : access Gtk.Widget.Gtk_Widget_Record'Class; | |
Tip_Text | : UTF8_String; | |
Tip_Private | : UTF8_String := ""); |
function Get_Data
( | Widget | : access Gtk.Widget.Gtk_Widget_Record'Class) return Tooltips_Data; |
procedure Force_Window
( | Widget | : access Gtk_Tooltips_Record); |
procedure Set_Markup
( | Tooltips | : access Gtk_Tooltips_Record; |
Text | : UTF8_String); |
procedure Set_Icon_From_Stock
( | Tooltips | : access Gtk_Tooltips_Record; |
Stock_Id | : String; | |
Size | : Gtk.Enums.Gtk_Icon_Size); |
procedure Set_Delay
( | Tooltips | : access Gtk_Tooltips_Record; |
Duration | : Guint := 500); |
Tooltips are the small text windows that popup when the mouse rests over a widget, and that provide a quick help for the user.
In GtkAda, all tooltips belong to a group (a Gtk_Tooltips). All the individual tooltips in a group can be disabled or enabled at the same time. Likewise, the colors and style of a tooltip can be set on a group basis.
See the example at the end for how to change the default colors used for tooltips.
Binding from C File version 2.8.17
<testgtk>create_tooltips.adb</testgtk>