## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --   Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet   --

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

6.     --                                                                   --

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

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

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

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

11.     --                                                                   --

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

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

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

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

16.     --                                                                   --

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

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

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

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

21.     --                                                                   --

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

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

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

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

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

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

28.     -----------------------------------------------------------------------

30.     --  <description>

31.     --  The Gtk_Combo widget consists of a single-line text entry field and a

32.     --  drop-down list. The drop-down list is displayed when the user clicks on a

33.     --  small arrow button to the right of the entry field.

34.     --

35.     --  The drop-down list is a Gtk_List widget and can be accessed using the list

36.     --  member of the Gtk_Combo. List elements can contain arbitrary widgets, but

37.     --  if an element is not a plain label, then you must use the

38.     --  Gtk_List.Set_Item_String function. This sets the string which will be

39.     --  placed in the text entry field when the item is selected.

40.     --

41.     --  By default, the user can step through the items in the list using the

42.     --  arrow (cursor) keys, though this behaviour can be turned off with

43.     --  Set_Use_Arrows.

44.     --

45.     --  Normally the arrow keys are only active when the contents of the text

46.     --  entry field matches one of the items in the list. If the contents of the

47.     --  entry field do not match any of the list items, then pressing the arrow

48.     --  keys does nothing. However, by calling Set_Use_Arrows_Always you can

49.     --  specify that the arrow keys are always active. If the contents of the entry

50.     --  field does not match any of the items in the list, then pressing the up or

51.     --  down arrow key will set the entry field to the last or first item in the

52.     --  list, respectively.

53.     --

54.     --  </description>

55.     --  <screenshot>gtk-combo</screenshot>

56.     --  <group>Obsolescent widgets</group>

57.     --  <see>Gtk.Combo_Box</see>

59.     pragma Warnings (Off, "*is already use-visible*");

60.     with GlibTo API docTo specTo body;            use GlibTo API docTo specTo body;

61.     with Glib.PropertiesTo API docTo specTo body; use Glib.PropertiesTo API docTo specTo body;

62.     with Glib.TypesTo API docTo specTo body;      use Glib.TypesTo API docTo specTo body;

63.     with Gtk.BoxTo API docTo specTo body;         use Gtk.BoxTo API docTo specTo body;

64.     with Gtk.BuildableTo API docTo specTo body;   use Gtk.BuildableTo API docTo specTo body;

65.     with Gtk.EnumsTo API docTo specTo body;       use Gtk.EnumsTo API docTo specTo body;

66.     with Gtk.ItemTo API docTo specTo body;        use Gtk.ItemTo API docTo specTo body;

67.     with Gtk.OrientableTo API docTo specTo body;  use Gtk.OrientableTo API docTo specTo body;

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

70.     package Gtk.ComboTo API docTo specTo body is

72.        pragma Obsolescent;

74.        type Gtk_Combo_Record is new Gtk_Hbox_RecordTo API docTo spec with null record;

75.        type Gtk_Combo is access all Gtk_Combo_RecordTo API docTo spec'Class;

77.        ------------------

78.        -- Constructors --

79.        ------------------

81.        procedure Gtk_NewTo API docTo body (Combo_Box : out Gtk_ComboTo API docTo spec);

82.        procedure InitializeTo API docTo body (Combo_Box : access Gtk_Combo_RecordTo API docTo spec'Class);

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

85.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_combo_get_type");

87.        -------------

88.        -- Methods --

89.        -------------

91.        procedure Disable_ActivateTo API docTo body (Combo_Box : access Gtk_Combo_RecordTo API docTo spec);

92.        --  Disable the standard handler for the return key in the entry field. The

93.        --  default behavior is to popdown the combo box list, so that the user can

94.        --  choose from it. However, if you want to add your own callback for the

95.        --  return key, you need to call this subprogram, and connect a handler to

96.        --  the "activate" signal for the entry.

98.        procedure Set_Case_SensitiveTo API docTo body

99.           (Combo_Box : access Gtk_Combo_RecordTo API docTo spec;

100.            Val       : Boolean := True);

101.        --  Specify whether the text entered into the Gtk_Entry field and the text

102.        --  in the list items are case sensitive. This may be useful, for example,

103.        --  when you have called Set_Value_In_List to limit the values entered, but

104.        --  you are not worried about differences in case.

106.        procedure Set_Item_StringTo API docTo body

107.           (Combo_Box  : access Gtk_Combo_RecordTo API docTo spec;

108.            Item       : access Gtk.Item.Gtk_Item_RecordTo API docTo specTo body'Class;

109.            Item_Value : UTF8_StringTo API docTo spec);

110.        --  Set the string to place in the Gtk_Entry field when a particular list

111.        --  item is selected. This is needed if the list item is not a simple label.

113.        procedure Set_Popdown_StringsTo API docTo body

114.           (Combo_Box : access Gtk_Combo_RecordTo API docTo spec;

115.            StringsTo API docTo body   : Gtk.Enums.String_List.GlistTo API docTo specTo body);

116.        --  Set all the items in the popup list.

118.        procedure Set_Use_ArrowsTo API docTo body

119.           (Combo_Box : access Gtk_Combo_RecordTo API docTo spec;

120.            Val       : Boolean := True);

121.        --  Specify if the arrow (cursor) keys can be used to step through the

122.        --  items in the list. This is on by default.

124.        procedure Set_Use_Arrows_AlwaysTo API docTo body

125.           (Combo_Box : access Gtk_Combo_RecordTo API docTo spec;

126.            Val       : Boolean := True);

127.        --  Specify if the arrow keys will still work even if the current contents

128.        --  of the Gtk_Entry field do not match any of the list items.

130.        procedure Set_Value_In_ListTo API docTo body

131.           (Combo_Box   : access Gtk_Combo_RecordTo API docTo spec;

132.            Val         : Boolean := True;

133.            Ok_If_Empty : Boolean := False);

134.        --  Specify whether the value entered in the text entry field must match

135.        --  one of the values in the list. If this is set then the user will not be

136.        --  able to perform any other action until a valid value has been entered.

137.        --  If an empty field is acceptable, the Ok_If_Empty parameter should be

138.        --  True. If the value entered must match one of the values in the list, val

139.        --  should be True.

141.        ------------

142.        -- Fields --

143.        ------------

145.        function Get_EntryTo API docTo body

146.           (Combo_Box : access Gtk_Combo_RecordTo API docTo spec) return Gtk.Widget.Gtk_WidgetTo API docTo spec;

147.        procedure Set_EntryTo API docTo body

148.           (Combo_Box : access Gtk_Combo_RecordTo API docTo spec;

149.            Value     : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class);

151.        function Get_ListTo API docTo body

152.           (Combo_Box : access Gtk_Combo_RecordTo API docTo spec) return Gtk.Widget.Gtk_WidgetTo API docTo spec;

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

155.        -- Interfaces_Impl --

156.        ---------------------

158.        function Get_OrientationTo API docTo body

159.           (Self : access Gtk_Combo_RecordTo API docTo spec) return Gtk.Enums.Gtk_OrientationTo API docTo spec;

160.        procedure Set_OrientationTo API docTo body

161.           (Self        : access Gtk_Combo_RecordTo API docTo spec;

162.            OrientationTo API docTo body : Gtk.Enums.Gtk_OrientationTo API docTo spec);

164.        ----------------

165.        -- Interfaces --

166.        ----------------

167.        --  This class implements several interfaces. See Glib.Types

168.        --

169.        --  - "Buildable"

170.        --

171.        --  - "Orientable"

173.        package Implements_Buildable is new Glib.Types.ImplementsTo API docTo specTo body

174.          (Gtk.Buildable.Gtk_BuildableTo API docTo spec, Gtk_Combo_RecordTo API docTo spec, Gtk_ComboTo API docTo spec);

175.        function "+"

176.          (Widget : access Gtk_Combo_RecordTo API docTo spec'Class)

177.        return Gtk.Buildable.Gtk_BuildableTo API docTo spec

178.        renames Implements_Buildable.To_InterfaceTo API docTo specTo body;

179.        function "-"

180.          (Interf : Gtk.Buildable.Gtk_BuildableTo API docTo spec)

181.        return Gtk_ComboTo API docTo spec

182.        renames Implements_Buildable.To_ObjectTo API docTo specTo body;

184.        package Implements_Orientable is new Glib.Types.ImplementsTo API docTo specTo body

185.          (Gtk.Orientable.Gtk_OrientableTo API docTo spec, Gtk_Combo_RecordTo API docTo spec, Gtk_ComboTo API docTo spec);

186.        function "+"

187.          (Widget : access Gtk_Combo_RecordTo API docTo spec'Class)

188.        return Gtk.Orientable.Gtk_OrientableTo API docTo spec

189.        renames Implements_Orientable.To_InterfaceTo API docTo specTo body;

190.        function "-"

191.          (Interf : Gtk.Orientable.Gtk_OrientableTo API docTo spec)

192.        return Gtk_ComboTo API docTo spec

193.        renames Implements_Orientable.To_ObjectTo API docTo specTo body;

195.        ----------------

196.        -- Properties --

197.        ----------------

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

199.        --  Glib.Properties for more information on properties)

200.        --

201.        --  Name: Allow_Empty_Property

202.        --  Type: Boolean

203.        --  Flags: read-write

204.        --

205.        --  Name: Case_Sensitive_Property

206.        --  Type: Boolean

207.        --  Flags: read-write

208.        --

209.        --  Name: Enable_Arrow_Keys_Property

210.        --  Type: Boolean

211.        --  Flags: read-write

212.        --

213.        --  Name: Enable_Arrows_Always_Property

214.        --  Type: Boolean

215.        --  Flags: read-write

216.        --

217.        --  Name: Value_In_List_Property

218.        --  Type: Boolean

219.        --  Flags: read-write

221.        Allow_Empty_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

222.        Case_Sensitive_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

223.        Enable_Arrow_Keys_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

224.        Enable_Arrows_Always_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

225.        Value_In_List_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

227.     private

228.        Allow_Empty_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

229.          Glib.Properties.BuildTo API docTo specTo body ("allow-empty");

230.        Case_Sensitive_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

231.          Glib.Properties.BuildTo API docTo specTo body ("case-sensitive");

232.        Enable_Arrow_Keys_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

233.          Glib.Properties.BuildTo API docTo specTo body ("enable-arrow-keys");

234.        Enable_Arrows_Always_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

235.          Glib.Properties.BuildTo API docTo specTo body ("enable-arrows-always");

236.        Value_In_List_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

237.          Glib.Properties.BuildTo API docTo specTo body ("value-in-list");

238.     end Gtk.ComboTo API docTo specTo body;