Class

GioMenu

Description [src]

final class Gio.Menu : Gio.MenuModel {
  /* No available fields */
}

GMenu is a simple implementation of GMenuModel. You populate a GMenu by adding GMenuItem instances to it.

There are some convenience functions to allow you to directly add items (avoiding GMenuItem) for the common cases. To add a regular item, use g_menu_insert(). To add a section, use g_menu_insert_section(). To add a submenu, use g_menu_insert_submenu().

Available since:2.32

Hierarchy

hierarchy this GMenu ancestor_0 GMenuModel ancestor_0--this ancestor_1 GObject ancestor_1--ancestor_0

Ancestors

Constructors

g_menu_new

Creates a new GMenu.

Available since: 2.32

Instance methods

g_menu_append

Convenience function for appending a normal menu item to the end of menu. Combine g_menu_item_new() and g_menu_insert_item() for a more flexible alternative.

Available since: 2.32

g_menu_append_item

Appends item to the end of menu.

Available since: 2.32

g_menu_append_section

Convenience function for appending a section menu item to the end of menu. Combine g_menu_item_new_section() and g_menu_insert_item() for a more flexible alternative.

Available since: 2.32

g_menu_append_submenu

Convenience function for appending a submenu menu item to the end of menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for a more flexible alternative.

Available since: 2.32

g_menu_freeze

Marks menu as frozen.

Available since: 2.32

g_menu_insert

Convenience function for inserting a normal menu item into menu. Combine g_menu_item_new() and g_menu_insert_item() for a more flexible alternative.

Available since: 2.32

g_menu_insert_item

Inserts item into menu.

Available since: 2.32

g_menu_insert_section

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.

Available since: 2.32

g_menu_insert_submenu

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.

Available since: 2.32

g_menu_prepend

Convenience function for prepending a normal menu item to the start of menu. Combine g_menu_item_new() and g_menu_insert_item() for a more flexible alternative.

Available since: 2.32

g_menu_prepend_item

Prepends item to the start of menu.

Available since: 2.32

g_menu_prepend_section

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.

Available since: 2.32

g_menu_prepend_submenu

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.

Available since: 2.32

g_menu_remove

Removes an item from the menu.

Available since: 2.32

g_menu_remove_all

Removes all items in the menu.

Available since: 2.38

Methods inherited from GMenuModel (8)
g_menu_model_get_item_attribute

Queries item at position item_index in model for the attribute specified by attribute.

Available since: 2.32

g_menu_model_get_item_attribute_value

Queries the item at position item_index in model for the attribute specified by attribute.

Available since: 2.32

g_menu_model_get_item_link

Queries the item at position item_index in model for the link specified by link.

Available since: 2.32

g_menu_model_get_n_items

Query the number of items in model.

Available since: 2.32

g_menu_model_is_mutable

Queries if model is mutable.

Available since: 2.32

g_menu_model_items_changed

Requests emission of the GMenuModel::items-changed signal on model.

Available since: 2.32

g_menu_model_iterate_item_attributes

Creates a GMenuAttributeIter to iterate over the attributes of the item at position item_index in model.

Available since: 2.32

g_menu_model_iterate_item_links

Creates a GMenuLinkIter to iterate over the links of the item at position item_index in model.

Available since: 2.32

Methods inherited from GObject (43)

Signals

Signals inherited from GMenuModel (1)
Gio.MenuModel::items-changed

Emitted when a change has occurred to the menu.

Signals inherited from GObject (1)