A drop-down menu consisting of Gtk::MenuItem objects which can be navigated and activated by the user to perform application functions.
Menus are normally placed inside a Gtk::MenuBar or another MenuItem as a sub menu. A Menu can also be popped up, for instance as a right-click context menu, by calling the popup() method. See also Gtk::OptionMenu.
Displays a menu and makes it available for selection.
Applications can use this function to display context-sensitive menus. The default menu positioning function will position the menu at the current pointer position.
Parameters:
button
The button which was pressed to initiate the event.
Displays a menu and makes it available for selection.
Applications can use this function to display context-sensitive menus, and will typically supply 0 for the parent_menu_shell , parent_menu_item , func and data parameters. The default menu positioning function will position the menu at the current mouse cursor position.
The button parameter should be the mouse button pressed to initiate the menu popup. If the menu popup was initiated by something other than a mouse button press, such as a mouse button release or a keypress, button should be 0.
The activate_time parameter should be the time stamp of the event that initiated the popup. If such an event is not available, use gtk_get_current_event_time() instead.
Parameters:
parent_menu_shell
The menu shell containing the triggering menu item, or 0.
parent_menu_item
The menu item whose activation triggered the popup, or 0.
func
A user supplied function used to position the menu, or 0.
data
User supplied data to be passed to func .
button
The mouse button which was pressed to initiate the event.
Sets an accelerator path for this menu from which accelerator paths for its immediate children, its menu items, can be constructed.
The main purpose of this function is to spare the programmer the inconvenience of having to call Gtk::MenuItem::set_accel_path() on each menu item that should support runtime user changable accelerators. Instead, by just calling set_accel_path() on their parent, each menu item of this menu, that contains a label describing its purpose, automatically gets an accel path assigned. For example, a menu containing menu items "New" and "Exit", will, after gtk_menu_set_accel_path (menu, "<Gnumeric-Sheet>/File"); has been called, assign its items the accel paths: "<Gnumeric-Sheet>/File/New" and "<Gnumeric-Sheet>/File/Exit". Assigning accel paths to menu items then enables the user to change their accelerators at runtime. More details about accelerator paths and their default setups can be found at gtk_accel_map_add_entry().