gio.menu_item

Module for [MenuItem] class

Types 3

#GMenuItem is an opaque structure type. You must access it using the functions below.

Methods
GType _gType() @property
MenuItem self()Returns `this`, for use in `with` statements.
MenuItemGidBuilder builder()Get builder for [gio.menu_item.MenuItem] Returns: New builder object
gio.menu_item.MenuItem newFromModel(gio.menu_model.MenuModel model, int itemIndex)Creates a #GMenuItem as an exact copy of an existing menu item in a #GMenuModel.
gio.menu_item.MenuItem newSection(string label, gio.menu_model.MenuModel section)Creates a new #GMenuItem representing a section.
gio.menu_item.MenuItem newSubmenu(string label, gio.menu_model.MenuModel submenu)Creates a new #GMenuItem representing a submenu.
glib.variant.Variant getAttributeValue(string attribute, glib.variant_type.VariantType expectedType = null)Queries the named attribute on menu_item.
gio.menu_model.MenuModel getLink(string link)Queries the named link on menu_item.
void setActionAndTargetValue(string action = null, glib.variant.Variant targetValue = null)Sets or unsets the "action" and "target" attributes of menu_item.
void setAttributeValue(string attribute, glib.variant.Variant value = null)Sets or unsets an attribute on menu_item.
void setDetailedAction(string detailedAction)Sets the "action" and possibly the "target" attribute of menu_item.
void setIcon(gio.icon.Icon icon)Sets (or unsets) the icon on menu_item.
void setLabel(string label = null)Sets or unsets the "label" attribute of menu_item.
void setLink(string link, gio.menu_model.MenuModel model = null)Creates a link from menu_item to model if non-null, or unsets it.
void setSection(gio.menu_model.MenuModel section = null)Sets or unsets the "section" link of menu_item to section.
void setSubmenu(gio.menu_model.MenuModel submenu = null)Sets or unsets the "submenu" link of menu_item to submenu.
Constructors
this(void * ptr, Flag!"Take" take)
this(string label = null, string detailedAction = null)Creates a new #GMenuItem.

Fluent builder for [gio.menu_item.MenuItem]

Methods