Sets our main struct and passes it to the parent class
Creates a new menu item with a label and a listener and a action. used for backward compatibily with DUI.
Creates a new Item associated with a "activate" delegate and with a action code and optionally accelGroup
Creates a new Item associated with a "activate" delegate
Creates a new GtkMenuItem whose child is a GtkLabel.
Creates a new GtkMenuItem.
Emitted when the item is activated.
Emitted when the item is activated, but also if the menu item has a submenu. For normal applications, the relevant signal is "activate".
See Also GtkBin for how to handle the child. GtkItem is the abstract class for all sorts of items. GtkMenuShell is always the parent of GtkMenuItem.
Emits the "deselect" signal on the given item. Behaves exactly like gtk_item_deselect.
Retrieve the accelerator path that was previously set on menu_item. See gtk_menu_item_set_accel_path() for details. Since 2.14
Gets the application set action code
Sets text on the menu_item label Since 2.16
Gets whether the menu item appears justified at the right side of the menu bar.
the main Gtk struct as a void*
Gets the submenu underneath this menu item, if any. See gtk_menu_item_set_submenu().
Checks if an underline in the text indicates the next character should be used for the mnemonic accelerator key. Since 2.16
Emits the "activate" signal on the given item
Warning gtk_menu_item_remove_submenu has been deprecated since version 2.12 and should not be used in newly-written code. gtk_menu_item_remove_submenu() is deprecated and should not be used in newly written code. Use gtk_menu_item_set_submenu() instead. Removes the widget's submenu.
Emits the "select" signal on the given item. Behaves exactly like gtk_item_select.
Set the accelerator path on menu_item, through which runtime changes of the menu item's accelerator caused by the user can be identified and saved to persistant storage (see gtk_accel_map_save() on this). To setup a default accelerator for this menu item, call gtk_accel_map_add_entry() with the same accel_path. See also gtk_accel_map_add_entry() on the specifics of accelerator paths, and gtk_menu_set_accel_path() for a more convenient variant of this function. This function is basically a convenience wrapper that handles calling gtk_widget_set_accel_path() with the appropriate accelerator group for the menu item. Note that you do need to set an accelerator on the parent menu with gtk_menu_set_accel_group() for this to work. Note that accel_path string will be stored in a GQuark. Therefore, if you pass a static string, you can save some memory by interning it first with g_intern_static_string().
Sets text on the menu_item label Since 2.16
Sets whether the menu item appears justified at the right side of a menu bar. This was traditionally done for "Help" menu items, but is now considered a bad idea. (If the widget layout is reversed for a right-to-left language like Hebrew or Arabic, right-justified-menu-items appear at the left.)
Sets or replaces the menu item's submenu, or removes it when a NULL submenu is passed.
If true, an underline in the text indicates the next character should be used for the mnemonic accelerator key. Since 2.16
Emits the "toggle_size_allocate" signal on the given item.
Emits the "toggle_size_request" signal on the given item.
the main Gtk struct
the main Gtk struct
the main Gtk struct as a void*
Emitted when the item is deselected.
Emitted when the item is selected.
Emitted when the item is toggled.
Warning gtk_item_select has been deprecated since version 2.22 and should not be used in newly-written code. Use gtk_menu_item_select() instead Emits the "select" signal on the given item.
Warning gtk_item_deselect has been deprecated since version 2.22 and should not be used in newly-written code. Use gtk_menu_item_deselect() instead Emits the "deselect" signal on the given item.
Warning gtk_item_toggle has been deprecated since version 2.22 and should not be used in newly-written code. This function will be removed in GTK+ 3 Emits the "toggle" signal on the given item.
the main Gtk struct as a void*
This is a utility function for GtkActivatable implementors. When implementing GtkActivatable you must call this when handling changes of the "related-action", and you must also use this to break references in GObject->dispose(). This function adds a reference to the currently set related action for you, it also makes sure the GtkActivatable->update() method is called when the related GtkAction properties change and registers to the action's proxy list. Note Be careful to call this before setting the local copy of the GtkAction property, since this function uses gtk_activatable_get_action() to retrieve the previous action Since 2.16
Gets the related GtkAction for activatable. Since 2.16
Gets whether this activatable should reset its layout and appearance when setting the related action or when the action changes appearance. Since 2.16
This is called to update the activatable completely, this is called internally when the "related-action" property is set or unset and by the implementing class when "use-action-appearance" changes. Since 2.16
Sets the related action on the activatable object. Note GtkActivatable implementors need to handle the "related-action" property and call gtk_activatable_do_set_related_action() when it changes. Since 2.16
Sets whether this activatable should reset its layout and appearance when setting the related action or when the action changes appearance Note GtkActivatable implementors need to handle the "use-action-appearance" property and call gtk_activatable_sync_action_properties() to update activatable if needed. Since 2.16
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 <child> element.