Package: gtk

Class gtk-menu-shell

Superclasses

gtk-container, gtk-widget, gtk-buildable, g-object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

Direct Slots

take-focus
The take-focus property of type :boolean (Read / Write)
Determines whether the menu and its submenus grab the keyboard focus.
Default value: true

Details

The gtk-menu-shell class is the abstract base class used to derive the gtk-menu and gtk-menu-bar subclasses.

A gtk-menu-shell widget is a container of gtk-menu-item widgets arranged in a list which can be navigated, selected, and activated by the user to perform application functions. A gtk-menu-item widget can have a submenu associated with it, allowing for nested hierarchical menus.

Terminology
A menu item can be "selected", this means that it is displayed in the prelight state, and if it has a submenu, that submenu will be popped up.

A menu is "active" when it is visible onscreen and the user is selecting from it. A menubar is not active until the user clicks on one of its menuitems. When a menu is active, passing the mouse over a submenu will pop it up.

There is also a concept of the current menu and a current menu item. The current menu item is the selected menu item that is furthest down in the hierarchy. Every active menu shell does not necessarily contain a selected menu item, but if it does, then the parent menu shell must also contain a selected menu item. The current menu is the menu that contains the current menu item. It will always have a GTK grab and receive all key presses.

Signal Details

The "activate-current" signal
 lambda (menushell force-hide)    :action      
An action signal that activates the current menu item within the menu shell.
menushell
The gtk-menu-shell widget which received the signal.
force-hide
If true, hide the menu after activating the menu item.
The "cancel" signal
 lambda (menushell)    :action      
An action signal which cancels the selection within the menu shell. Causes the "selection-done" signal to be emitted.
menushell
The gtk-menu-shell widget which received the signal.
The "cycle-focus" signal
 lambda (menushell direction)    :action      
A keybinding signal which moves the focus in the given direction.
menushell
The gtk-menu-shell widget which received the signal.
direction
The value of the gtk-direction-type enumeration to cycle in.
The "deactivate" signal
 lambda (menushell)    :run-first      
The signal is emitted when a menu shell is deactivated.
menushell
The gtk-menu-shell widget which received the signal.
The "insert" signal
 lambda (menushell child position)    :run-first      
The signal is emitted when a new menu item is added to a gtk-menu-shell widget. A separate signal is used instead of the "GtkContainer::add" signal because of the need for an additional position parameter. The inverse of this signal is the "GtkContainer::removed" signal.
menushell
The gtk-menu-shell widget on which the signal is emitted.
child
The gtk-menu-item widget that is being inserted.
position
An integer with the position at which the insert occurs.
The "move-current" signal
 lambda (menushell direction)    :action      
An keybinding signal which moves the current menu item in the direction specified by direction.
menushell
The gtk-menu-shell widget which received the signal.
direction
The value of the gtk-direction-type enumeration to move.
The "move-selected" signal
 lambda (menushell distance)    :run-last      
The signal is emitted to move the selection to another item.
menushell
The gtk-menu-shell widget on which the signal is emitted.
distance
+1 to move to the next item, -1 to move to the previous.
Returns
True to stop the signal emission, false to continue.
The "selection-done" signal
 lambda (menushell)    :run-first      
The signal is emitted when a selection has been completed within a menu shell.
menushell
The gtk-menu-shell widget which received the signal.
 

Slot Access Functions

Inherited Slot Access Functions

See also

2021-7-17