ApplicationWindow

A freeform application window.

<picture> <source srcset="application-window-dark.png" media="(prefers-color-scheme: dark)"> <img src="application-window.png" alt="application-window"> </picture>

adw.application_window.ApplicationWindow is a gtk.application_window.ApplicationWindow subclass providing the same features as class@Window.

See class@Window for details.

Example of an adw.application_window.ApplicationWindow UI definition:

<object class="AdwApplicationWindow">
  <property name="content">
    <object class="AdwToolbarView">
      <child type="top">
        <object class="AdwHeaderBar"/>
      </child>
      <property name="content">
        <!-- ... -->
      </property>
    </object>
  </property>
</object>

Using gtk.application.Application.Gio.MenuModel is not supported and may result in visual glitches.

Constructors

this
this(gtk.application.Application app)

Creates a new adw.application_window.ApplicationWindow for app.

Members

Functions

addBreakpoint
void addBreakpoint(adw.breakpoint.Breakpoint breakpoint)

Adds breakpoint to self.

getContent
gtk.widget.Widget getContent()

Gets the content widget of self.

getCurrentBreakpoint
adw.breakpoint.Breakpoint getCurrentBreakpoint()

Gets the current breakpoint.

getDialogs
gio.list_model.ListModel getDialogs()

Returns a gio.list_model.ListModel that contains the open dialogs of self.

getVisibleDialog
adw.dialog.Dialog getVisibleDialog()

Returns the currently visible dialog in self, if there's one.

setContent
void setContent(gtk.widget.Widget content)

Sets the content widget of self.

Inherited Members

From ApplicationWindow

getHelpOverlay
gtk.shortcuts_window.ShortcutsWindow getHelpOverlay()

Gets the gtk.shortcuts_window.ShortcutsWindow that is associated with window.

getId
uint getId()

Returns the unique ID of the window.

getShowMenubar
bool getShowMenubar()

Returns whether the window will display a menubar for the app menu and menubar as needed.

setHelpOverlay
void setHelpOverlay(gtk.shortcuts_window.ShortcutsWindow helpOverlay)

Associates a shortcuts window with the application window.

setShowMenubar
void setShowMenubar(bool showMenubar)

Sets whether the window will display a menubar for the app menu and menubar as needed.