:right-sidebar: True ApplicationWindow =================================================================== .. currentmodule:: gi.repository.Adw .. class:: ApplicationWindow(*args, **kwargs) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.ApplicationWindow`, :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` A freeform application window. .. image:: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/application-window.png ``AdwApplicationWindow`` is a :obj:`~gi.repository.Gtk.ApplicationWindow` subclass providing the same features as :obj:`~gi.repository.Adw.Window`. See :obj:`~gi.repository.Adw.Window` for details. Example of an ``AdwApplicationWindow`` UI definition: .. code-block:: :dedent: Using :obj:`~gi.repository.Gtk.Application.props.menubar` is not supported and may result in visual glitches. Constructors ------------ .. rst-class:: interim-class .. class:: ApplicationWindow :no-index: .. classmethod:: new(app: ~gi.repository.Gtk.Application) -> ~gi.repository.Gtk.Widget Creates a new ``AdwApplicationWindow`` for ``app``. :param app: an application instance Methods ------- .. rst-class:: interim-class .. class:: ApplicationWindow :no-index: .. method:: add_breakpoint(breakpoint: ~gi.repository.Adw.Breakpoint) -> None Adds ``breakpoint`` to ``self``. .. versionadded:: 1.4 :param breakpoint: the breakpoint to add .. method:: get_content() -> ~gi.repository.Gtk.Widget | None Gets the content widget of ``self``. This method should always be used instead of :obj:`~gi.repository.Gtk.Window.get_child`. .. method:: get_current_breakpoint() -> ~gi.repository.Adw.Breakpoint | None Gets the current breakpoint. .. versionadded:: 1.4 .. method:: get_dialogs() -> ~gi.repository.Gio.ListModel Returns a :obj:`~gi.repository.Gio.ListModel` that contains the open dialogs of ``self``. This can be used to keep an up-to-date view. .. versionadded:: 1.5 .. method:: get_visible_dialog() -> ~gi.repository.Adw.Dialog | None Returns the currently visible dialog in ``self``, if there's one. .. versionadded:: 1.5 .. method:: set_content(content: ~gi.repository.Gtk.Widget | None = None) -> None Sets the content widget of ``self``. This method should always be used instead of :obj:`~gi.repository.Gtk.Window.set_child`. :param content: the content widget Properties ---------- .. rst-class:: interim-class .. class:: ApplicationWindow :no-index: .. attribute:: props.content :type: ~gi.repository.Gtk.Widget The content widget. This property should always be used instead of :obj:`~gi.repository.Gtk.Window.props.child`. .. attribute:: props.current_breakpoint :type: ~gi.repository.Adw.Breakpoint The current breakpoint. .. versionadded:: 1.4 .. attribute:: props.dialogs :type: ~gi.repository.Gio.ListModel The open dialogs. .. versionadded:: 1.5 .. attribute:: props.visible_dialog :type: ~gi.repository.Adw.Dialog The currently visible dialog .. versionadded:: 1.5 Fields ------ .. rst-class:: interim-class .. class:: ApplicationWindow :no-index: .. attribute:: parent_instance