Window

open class Window(pointer: <Error class: unknown class><<Error class: unknown class>>)

A freeform window.

window

The AdwWindow widget is a subclass of class@Gtk.Window which has no titlebar area. Instead, class@ToolbarView can be used together with class@HeaderBar or class@Gtk.HeaderBar as follows:

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

Using property@Gtk.Window:titlebar or property@Gtk.Window:child is not supported and will result in a crash. Use property@Window:content instead.

Dialogs

AdwWindow can contain class@Dialog. Use method@Dialog.present with the window or a widget within a window to show a dialog.

Breakpoints

AdwWindow can be used with class@Breakpoint the same way as class@BreakpointBin. Refer to that widget's documentation for details.

Example:

<object class="AdwWindow">
<property name="content">
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar"/>
</child>
<property name="content">
<!-- ... -->
</property>
<child type="bottom">
<object class="GtkActionBar" id="bottom_bar">
<property name="revealed">True</property>
<property name="visible">False</property>
</object>
</child>
</object>
</property>
<child>
<object class="AdwBreakpoint">
<condition>max-width: 500px</condition>
<setter object="bottom_bar" property="visible">True</setter>
</object>
</child>
</object>

When breakpoints are used, the minimum size must be larger than the smallest UI state. AdwWindow defaults to the minimum size of 360×200 px. If that's too small, set the property@Gtk.Widget:width-request and property@Gtk.Widget:height-request properties manually.

Inheritors

Constructors

Link copied to clipboard
constructor()

Creates a new AdwWindow.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val adwWindowPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open var content: <Error class: unknown class>?

The content widget.

Link copied to clipboard

The current breakpoint.

Link copied to clipboard
open val dialogs: <Error class: unknown class>

The open dialogs.

Link copied to clipboard
open val gtkAccessiblePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val gtkBuildablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val gtkConstraintTargetPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val gtkNativePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val gtkRootPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val gtkShortcutManagerPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

The currently visible dialog

Functions

Link copied to clipboard
open fun addBreakpoint(breakpoint: Breakpoint)

Adds @breakpoint to @self.

Link copied to clipboard
open fun getContent(): <Error class: unknown class>?

Gets the content widget of @self.

Link copied to clipboard

Gets the current breakpoint.

Link copied to clipboard
open fun getDialogs(): <Error class: unknown class>

Returns a iface@Gio.ListModel that contains the open dialogs of @self.

Link copied to clipboard

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

Link copied to clipboard
open fun setContent(content: <Error class: unknown class>? = null)

Sets the content widget of @self.