Learn R Programming

RGtk2 (version 2.20.1)

GtkMenuItem: GtkMenuItem

Description

The widget used for item in menus

Arguments

Methods and Functions

gtkMenuItemNew(show = TRUE) gtkMenuItemNewWithLabel(label, show = TRUE) gtkMenuItemNewWithMnemonic(label, show = TRUE) gtkMenuItemSetRightJustified(object, right.justified) gtkMenuItemGetRightJustified(object) gtkMenuItemGetLabel(object) gtkMenuItemSetLabel(object, label) gtkMenuItemGetUseUnderline(object) gtkMenuItemSetUseUnderline(object, setting) gtkMenuItemSetSubmenu(object, submenu) gtkMenuItemGetSubmenu(object) gtkMenuItemRemoveSubmenu(object) gtkMenuItemSetAccelPath(object, accel.path) gtkMenuItemGetAccelPath(object) gtkMenuItemSelect(object) gtkMenuItemDeselect(object) gtkMenuItemActivate(object) gtkMenuItemToggleSizeRequest(object, requisition) gtkMenuItemToggleSizeAllocate(object, allocation) gtkMenuItem(label, show = TRUE)

Hierarchy

GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkItem +----GtkMenuItem +----GtkCheckMenuItem +----GtkImageMenuItem +----GtkSeparatorMenuItem +----GtkTearoffMenuItem

Interfaces

GtkMenuItem implements AtkImplementorIface, GtkBuildable and GtkActivatable.

Detailed Description

The GtkMenuItem widget and the derived widgets are the only valid childs for menus. Their function is to correctly handle highlighting, alignment, events and submenus. As it derives from GtkBin it can hold any valid child widget, altough only a few are really useful.

GtkMenuItem as GtkBuildable

The GtkMenuItem implementation of the GtkBuildable interface supports adding a submenu by specifying "submenu" as the "type" attribute of a element. A UI definition fragment with submenus

Convenient Construction

gtkMenuItem is the result of collapsing the constructors of GtkMenuItem (gtkMenuItemNew, gtkMenuItemNewWithLabel, gtkMenuItemNewWithMnemonic) and accepts a subset of its arguments matching the required arguments of one of its delegate constructors.

References

http://library.gnome.org/devel//gtk/GtkMenuItem.html