:right-sidebar: True ApplicationWindow =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: ApplicationWindow(*args, **kwargs) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Window`, :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.ActionGroup`, :class:`~gi.repository.Gio.ActionMap`, :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget`, :class:`~gi.repository.Gtk.Native`, :class:`~gi.repository.Gtk.Root`, :class:`~gi.repository.Gtk.ShortcutManager` :Constructors: :: ApplicationWindow(**properties) new(application:Gtk.Application) -> Gtk.Widget Constructors ------------ .. rst-class:: interim-class .. class:: ApplicationWindow :no-index: .. classmethod:: new(application: ~gi.repository.Gtk.Application) -> ~gi.repository.Gtk.Widget Creates a new ``GtkApplicationWindow``. :param application: a ``GtkApplication`` Methods ------- .. rst-class:: interim-class .. class:: ApplicationWindow :no-index: .. method:: get_help_overlay() -> ~gi.repository.Gtk.ShortcutsWindow | None Gets the ``GtkShortcutsWindow`` that is associated with ``window``. See :obj:`~gi.repository.Gtk.ApplicationWindow.set_help_overlay`. .. method:: get_id() -> int Returns the unique ID of the window. If the window has not yet been added to a ``GtkApplication``, returns ``0``. .. method:: get_show_menubar() -> bool Returns whether the window will display a menubar for the app menu and menubar as needed. .. method:: set_help_overlay(help_overlay: ~gi.repository.Gtk.ShortcutsWindow | None = None) -> None Associates a shortcuts window with the application window. Additionally, sets up an action with the name ``win.show-help-overlay`` to present it. ``window`` takes responsibility for destroying ``help_overlay``. :param help_overlay: a ``GtkShortcutsWindow`` .. method:: set_show_menubar(show_menubar: bool) -> None Sets whether the window will display a menubar for the app menu and menubar as needed. :param show_menubar: whether to show a menubar when needed Properties ---------- .. rst-class:: interim-class .. class:: ApplicationWindow :no-index: .. attribute:: props.show_menubar :type: bool If this property is :const:`True`, the window will display a menubar unless it is shown by the desktop shell. See :obj:`~gi.repository.Gtk.Application.set_menubar`. If :const:`False`, the window will not display a menubar, regardless of whether the desktop shell is showing it or not. Fields ------ .. rst-class:: interim-class .. class:: ApplicationWindow :no-index: .. attribute:: parent_instance