## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

1.     -----------------------------------------------------------------------

2.     --               GtkAda - Ada95 binding for Gtk+/Gnome               --

3.     --                                                                   --

4.     --                Copyright (C) 2000-2011, AdaCore                   --

5.     --                                                                   --

6.     -- This library is free software; you can redistribute it and/or     --

7.     -- modify it under the terms of the GNU General Public               --

8.     -- License as published by the Free Software Foundation; either      --

9.     -- version 2 of the License, or (at your option) any later version.  --

10.     --                                                                   --

11.     -- This library is distributed in the hope that it will be useful,   --

12.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

13.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

14.     -- General Public License for more details.                          --

15.     --                                                                   --

16.     -- You should have received a copy of the GNU General Public         --

17.     -- License along with this library; if not, write to the             --

18.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

19.     -- Boston, MA 02111-1307, USA.                                       --

20.     --                                                                   --

21.     -- As a special exception, if other files instantiate generics from  --

22.     -- this unit, or you link this unit with other files to produce an   --

23.     -- executable, this  unit  does not  by itself cause  the resulting  --

24.     -- executable to be covered by the GNU General Public License. This  --

25.     -- exception does not however invalidate any other reasons why the   --

26.     -- executable file  might be covered by the  GNU Public License.     --

27.     -----------------------------------------------------------------------

29.     --  <description>

30.     --  Tooltips are the small text windows that popup when the mouse rests over

31.     --  a widget, and that provide a quick help for the user.

32.     --

33.     --  In GtkAda, all tooltips belong to a group (a Gtk_Tooltips). All the

34.     --  individual tooltips in a group can be disabled or enabled at the same

35.     --  time. Likewise, the colors and style of a tooltip can be set on a group

36.     --  basis.

37.     --

38.     --  See the example at the end for how to change the default colors used

39.     --  for tooltips.

40.     --  </description>

41.     --  <c_version>2.8.17</c_version>

42.     --  <testgtk>create_tooltips.adb</testgtk>

44.     with GlibTo API docTo specTo body;

45.     with Glib.ObjectTo API docTo specTo body;

46.     with Gtk.EnumsTo API docTo specTo body;

47.     with Gtk.WidgetTo API docTo specTo body;

49.     package Gtk.TooltipsTo API docTo specTo body is

51.        type Gtk_Tooltips_RecordTo API docTo body is new Glib.Object.GObject_RecordTo API docTo specTo body with private;

52.        type Gtk_Tooltips is access all Gtk_Tooltips_RecordTo API docTo specTo body'Class;

54.        --  <doc_ignore>

55.        type Tooltips_Data

56.          (Text_Length : Natural; Private_Length : Natural) is

57.        record

58.           Tooltips     : Gtk_TooltipsTo API docTo spec;    -- the group of the tooltip

59.           Widget       : Gtk.Widget.Gtk_WidgetTo API docTo spec; -- the widget to which it applies

60.           Text         : UTF8_StringTo API docTo spec (1 .. Text_Length); -- the text of the tooltip

61.           Text_Private : UTF8_StringTo API docTo spec (1 .. Private_Length); -- the private text

62.        end record;

63.        --  </doc_ignore>

65.        procedure Gtk_NewTo API docTo body (Widget : out Gtk_TooltipsTo API docTo spec);

66.        --  Create a new group of tooltips.

68.        procedure InitializeTo API docTo body (Widget : access Gtk_Tooltips_RecordTo API docTo specTo body'Class);

69.        --  Internal initialization function.

70.        --  See the section "Creating your own widgets" in the documentation.

72.        function Get_TypeTo API docTo body return Glib.GTypeTo API docTo spec;

73.        --  Return the internal value associated with a Gtk_Tooltips.

75.        procedure EnableTo API docTo body (Tooltips : access Gtk_Tooltips_RecordTo API docTo specTo body);

76.        --  Enable all the tooltips in the group.

77.        --  From now on, when the mouse rests over a widget for a short period of

78.        --  time, the help text is automatically displayed.

80.        procedure DisableTo API docTo body (Tooltips : access Gtk_Tooltips_RecordTo API docTo specTo body);

81.        --  Disable all the tooptips in the group.

82.        --  From now on, no tooltips in this group will appear, unless they are

83.        --  re-enabled.

85.        procedure Set_TipTo API docTo body

86.          (Tooltips    : access Gtk_Tooltips_RecordTo API docTo specTo body;

87.           Widget      : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

88.           Tip_Text    : UTF8_StringTo API docTo spec;

89.           Tip_Private : UTF8_StringTo API docTo spec := "");

90.        --  Add a new tooltip to Widget.

91.        --  The message that appears in the tooltip is Tip_Text, and the tooltip

92.        --  belongs to the group Tooltips.

93.        --  Tip_Private contains more information, that can be displayed by a

94.        --  Gtk_Tips_Query widget through the "widget_selected" signal.

95.        --  In most cases, Tip_Private should simply keep its default empty value.

97.        function Get_DataTo API docTo body

98.          (Widget : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class) return Tooltips_DataTo API docTo spec;

99.        --  Return the tooltip data associated with the Widget.

100.        --  If there is none, the two text fields in the returned structure have

101.        --  a length 0.

103.        procedure Force_WindowTo API docTo body (Widget : access Gtk_Tooltips_RecordTo API docTo specTo body);

104.        --  Make sure the window in which the tooltips will be displayed is

105.        --  created.

106.        --  This is useful if you want to modify some characteristics of that

107.        --  window.

109.        procedure Set_MarkupTo API docTo body

110.          (Tooltips : access Gtk_Tooltips_RecordTo API docTo specTo body;

111.           Text     : UTF8_StringTo API docTo spec);

112.        --  Sets the text of the tooltip to be markup, which is marked up with the

113.        --  Pango text markup language. If markup is empty string, the label will be

114.        --  hidden.

116.        procedure Set_Icon_From_StockTo API docTo body

117.          (Tooltips : access Gtk_Tooltips_RecordTo API docTo specTo body;

118.           Stock_Id : String;

119.           Size     : Gtk.Enums.Gtk_Icon_SizeTo API docTo spec);

120.        --  Sets the icon of the tooltip (which is in front of the text) to be the

121.        --  stock item indicated by stock_id with the size indicated by size. If

122.        --  stock_id is emtry string, the image will be hidden.

124.        -----------------

125.        -- Obsolescent --

126.        -----------------

127.        --  All subprograms below are now obsolescent in gtk+. They might be removed

128.        --  from future versions of gtk+ (and therefore GtkAda).

129.        --  To find out whether your code uses any of these, we recommend compiling

130.        --  with the -gnatwj switch

131.        --  <doc_ignore>

133.        procedure Set_DelayTo API docTo body

134.          (Tooltips : access Gtk_Tooltips_RecordTo API docTo specTo body;

135.           Duration : GuintTo API docTo spec := 500);

136.        pragma Obsolescent;  --  Set_Delay

137.        --  Set the delay between the user moving the mouse over a widget and the

138.        --  text appearing. Duration is in milli-seconds.

140.        --  </doc_ignore>

142.        ----------------

143.        -- Properties --

144.        ----------------

146.        --  <properties>

147.        --  The following properties are defined for this widget. See

148.        --  Glib.Properties for more information on properties.

149.        --

150.        --  </properties>

152.        -------------

153.        -- Signals --

154.        -------------

156.        --  <signals>

157.        --  The following new signals are defined for this widget:

158.        --  </signals>

160.     private

161.        type Gtk_Tooltips_RecordTo API docTo spec is

162.          new Glib.Object.GObject_RecordTo API docTo specTo body with null record;

164.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_tooltips_get_type");

165.     end Gtk.TooltipsTo API docTo specTo body;

167.     --  <example>

168.     --  <include>../examples/documentation/tooltips.adb</include>

169.     --  </example>

171.     --  No binding: gtk_tooltips_get_info_from_tip_window