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).
Handle highlighting, alignment, events and submenus. As it derives from Gtk::Bin it can hold any valid child widget, altough only a few are really useful.
For widgets that can be "activated" (buttons, menu items, etc.) this function activates them.
Activation is what happens when you press Enter on a widget during key navigation; clicking a button, selecting a menu item, etc. If widget isn't activatable, the function returns false.
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 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 set_accel_group() for this to work.
Parameters:
accel_path
Accelerator path, corresponding to this menu item's functionality, or 0 to unset the current path.
void Gtk::MenuItem::set_right_justified
(
bool
right_justified = true
)
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.)
Parameters:
right_justified
If true the menu item will appear at the far right if added to a menu bar.