## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --                Copyright (C) 2000-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.     --  In recent versions of gtk+, this package has been deprecated in favor of

31.     --  Gtk.UIManager. However, the subprograms have not been marked as such in the

32.     --  C files themselves, so are still available in GtkAda as well.

33.     --  </description>

34.     --  <c_version>2.8.17</c_version>

35.     --  <testgtk>create_item_factory.adb</testgtk>

37.     with Glib.ObjectTo API docTo specTo body;

39.     with Gdk.TypesTo API docTo spec;

40.     with Gtk.Accel_GroupTo API docTo specTo body;

41.     with Gtk.WidgetTo API docTo specTo body;

42.     with Gtkada.TypesTo API docTo specTo body;

44.     package Gtk.Item_FactoryTo API docTo specTo body is

45.        pragma Obsolescent;

47.        type Gtk_Item_Factory_RecordTo API docTo body is new Object.GObject_RecordTo API docTo specTo body with private;

48.        type Gtk_Item_Factory is access all Gtk_Item_Factory_RecordTo API docTo specTo body'Class;

50.        --  <doc_ignore>

52.        type Item_Type_Enum is

53.          (Title,

54.           --  Create a title item

56.           Item,

57.           --  Create a simple item

59.           Image_Item,

60.           --  Create an item holding an image

62.           Stock_Item,

63.           --  Create an item holding a stock image

65.           Check_Item,

66.           --  Create a check item

68.           Toggle_Item,

69.           --  Create a toggle item

71.           Radio_Item,

72.           --  Create a radio item

74.           Separator,

75.           --  Create a separator

77.           Tearoff,

78.           --  Create a tearoff item

80.           Branch,

81.           --  Create an item to hold sub items

83.           Last_Branch

84.           --  Create a right justified item to hold sub items

85.          );

86.        --  Identify the predefined item types used to create a

87.        --  Gtk_Item_Factory_Entry.

89.        type Gtk_Item_Factory_EntryTo API docTo body is private;

90.        type Gtk_Item_Factory_Entry_Array is array (GintTo API docTo spec range <>) of

91.          Gtk_Item_Factory_EntryTo API docTo specTo body;

93.        procedure Gtk_NewTo API docTo body

94.          (Ifactory       : out Gtk_Item_FactoryTo API docTo spec;

95.           Container_Type : Gtk_TypeTo API docTo spec;

96.           Path           : UTF8_StringTo API docTo spec;

97.           Accel_Group    : Gtk.Accel_Group.Gtk_Accel_GroupTo API docTo spec);

98.        procedure InitializeTo API docTo body

99.          (Ifactory       : access Gtk_Item_Factory_RecordTo API docTo specTo body'Class;

100.           Container_Type : Gtk_TypeTo API docTo spec;

101.           Path           : UTF8_StringTo API docTo spec := "";

102.           Accel_Group    : Gtk.Accel_Group.Gtk_Accel_GroupTo API docTo spec);

103.        --  Creates or initializes a new item factory.

104.        --  Possible values of Container_Type are:

105.        --    - Gtk.Option_Menu.Get_Type

106.        --    - Gtk.Menu_Bar.Get_Type

107.        --    - Gtk.Menu.Get_Type

109.        function Get_TypeTo API docTo body return Gtk_TypeTo API docTo spec;

110.        --  Return the internal value associated with a Gtk_Item_Factory

112.        procedure Add_ForeignTo API docTo body

113.          (Accel_Widget : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class;

114.           Full_Path    : UTF8_StringTo API docTo spec;

115.           Accel_Group  : Gtk.Accel_Group.Gtk_Accel_GroupTo API docTo spec;

116.           Keyval       : GuintTo API docTo spec;

117.           Modifiers    : Gdk.Types.Gdk_Modifier_TypeTo API docTo spec);

119.        function From_WidgetTo API docTo body

120.          (Widget : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class)

121.           return Gtk_Item_FactoryTo API docTo spec;

123.        function Path_From_WidgetTo API docTo body

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

126.        function Get_ItemTo API docTo body

127.          (Ifactory : access Gtk_Item_Factory_RecordTo API docTo specTo body;

128.           Path     : UTF8_StringTo API docTo spec) return Gtk.Widget.Gtk_WidgetTo API docTo spec;

130.        function Get_WidgetTo API docTo body

131.          (Ifactory : access Gtk_Item_Factory_RecordTo API docTo specTo body;

132.           Path     : UTF8_StringTo API docTo spec) return Gtk.Widget.Gtk_WidgetTo API docTo spec;

134.        function Get_Widget_By_ActionTo API docTo body

135.          (Ifactory : access Gtk_Item_Factory_RecordTo API docTo specTo body;

136.           Action   : GuintTo API docTo spec) return Gtk.Widget.Gtk_WidgetTo API docTo spec;

138.        function Get_Item_By_ActionTo API docTo body

139.          (Ifactory : access Gtk_Item_Factory_RecordTo API docTo specTo body;

140.           Action   : GuintTo API docTo spec) return Gtk.Widget.Gtk_WidgetTo API docTo spec;

142.        procedure Delete_ItemTo API docTo body

143.          (Ifactory : access Gtk_Item_Factory_RecordTo API docTo specTo body;

144.           Path     : UTF8_StringTo API docTo spec);

146.        procedure Delete_EntryTo API docTo body

147.          (Ifactory : access Gtk_Item_Factory_RecordTo API docTo specTo body;

148.           IentryTo API docTo body   : Gtk_Item_Factory_EntryTo API docTo specTo body);

150.        procedure Delete_EntriesTo API docTo body

151.          (Ifactory  : access Gtk_Item_Factory_RecordTo API docTo specTo body;

152.           Entries   : Gtk_Item_Factory_Entry_ArrayTo API docTo spec);

154.        procedure PopupTo API docTo body

155.          (Ifactory     : access Gtk_Item_Factory_RecordTo API docTo specTo body;

156.           X            : GuintTo API docTo spec;

157.           Y            : GuintTo API docTo spec;

158.           Mouse_Button : GuintTo API docTo spec;

159.           Time         : Guint32To API docTo spec);

161.        generic

162.           type Data_Type (<>) is limited private;

163.        package Data_ItemTo API docTo body is

165.           type Data_Type_Access is access all Data_TypeTo API docTo spec;

167.           type Gtk_Print_Func is access procedure

168.             (Func_Data : Data_Type_AccessTo API docTo spec;

169.              Str       : String);  --  gchar* ???

171.           type Gtk_Translate_Func is access function

172.             (Path      : UTF8_StringTo API docTo spec;  --  const gchar* ???

173.              Func_Data : Data_Type_AccessTo API docTo spec) return Gtkada.Types.Chars_PtrTo API docTo spec;

174.           pragma Convention (C, Gtk_Translate_FuncTo API docTo spec);

176.           type Limited_Widget is limited private;

177.           Null_Widget : constant Limited_WidgetTo API docTo spec;

179.           function To_WidgetTo API docTo body

180.             (Widget : Limited_WidgetTo API docTo spec) return Gtk.Widget.Gtk_WidgetTo API docTo spec;

182.           type Gtk_Item_Factory_Callback is access procedure

183.             (Callback_Data   : Data_Type_AccessTo API docTo spec;

184.              Callback_Action : GuintTo API docTo spec;

185.              Widget          : Limited_WidgetTo API docTo spec);

187.           function Gtk_NewTo API docTo body

188.             (Path            : UTF8_StringTo API docTo spec;

189.              Accelerator     : String := "";

190.              Callback        : Gtk_Item_Factory_CallbackTo API docTo spec := null;

191.              Item_TypeTo API docTo body       : Item_Type_EnumTo API docTo spec;

192.              Callback_Action : GuintTo API docTo spec := 0) return Gtk_Item_Factory_EntryTo API docTo specTo body;

193.           --  Create a Gtk_Item_Factory_Entry.

194.           --  It is up to you to call Free at an appropriate point to avoid memory

195.           --  leaks.

197.           function Gtk_NewTo API docTo body

198.             (Path            : UTF8_StringTo API docTo spec;

199.              Accelerator     : String := "";

200.              Callback        : Gtk_Item_Factory_CallbackTo API docTo spec := null;

201.              Item_Type       : String := "";

202.              Callback_Action : GuintTo API docTo spec := 0) return Gtk_Item_Factory_EntryTo API docTo specTo body;

203.           --  Create a Gtk_Item_Factory_Entry.

204.           --  It is up to you to call Free at an appropriate point to avoid memory

205.           --  leaks.

207.           function Gtk_NewTo API docTo body

208.             (Path            : UTF8_StringTo API docTo spec;

209.              Accelerator     : String := "";

210.              Stock_Id        : String;

211.              Callback        : Gtk_Item_Factory_CallbackTo API docTo spec := null;

212.              Callback_Action : GuintTo API docTo spec := 0) return Gtk_Item_Factory_EntryTo API docTo specTo body;

213.           --  Create a Gtk_Item_Factory_Entry from a stock item.

214.           --  It is up to you to call Free at an appropriate point to avoid memory

215.           --  leaks.

217.           function Gtk_NewTo API docTo body

218.             (Path            : UTF8_StringTo API docTo spec;

219.              Accelerator     : String := "";

220.              Callback        : Gtk_Item_Factory_CallbackTo API docTo spec := null;

221.              Pixbuf          : access Guchar_ArrayTo API docTo spec;

222.              Callback_Action : GuintTo API docTo spec := 0) return Gtk_Item_Factory_EntryTo API docTo specTo body;

223.           --  Create a Gtk_Item_Factory_Entry from an inline pixbuf image.

224.           --  It is up to you to call Free at an appropriate point to avoid memory

225.           --  leaks.

227.           procedure FreeTo API docTo body (IentryTo API docTo body : in out Gtk_Item_Factory_EntryTo API docTo specTo body);

228.           --  Free all the dynamic data associated with an item factory entry.

230.           procedure FreeTo API docTo body (Ientries : in out Gtk_Item_Factory_Entry_ArrayTo API docTo spec);

231.           --  Free all the dynamic data associated with each item factory entry.

233.           procedure Create_ItemTo API docTo body

234.             (Ifactory      : access Gtk_Item_Factory_RecordTo API docTo specTo body'Class;

235.              IentryTo API docTo body        : Gtk_Item_Factory_EntryTo API docTo specTo body;

236.              Callback_Data : Data_Type_AccessTo API docTo spec;

237.              Callback_Type : GuintTo API docTo spec);

238.           --  Callback_Type = 0 -> Gtk_Item_Factory_Callback

239.           --  Callback_Type = 1 -> Gtk_Item_Factory_Callback1

241.           procedure Create_ItemsTo API docTo body

242.             (Ifactory      : access Gtk_Item_Factory_RecordTo API docTo specTo body'Class;

243.              Entries       : Gtk_Item_Factory_Entry_ArrayTo API docTo spec;

244.              Callback_Data : Data_Type_AccessTo API docTo spec);

246.           function Popup_DataTo API docTo body

247.             (Ifactory : access Gtk_Item_Factory_RecordTo API docTo specTo body'Class)

248.              return Data_Type_AccessTo API docTo spec;

250.           function Popup_Data_From_WidgetTo API docTo body

251.             (Widget : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class)

252.              return Data_Type_AccessTo API docTo spec;

254.           procedure Popup_With_DataTo API docTo body

255.             (Ifactory     : access Gtk_Item_Factory_RecordTo API docTo specTo body'Class;

256.              Popup_Data   : Data_Type_AccessTo API docTo spec;

257.              Destroy      : System.Address; --  Gtk_Destroy_Notify ???

258.              X            : GuintTo API docTo spec;

259.              Y            : GuintTo API docTo spec;

260.              Mouse_Button : GuintTo API docTo spec;

261.              Time         : Guint32To API docTo spec);

263.           procedure Set_Translate_FuncTo API docTo body

264.             (Ifactory : access Gtk_Item_Factory_RecordTo API docTo specTo body'Class;

265.              Func     : Gtk_Translate_FuncTo API docTo spec;

266.              Data     : Data_Type_AccessTo API docTo spec;

267.              Notify   : System.Address);  --  Gtk_Destroy_Notify ???

269.        private

270.           type Limited_WidgetTo API docTo spec is new System.Address;

271.           Null_WidgetTo API docTo spec : constant Limited_WidgetTo API docTo spec :=

272.             Limited_WidgetTo API docTo spec (System.Null_Address);

273.        end Data_ItemTo API docTo specTo body;

275.        --  </doc_ignore>

277.        ----------------

278.        -- Properties --

279.        ----------------

281.        --  <properties>

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

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

284.        --

285.        --  </properties>

287.     private

288.        type Gtk_Item_Factory_RecordTo API docTo spec is new Glib.Object.GObject_RecordTo API docTo specTo body

289.          with null record;

291.        type Gtk_Item_Factory_EntryTo API docTo spec is record

292.           Path            : Gtkada.Types.Chars_PtrTo API docTo spec;

293.           Accelerator     : Gtkada.Types.Chars_PtrTo API docTo spec;

294.           Callback        : System.Address;

295.           Callback_Action : GuintTo API docTo spec;

296.           Item_Type       : Gtkada.Types.Chars_PtrTo API docTo spec;

298.           --  Extra data for some item types:

299.           --  Image_Item -> pointer to inline pixbuf

300.           --  Stock_Item -> name of stock item

302.           Extra_Data      : Gtkada.Types.Chars_PtrTo API docTo spec;

303.        end record;

304.        pragma Convention (C, Gtk_Item_Factory_EntryTo API docTo specTo body);

306.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_item_factory_get_type");

308.     end Gtk.Item_FactoryTo API docTo specTo body;

310.     --  The following subprograms never had a binding, are now obsolescent:

311.     --  No binding: gtk_item_factories_path_delete

312.     --  No binding: gtk_item_factory_construct

313.     --  No binding: gtk_item_factory_create_items_ac

314.     --  No binding: gtk_item_factory_create_menu_entries

315.     --  No binding: gtk_item_factory_from_path