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



Package Gtk.Menu_Shell

This widget is a base class for all menu widgets. It contains a list of items that can be navigated, selected and activated by the user. It can not be instantiated directly.

A menu is considered "active" when it is displayed on the screen, or, in the case of a menu_bar when one of its menus is active.

An item is "selected" if it is displayed in a prelight state and its submenu (if any) displayed.

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_Menu_Shell  (see Package_Gtk.Menu_Shell)
     

Signals

Subprograms
function Get_Type return Gtk.Gtk_Type;
Return the internal value associated with a Gtk_Menu_Shell.

procedure Append (Menu_Shell : access Gtk_Menu_Shell_Record; Child : access Gtk_Menu_Item_Record'Class);
Add a new item at the end of the menu.

procedure Prepend (Menu_Shell : access Gtk_Menu_Shell_Record; Child : access Gtk_Menu_Item_Record'Class);
Add a new item at the beginning of the menu

procedure Insert (Menu_Shell : access Gtk_Menu_Shell_Record; Child : access Gtk_Menu_Item_Record'Class; Position : Gint);
Add a new item at a specific position in the menu.
The first item is at position 0. To insert as the last item in the menu, set Position to -1.

Signals emission


procedure Deactivate (Menu_Shell : access Gtk_Menu_Shell_Record);
Emit the "deactivate" signal.
This deselects the selected item, ungrabs the mouse and keyboard, and erase the Menu_Shell from the screen.

procedure Select_Item (Menu_Shell : access Gtk_Menu_Shell_Record; Item : access Gtk_Menu_Item_Record'Class);
Select a new item in the menu, after deselecting the current item.

procedure Deselect (Menu_Shell : access Gtk_Menu_Shell_Record);
Deselect the currently selected item.

procedure Activate_Item (Menu_Shell : access Gtk_Menu_Shell_Record; Item : access Gtk_Menu_Item_Record'Class; Force_Deactivate : Boolean);
Activate the item.
If Force_Deactivate is True or the menu_shell sets this property, Menu_Shell and all its parent menus are deactivated and erased from the screen.