This class implements the gio.action_group.ActionGroup and gio.action_map.ActionMap interfaces,
to let you add window-specific actions that will be exported by the
associated gtk.application.Application, together with its application-wide
actions. Window-specific actions are prefixed with the “win.”
prefix and application-wide actions are prefixed with the “app.”
prefix. Actions must be addressed with the prefixed name when
referring to them from a gio.menu_model.MenuModel.
The settings property@Gtk.Settings:gtk-shell-shows-app-menu and
property@Gtk.Settings:gtk-shell-shows-menubar tell GTK whether the
desktop environment is showing the application menu and menubar
models outside the application as part of the desktop shell.
For instance, on OS X, both menus will be displayed remotely;
on Windows neither will be.
If the desktop environment does not display the menubar, then
gtk.application_window.ApplicationWindow will automatically show a menubar for it.
This behaviour can be overridden with the
property@Gtk.ApplicationWindow:show-menubar property. If the
desktop environment does not display the application menu, then
it will automatically be included in the menubar or in the windows
client-side decorations.
gtk.application_window.ApplicationWindow is a gtk.window.Window subclass that integrates with gtk.application.Application.
Notably, gtk.application_window.ApplicationWindow can handle an application menubar.
This class implements the gio.action_group.ActionGroup and gio.action_map.ActionMap interfaces, to let you add window-specific actions that will be exported by the associated gtk.application.Application, together with its application-wide actions. Window-specific actions are prefixed with the “win.” prefix and application-wide actions are prefixed with the “app.” prefix. Actions must be addressed with the prefixed name when referring to them from a gio.menu_model.MenuModel.
Note that widgets that are placed inside a gtk.application_window.ApplicationWindow can also activate these actions, if they implement the gtk.actionable.Actionable interface.
The settings property@Gtk.Settings:gtk-shell-shows-app-menu and property@Gtk.Settings:gtk-shell-shows-menubar tell GTK whether the desktop environment is showing the application menu and menubar models outside the application as part of the desktop shell. For instance, on OS X, both menus will be displayed remotely; on Windows neither will be.
If the desktop environment does not display the menubar, then gtk.application_window.ApplicationWindow will automatically show a menubar for it. This behaviour can be overridden with the property@Gtk.ApplicationWindow:show-menubar property. If the desktop environment does not display the application menu, then it will automatically be included in the menubar or in the windows client-side decorations.
See gtk.popover_menu.PopoverMenu for information about the XML language used by gtk.builder.Builder for menu models.
See also: gtk.application.Application.setMenubar.
A GtkApplicationWindow with a menubar
The code sample below shows how to set up a gtk.application_window.ApplicationWindow with a menu bar defined on the gtk.application.Application: