Menu
GMenu
is a simple implementation of class@Gio.MenuModel. You populate a GMenu
by adding class@Gio.MenuItem instances to it.
There are some convenience functions to allow you to directly add items (avoiding class@Gio.MenuItem) for the common cases. To add a regular item, use method@Gio.Menu.insert. To add a section, use method@Gio.Menu.insert_section. To add a submenu, use method@Gio.Menu.insert_submenu.
Since
2.32
Constructors
Functions
Appends @item to the end of @menu.
Convenience function for appending a section menu item to the end of
Convenience function for appending a submenu menu item to the end of
Emitted when a change has occurred to the menu.
Queries the item at position @item_index in @model for the attribute specified by @attribute.
Queries the item at position @item_index in @model for the link specified by @link.
Inserts @item into @menu.
Convenience function for inserting a section menu item into @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for a more flexible alternative.
Convenience function for inserting a submenu menu item into @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for a more flexible alternative.
Requests emission of the #GMenuModel::items-changed signal on @model.
Creates a #GMenuAttributeIter to iterate over the attributes of the item at position @item_index in @model.
Creates a #GMenuLinkIter to iterate over the links of the item at position @item_index in @model.
Prepends @item to the start of @menu.
Convenience function for prepending a section menu item to the start of @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for a more flexible alternative.
Convenience function for prepending a submenu menu item to the start of @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for a more flexible alternative.