## 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-2007 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.     --  A Gtk_Option_Menu is a widget that allows the user to choose from a list of

32.     --  valid choices. The Gtk_Option_Menu displays the selected choice. When

33.     --  activated, the Gtk_Option_Menu displays a popup Gtk_Menu which allows the

34.     --  user to make a new choice.

35.     --  </description>

36.     --  <c_version>2.8.17</c_version>

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

39.     with Glib.PropertiesTo API docTo specTo body;

40.     with Gtk.ButtonTo API docTo specTo body;

41.     with Gtk.MenuTo API docTo specTo body;

42.     with Gtk.WidgetTo API docTo specTo body;

44.     package Gtk.Option_MenuTo API docTo specTo body is

45.        pragma Obsolescent;

47.        type Gtk_Option_Menu_RecordTo API docTo body is new Button.Gtk_Button_RecordTo API docTo spec with private;

48.        type Gtk_Option_Menu is access all Gtk_Option_Menu_RecordTo API docTo specTo body'Class;

50.        procedure Gtk_NewTo API docTo body (Option_Menu : out Gtk_Option_MenuTo API docTo spec);

51.        --  Create a new Gtk_Option_Menu.

53.        procedure InitializeTo API docTo body (Option_Menu : access Gtk_Option_Menu_RecordTo API docTo specTo body'Class);

54.        --  Internal initialization function.

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

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

58.        --  Return the internal value associated with a Gtk_Option_Menu.

60.        procedure Set_MenuTo API docTo body

61.          (Option_Menu : access Gtk_Option_Menu_RecordTo API docTo specTo body;

62.           Menu        : access Widget.Gtk_Widget_RecordTo API docTo specTo body'Class);

63.        function Get_MenuTo API docTo body

64.          (Option_Menu : access Gtk_Option_Menu_RecordTo API docTo specTo body) return Gtk.Menu.Gtk_MenuTo API docTo spec;

65.        --  Provide the Gtk_Menu that is popped up to allow the user to choose a new

66.        --  value. You should provide a simple menu avoiding the use of tearoff menu

67.        --  items, submenus, and accelerators.

69.        procedure Remove_MenuTo API docTo body

70.          (Option_Menu : access Gtk_Option_Menu_RecordTo API docTo specTo body;

71.           Menu        : access Widget.Gtk_Widget_RecordTo API docTo specTo body'Class);

72.        --  Remove the menu from the option menu.

74.        procedure Set_HistoryTo API docTo body

75.          (Option_Menu : access Gtk_Option_Menu_RecordTo API docTo specTo body; Index : GintTo API docTo spec);

76.        function Get_HistoryTo API docTo body

77.          (Option_Menu : access Gtk_Option_Menu_RecordTo API docTo specTo body) return GintTo API docTo spec;

78.        --  Select the menu item specified by index making it the newly selected

79.        --  value for the option menu.

81.        ----------------

82.        -- Properties --

83.        ----------------

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

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

87.        --  <properties>

88.        --  Name:  Menu_Property

89.        --  Type:  Object

90.        --  Descr: The menu of options

91.        --  </properties>

93.        Menu_Property : constant Glib.Properties.Property_ObjectTo API docTo spec;

95.        ----------------------

96.        -- Style Properties --

97.        ----------------------

98.        --  The following properties can be changed through the gtk theme and

99.        --  configuration files, and retrieved through Gtk.Widget.Style_Get_Property

101.        --  <style_properties>

102.        --  Name:  Indicator_Size_Property

103.        --  Type:  Boxed

104.        --  Descr: Size of dropdown indicator

105.        --

106.        --  Name:  Indicator_Spacing_Property

107.        --  Type:  Boxed

108.        --  Descr: Spacing around indicator

109.        --  </style_properties>

111.        --  Indicator_Size_Property    : constant Glib.Properties.Property_Boxed;

112.        --  Indicator_Spacing_Property : constant Glib.Properties.Property_Boxed;

114.        -------------

115.        -- Signals --

116.        -------------

118.        --  <signals>

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

120.        --

121.        --  - "changed"

122.        --    procedure Handler (Option : access Gtk_Option_Menu_Record'Class);

123.        --    Emitted when the selected value has changed

124.        --

125.        --  </signals>

127.        Signal_Changed : constant Glib.Signal_NameTo API docTo spec := "changed";

129.     private

130.        type Gtk_Option_Menu_RecordTo API docTo spec is new Button.Gtk_Button_RecordTo API docTo spec

131.          with null record;

133.        Menu_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

134.          Glib.Properties.BuildTo API docTo specTo body ("menu");

136.     --     Indicator_Size_Property : constant Glib.Properties.Property_Boxed :=

137.     --       Glib.Properties.Build ("indicator-size");

138.     --     Indicator_Spacing_Property : constant Glib.Properties.Property_Boxed :=

139.     --       Glib.Properties.Build ("indicator-spacing");

141.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_option_menu_get_type");

142.     end Gtk.Option_MenuTo API docTo specTo body;