## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --                Copyright (C) 2001-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.     --  This widget works like a normal menu_item, but you can insert a

31.     --  arbitrary widget (most often a pixmap widget), which is displayed

32.     --  at the left side. The advantage is that indentation is handled the

33.     --  same way as GtkAda does (i.e if you create a menu with a

34.     --  Gtk_Check_Menu_Item, all normal menu_items are automatically indented by

35.     --  GtkAda - so if you use a normal menu_item to display pixmaps at the left

36.     --  side, the pixmaps will be indented, which is not what you want. This widget

37.     --  solves the problem).

38.     --  </description>

39.     --  <c_version>2.16.6</c_version>

40.     --  <group>Menus and Toolbars</group>

42.     with Glib.PropertiesTo API docTo specTo body;

43.     with Gtk.Accel_GroupTo API docTo specTo body;

44.     with Gtk.Menu_ItemTo API docTo specTo body;

45.     with Gtk.WidgetTo API docTo specTo body;

47.     package Gtk.Image_Menu_ItemTo API docTo specTo body is

49.        type Gtk_Image_Menu_Item_RecordTo API docTo body is new

50.          Gtk.Menu_Item.Gtk_Menu_Item_RecordTo API docTo specTo body with private;

51.        type Gtk_Image_Menu_Item is access all Gtk_Image_Menu_Item_RecordTo API docTo specTo body'Class;

53.        procedure Gtk_NewTo API docTo body

54.          (Widget : out Gtk_Image_Menu_ItemTo API docTo spec;

55.           Label  : UTF8_StringTo API docTo spec);

56.        --  Create a new Gtk_Image_Menu_Item.

57.        --  If label is non null, set the label of the menu item.

59.        procedure Gtk_New_From_StockTo API docTo body

60.          (Widget   : out Gtk_Image_Menu_ItemTo API docTo spec;

61.           Stock_Id : String);

62.        --  Create a new Gtk_Image_Menu_Item from a stock item.

64.        procedure Gtk_NewTo API docTo body

65.          (Widget      : out Gtk_Image_Menu_ItemTo API docTo spec;

66.           Stock_Id    : String;

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

68.        --  Create a new Gtk_Image_Menu_Item with a label.

69.        --  If label contains an underscore, a mnemonic is created accordingly.

71.        procedure Gtk_New_With_MnemonicTo API docTo body

72.          (Widget : out Gtk_Image_Menu_ItemTo API docTo spec;

73.           Label  : UTF8_StringTo API docTo spec);

74.        --  Create a new Gtk_Image_Menu_Item with a label.

75.        --  If label contains an underscore, a mnemonic is created accordingly.

77.        procedure InitializeTo API docTo body

78.          (Widget : access Gtk_Image_Menu_Item_RecordTo API docTo specTo body'Class;

79.           Label  : UTF8_StringTo API docTo spec);

80.        --  Internal initialization function.

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

83.        procedure InitializeTo API docTo body

84.          (Widget      : access Gtk_Image_Menu_Item_RecordTo API docTo specTo body'Class;

85.           Stock_Id    : String;

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

87.        --  ditto.

89.        procedure Initialize_With_MnemonicTo API docTo body

90.          (Widget : access Gtk_Image_Menu_Item_RecordTo API docTo specTo body'Class;

91.           Label  : UTF8_StringTo API docTo spec);

92.        --  ditto.

94.        procedure Initialize_From_StockTo API docTo body

95.          (Widget   : access Gtk_Image_Menu_Item_RecordTo API docTo specTo body'Class;

96.           Stock_Id : String);

97.        --  ditto.

99.        function Get_TypeTo API docTo body return Gtk.Gtk_TypeTo API docTo spec;

100.        --  Return the internal value associated with this widget.

102.        procedure Set_ImageTo API docTo body

103.          (Menu_Item : access Gtk_Image_Menu_Item_RecordTo API docTo specTo body;

104.           Image     : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class);

106.        function Get_ImageTo API docTo body

107.          (Menu_Item : access Gtk_Image_Menu_Item_RecordTo API docTo specTo body)

108.           return Gtk.Widget.Gtk_WidgetTo API docTo spec;

110.        procedure Set_Accel_GroupTo API docTo body

111.          (Image_Menu_Item : access Gtk_Image_Menu_Item_RecordTo API docTo specTo body'Class;

112.           Accel_Group     : access Gtk.Accel_Group.Gtk_Accel_Group_RecordTo API docTo spec'Class);

113.        --  Specifies an Accel_Group to add the menu items accelerator to.

114.        --  This only applies to stock items, so a stock item must already

115.        --  be set.  Make sure to call Set_Use_Stock and Gtk.Menu_Item.Set_Label

116.        --  with a valid stock item first.

117.        --

118.        --  If you want this menu item to have changeable accelerators then

119.        --  you shouldn't need this (see Gtk_New_From_Stock).

121.        function Get_Always_Show_ImageTo API docTo body

122.          (Image_Menu_Item : access Gtk_Image_Menu_Item_RecordTo API docTo specTo body'Class)

123.           return Boolean;

124.        procedure Set_Always_Show_ImageTo API docTo body

125.          (Image_Menu_Item : access Gtk_Image_Menu_Item_RecordTo API docTo specTo body'Class;

126.           Always_Show     : Boolean);

127.        --  If True, the menu item will ignore the GtkSettings:gtk-menu-images

128.        --  setting and always show the image, if available.

129.        --

130.        --  Use this property if the menuitem would be useless or hard to use

131.        --  without the image.

133.        function Get_Use_StockTo API docTo body

134.          (Image_Menu_Item : access Gtk_Image_Menu_Item_RecordTo API docTo specTo body'Class)

135.           return Boolean;

136.        procedure Set_Use_StockTo API docTo body

137.          (Image_Menu_Item : access Gtk_Image_Menu_Item_RecordTo API docTo specTo body'Class;

138.           Use_Stock       : Boolean);

139.        --  If True, the label set in the Image_Menu_Item is used as a

140.        --  stock id to select the stock item for the item.

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.        --  Name:  Accel_Group_Property

151.        --  Type:  Object

152.        --  Descr: The Accel Group to use for stock accelerator keys

153.        --

154.        --  Name:  Always_Show_Image_Property

155.        --  Type:  Boolean

156.        --  Descr: Whether the image will always be shown

157.        --

158.        --  Name:  Image_Property

159.        --  Type:  Object

160.        --  Descr: Child widget to appear next to the menu text

161.        --

162.        --  Name:  Use_Stock_Property

163.        --  Type:  Boolean

164.        --  Descr: Whether to use the label text to create a stock menu item

165.        --

166.        --  </properties>

168.        Accel_Group_Property       : constant Glib.Properties.Property_ObjectTo API docTo spec;

169.        Always_Show_Image_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

170.        Image_Property             : constant Glib.Properties.Property_ObjectTo API docTo spec;

171.        Use_Stock_Property         : constant Glib.Properties.Property_BooleanTo API docTo spec;

173.        -------------

174.        -- Signals --

175.        -------------

177.        --  <signals>

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

179.        --

180.        --  </signals>

182.     private

183.        type Gtk_Image_Menu_Item_RecordTo API docTo spec is new

184.          Gtk.Menu_Item.Gtk_Menu_Item_RecordTo API docTo specTo body with null record;

186.        Accel_Group_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

187.          Glib.Properties.BuildTo API docTo specTo body ("accel-group");

188.        Always_Show_Image_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

189.          Glib.Properties.BuildTo API docTo specTo body ("always-show-image");

190.        Image_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

191.          Glib.Properties.BuildTo API docTo specTo body ("image");

192.        Use_Stock_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

193.          Glib.Properties.BuildTo API docTo specTo body ("use-stock");

195.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_image_menu_item_get_type");

196.     end Gtk.Image_Menu_ItemTo API docTo specTo body;