GtkMenuItem

A widget used for holding items in menus.

Object Hierarchy

GObject
`-- GtkObject
       `-- GtkWidget
              `-- GtkContainer
                     `-- GtkBin
                            `-- GtkItem
                                   `-- GtkMenuItem

Direct Subclasses

Description

The GtkMenuItem is the fundamental building block of all menus. These widgets are responsible for holding valid children that will make up the menu. Their function is to correctly handle highlighting, alignment, events and the addition of sub-menus.

Since this widget derives itself from GtkBin, it can hold any valid child widget, although only a few may aid in the creation of menus.

Constructors

GtkMenuItem (string label]);

-- Creates a new GtkMenuItem.

Methods

get_right_justified()
  Returns whether the menu item appears justified to the right of its menu bar.
get_submenu()
  Return the submenu attached to the menu item.
remove_submenu()
  Removes the submenu associated with the menu item.
right_justify()
  DEPRECATED Sets the menu item to be right aligned.
set_right_justified()
  Aligns the menu item to the right.
set_submenu()
  Sets the submenu for the menu item.
toggle_size_allocate()
  Emits the toggle-size-allocate signal for the menu item.
set_item_accel_path()
  Sets the accelerator path for the menu item.

Signals

"activate"
  Emitted when the menu item is activated.
"activate-item"
  Emitted when the menu item is activated and has a submenu.
"toggle-size-allocate"
  Emitted when the size allocation is changed.
"toggle-size-request"
  Emitted when a size change request is made.