adw.window
Module for [Window] class
Types 3
A freeform window.
The [adw.window.Window] widget is a subclass of [gtk.window.Window] which has no titlebar area. Instead, class@ToolbarView can be used together with class@HeaderBar or [gtk.header_bar.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 [gtk.window.Window.titlebar] or [gtk.window.Window.child] is not supported and will result in a crash. Use property@Window:content instead.
Dialogs
[adw.window.Window] can contain class@Dialog. Use [adw.dialog.Dialog.present] with the window or a widget within a window to show a dialog.
Breakpoints
[adw.window.Window] 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="width-request">360</property>
<property name="height-request">200</property>
<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>Like [adw.breakpoint_bin.BreakpointBin], if breakpoints are used, [adw.window.Window] doesn't have a minimum size, and property@Gtk.Widget:width-request and property@Gtk.Widget:height-request properties must be set manually.
WindowGidBuilder builder()Get builder for [adw.window.Window] Returns: New builder objectvoid content(gtk.widget.Widget propval) @propertySet `content` property. Params: propval = The content widget.adw.breakpoint.Breakpoint currentBreakpoint() @propertyGet `currentBreakpoint` property. Returns: The current breakpoint.adw.dialog.Dialog visibleDialog() @propertyGet `visibleDialog` property. Returns: The currently visible dialogvoid addBreakpoint(adw.breakpoint.Breakpoint breakpoint)Adds breakpoint to self.gtk.widget.Widget getContent()Gets the content widget of self.adw.breakpoint.Breakpoint getCurrentBreakpoint()Gets the current breakpoint. Returns: the current breakpointgio.list_model.ListModel getDialogs()Returns a [gio.list_model.ListModel] that contains the open dialogs of self.adw.dialog.Dialog getVisibleDialog()Returns the currently visible dialog in self, if there's one. Returns: the visible dialogvoid setContent(gtk.widget.Widget content = null)Sets the content widget of self.T content(gtk.widget.Widget propval)Set `content` property. Params: propval = The content widget.