Next: , Previous: Package_Gtk.Old_Editable, Up: Top



Package Gtk.Option_Menu

A Gtk_Option_Menu is a widget that allows the user to choose from a list of valid choices. The Gtk_Option_Menu displays the selected choice. When activated, the Gtk_Option_Menu displays a popup Gtk_Menu which allows the user to make a new choice.

Widget Hierarchy
     GObject                       (see Package_Glib.Object)
     Gtk_Object                    (see Package_Gtk.Object)
        \___ Gtk_Widget            (see Package_Gtk.Widget)
           \___ Gtk_Container      (see Package_Gtk.Container)
              \___ Gtk_Bin         (see Package_Gtk.Bin)
                 \___ Gtk_Button   (see Package_Gtk.Button)
                    \___ Gtk_Option_Menu (see Package_Gtk.Option_Menu)
     

Subprograms
procedure Gtk_New (Option_Menu : out Gtk_Option_Menu);
Create a new Gtk_Option_Menu.

function Get_Type return Glib.GType;
Return the internal value associated with a Gtk_Option_Menu.

function Get_Menu (Option_Menu : access Gtk_Option_Menu_Record) return Gtk.Menu.Gtk_Menu;
Return the Gtk_Menu associated with the Gtk_Option_Menu.

procedure Set_Menu (Option_Menu : access Gtk_Option_Menu_Record; Menu : access Widget.Gtk_Widget_Record'Class);
Provide the Gtk_Menu that is popped up to allow the user to choose a new
value. You should provide a simple menu avoiding the use of tearoff menu items, submenus, and accelerators.

procedure Remove_Menu (Option_Menu : access Gtk_Option_Menu_Record; Menu : access Widget.Gtk_Widget_Record'Class);
Remove the menu from the option menu.

function Get_History (Option_Menu : access Gtk_Option_Menu_Record) return Gint;
Return the index corresponding to the menu item selected.

procedure Set_History (Option_Menu : access Gtk_Option_Menu_Record; Index : Gint);
Select the menu item specified by index making it the newly selected
value for the option menu.