Adw.ApplicationWindow¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.ApplicationWindow (6), Gtk.Window (62), Gtk.Widget (183), GObject.Object (37), Gtk.Accessible (17), Gtk.Buildable (1), Gtk.Native (6), Gtk.Root (3), Gio.ActionGroup (14), Gio.ActionMap (5)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r |
|||
r |
|||
r |
Signals¶
- Inherited:
Gtk.Window (5), Gtk.Widget (13), GObject.Object (1), Gio.ActionGroup (4)
Fields¶
- Inherited:
Gtk.Window (5), Gtk.Widget (13), GObject.Object (1), Gio.ActionGroup (4)
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Adw.ApplicationWindow(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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>
AdwApplicationWindow
is a [class`Gtk`.ApplicationWindow] subclass providing the same features as [class`Window`].See [class`Window`] for details.
Example of an
AdwApplicationWindow
UI definition:``xml <object class=”AdwApplicationWindow”>
- <property name=”content”>
- <object class=”AdwToolbarView”>
- <child type=”top”>
<object class=”AdwHeaderBar”/>
</child> <property name=”content”>
<!– … –>
</property>
</object>
</property>
</object> ``
Using [property`Gtk`.Application:menubar] is not supported and may result in visual glitches.
- classmethod new(app)¶
- Parameters:
app (
Gtk.Application
) – an application instance- Returns:
the newly created
AdwApplicationWindow
- Return type:
Creates a new
AdwApplicationWindow
for app.
- add_breakpoint(breakpoint)¶
- Parameters:
breakpoint (
Adw.Breakpoint
) – the breakpoint to add
Adds breakpoint to self.
New in version 1.4.
- get_adaptive_preview()¶
- Returns:
whether adaptive preview is open.
- Return type:
Gets whether adaptive preview for self is currently open.
New in version 1.7.
- get_content()¶
- Returns:
the content widget of self
- Return type:
Gtk.Widget
orNone
Gets the content widget of self.
This method should always be used instead of [method`Gtk`.Window.get_child].
- get_current_breakpoint()¶
- Returns:
the current breakpoint
- Return type:
Gets the current breakpoint.
New in version 1.4.
- get_dialogs()¶
- Returns:
a list model for the dialogs of self
- Return type:
Returns a [iface`Gio`.ListModel] that contains the open dialogs of self.
This can be used to keep an up-to-date view.
New in version 1.5.
- get_visible_dialog()¶
- Returns:
the visible dialog
- Return type:
Adw.Dialog
orNone
Returns the currently visible dialog in self, if there’s one.
New in version 1.5.
- set_adaptive_preview(adaptive_preview)¶
- Parameters:
adaptive_preview (
bool
) – whether to open adaptive preview
Sets whether adaptive preview for self is currently open.
Adaptive preview is a debugging tool used for testing the window contents at specific screen sizes, simulating mobile environment.
Adaptive preview can always be accessed from inspector. This function allows applications to open it manually.
Most applications should not use this function.
New in version 1.7.
- set_content(content)¶
- Parameters:
content (
Gtk.Widget
orNone
) – the content widget
Sets the content widget of self.
This method should always be used instead of [method`Gtk`.Window.set_child].
Property Details¶
- Adw.ApplicationWindow.props.adaptive_preview¶
- Name:
adaptive-preview
- Type:
- Default Value:
- Flags:
Whether adaptive preview is currently open.
Adaptive preview is a debugging tool used for testing the window contents at specific screen sizes, simulating mobile environment.
Adaptive preview can always be accessed from inspector. This function allows applications to open it manually.
Most applications should not use this property.
New in version 1.7.
- Adw.ApplicationWindow.props.content¶
- Name:
content
- Type:
- Default Value:
- Flags:
The content widget.
This property should always be used instead of [property`Gtk`.Window:child].
- Adw.ApplicationWindow.props.current_breakpoint¶
- Name:
current-breakpoint
- Type:
- Default Value:
- Flags:
The current breakpoint.
New in version 1.4.
- Adw.ApplicationWindow.props.dialogs¶
- Name:
dialogs
- Type:
- Default Value:
- Flags:
The open dialogs.
New in version 1.5.
- Adw.ApplicationWindow.props.visible_dialog¶
- Name:
visible-dialog
- Type:
- Default Value:
- Flags:
The currently visible dialog
New in version 1.5.