Package: gtk

Accessor gtk-application-menubar

Lambda List

gtk-application-menubar (object)

Syntax

(gtk-application-menubar object) => menubar
(setf (gtk-application-menubar object) menubar)

Arguments

object -- a gtk-application instance
menubar -- a g-menu-model object, or nil

Details

Accessor of the menubar slot of the gtk-application class.

The gtk-application-menubar slot access function returns the menubar for windows of the application. The (setf gtk-application-menubar) slot access function sets or unsets the menubar.

This is a menubar in the traditional sense.

This can only be done in the primary instance of the application, after it has been registered. The handler for the "startup" signal is a good place to call this.

Depending on the desktop environment, this may appear at the top of each window, or at the top of the screen. In some environments, if both the application menu and the menubar are set, the application menu will be presented as if it were the first item of the menubar. Other environments treat the two as completely separate - for example, the application menu may be rendered by the desktop shell while the menubar, if set, remains in each individual window.

Use the base g-action-map interface to add actions, to respond to the user selecting these menu items.
 

See also

*2021-10-10