## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --                    Copyright (C) 2010-2013, 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.     --  Gtk.Tooltip belongs to the new tooltips API that was introduced in

31.     --  GTK+ 2.12 and which deprecates the old Gtk.Tooltips API.

32.     --

33.     --  Basic tooltips can be realized simply by using Set_Tooltip_Text or

34.     --  Set_Tooltip_Markup without any explicit tooltip object.

35.     --

36.     --  When you need a tooltip with a little more fancy contents, like adding

37.     --  an image, or you want the tooltip to have different contents per

38.     --  Gtk_Tree_View row or cell, you will have to do a little more work:

39.     --

40.     --  Set the "has-tooltip" property to True, this will make GTK+ monitor the

41.     --  widget for motion and related events which are needed to determine when

42.     --  and where to show a tooltip.

43.     --

44.     --  Connect to the "query-tooltip" signal. This signal will be emitted when a

45.     --  tooltip is supposed to be shown. One of the arguments passed to the signal

46.     --  handler is a Gtk_Tooltip object. This is the object that we are about to

47.     --  display as a tooltip, and can be manipulated in your callback using

48.     --  functions like Set_Icon.  There are functions for setting the tooltip's

49.     --  markup, setting an image from a stock icon, or even putting in a custom

50.     --  widget.

51.     --

52.     --  Return True from your query-tooltip handler. This causes the tooltip to

53.     --  be shown. If you return False, it will not be shown.

54.     --

55.     --  In the probably rare case where you want to have even more control over

56.     --  the tooltip that is about to be shown, you can set your own Gtk_Window

57.     --  which will be used as tooltip window. This works as follows:

58.     --

59.     --  Set "has-tooltip" and connect to "query-tooltip" as before.

60.     --

61.     --  Use Gtk.Widget.Set_Tooltip_Window to set a Gtk_Window created by you as

62.     --  tooltip window.

63.     --

64.     --  In the ::query-tooltip callback you can access your window using

65.     --  Gtk.Widget.Get_Tooltip_Window and manipulate as you wish. The semantics

66.     --  of the return value are exactly as before, return True to show the window,

67.     --  False to not show it.

68.     --  </description>

69.     --  <c_version>2.16.6</c_version>

71.     with GlibTo API docTo specTo body;

72.     with Glib.ObjectTo API docTo specTo body;

73.     with Gdk.DisplayTo API docTo specTo body;

74.     with Gdk.PixbufTo API docTo specTo body;

75.     with Gdk.RectangleTo API docTo specTo body;

76.     with Gtk.EnumsTo API docTo specTo body;

77.     with Gtk.WidgetTo API docTo specTo body;    use Gtk.WidgetTo API docTo specTo body;

79.     package Gtk.TooltipTo API docTo specTo body is

81.        type Gtk_Tooltip_RecordTo API docTo body is new Glib.Object.GObject_RecordTo API docTo specTo body with private;

82.        type Gtk_Tooltip is access all Gtk_Tooltip_RecordTo API docTo specTo body'Class;

84.        function Get_TypeTo API docTo body return GTypeTo API docTo spec;

86.        procedure Set_CustomTo API docTo body

87.          (Tooltip       : access Gtk_Tooltip_RecordTo API docTo specTo body;

88.           Custom_Widget : access Gtk_Widget_RecordTo API docTo specTo body'Class);

89.        --  Replaces the widget packed into the tooltip with Custom_widget.

90.        --  By default a box with a Gtk_Image and Gtk_Label is embedded in

91.        --  the tooltip, which can be configured using Set_Markup and Set_Icon.

93.        procedure Set_IconTo API docTo body

94.          (Tooltip : access Gtk_Tooltip_RecordTo API docTo specTo body;

95.           Pixbuf  : Gdk.Pixbuf.Gdk_PixbufTo API docTo spec);

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

97.        --  Pixbuf.  If Pixbuf is null, the image will be hidden.

99.        procedure Set_Icon_From_Icon_NameTo API docTo body

100.          (Tooltip   : access Gtk_Tooltip_RecordTo API docTo specTo body;

101.           Icon_Name : String;

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

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

104.        --  the icon indicated by Icon_Name with the size indicated by Size.

105.        --  If Icon_Name is "", the image will be hidden.

107.        procedure Set_Icon_From_StockTo API docTo body

108.          (Tooltip  : access Gtk_Tooltip_RecordTo API docTo specTo body;

109.           Stock_Id : String;

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

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

112.        --  the stock item indicated by Stock_Id with the size indicated by Size.

113.        --  If Stock_Id is "", the image will be hidden.

115.        procedure Set_MarkupTo API docTo body

116.          (Tooltip : access Gtk_Tooltip_RecordTo API docTo specTo body;

117.           Markup  : UTF8_StringTo API docTo spec);

118.        --  Sets the text of the tooltip to be Markup, which is marked up with

119.        --  the Pango text markup language.  If Markup is "", the label will be

120.        --  hidden.

122.        procedure Set_TextTo API docTo body

123.          (Tooltip : access Gtk_Tooltip_RecordTo API docTo specTo body;

124.           Text    : UTF8_StringTo API docTo spec);

125.        --  Sets the text of the tooltip to be Text. If Text is "", the label

126.        --  will be hidden. See also Set_Markup.

128.        procedure Set_Tip_AreaTo API docTo body

129.          (Tooltip : access Gtk_Tooltip_RecordTo API docTo specTo body;

130.           RectTo API docTo body    : Gdk.Rectangle.Gdk_RectangleTo API docTo spec);

131.        --  Sets the area of the widget, where the contents of this tooltip apply,

132.        --  to be Rect (in widget coordinates).  This is especially useful for

133.        --  properly setting tooltips on Gtk_Tree_View rows and cells,

134.        --  Gtk_Icon_Views, etc.

135.        --

136.        --  For setting tooltips on Gtk_Tree_View, please refer to the convenience

137.        --  functions for this: Gtk.Tree_View.Set_Tooltip_Row and

138.        --  Gtk.Tree_View.Set_Tooltip_Cell.

140.        procedure Trigger_Tooltip_QueryTo API docTo body

141.          (Display : access Gdk.Display.Gdk_Display_RecordTo API docTo spec);

142.        --  Triggers a new tooltip query on Display, in order to update the current

143.        --  visible tooltip, or to show/hide the current tooltip.  This function is

144.        --  useful to call when, for example, the state of the widget changed by a

145.        --  key press.

147.     private

148.        type Gtk_Tooltip_RecordTo API docTo spec is new Glib.Object.GObject_RecordTo API docTo specTo body with null record;

150.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_tooltip_get_type");

151.     end Gtk.TooltipTo API docTo specTo body;