GtkAda Reference Manual - Package Gtk.Option_Menu

[Contents] [Back] [Prev] [Up] [Next] [Forward]

# 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.

- Gtk.Option_Menu Widget Hierarchy
- Gtk.Option_Menu Subprograms

## Widget Hierarchy

    GObject                       (see section Package Glib.Object)
    Gtk_Object                    (see section Package Gtk.Object)
       \___ Gtk_Widget            (see section Package Gtk.Widget)
          \___ Gtk_Container      (see section Package Gtk.Container)
             \___ Gtk_Bin         (see section Package Gtk.Bin)
                \___ Gtk_Button   (see section Package Gtk.Button)
                   \___ Gtk_Option_Menu (see section 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.

[Contents] [Back] [Prev] [Up] [Next] [Forward]