Package: gtk

Accessor gtk-menu-button-menu-model

Lambda List

gtk-menu-button-menu-model (object)

Syntax

(gtk-menu-button-menu-model object) => model
(setf (gtk-menu-button-menu-model object) model)

Arguments

object -- a gtk-menu-button widget
model -- a g-menu-model object, or nil to unset and disable the button

Details

Accessor of the menu-model slot of the gtk-menu-button class.

The gtk-menu-button-menu-model slot access function returns the menu model used to generate the popup. The (setf gtk-menu-button-menu-model) slot access function sets the menu model from which the popup will be constructed, or nil to dissociate any existing menu model and disable the button.

Depending on the value of use-popover property, either a gtk-menu widget will be created with the gtk-menu-new-from-model function, or a gtk-popover widget with the gtk-popover-new-from-model function. In either case, actions will be connected as documented for these functions.

If the popup or popover properties are already set, those widgets are dissociated from the menu button, and those properties are set to nil.
 

See also

2021-12-23