Adw.ToastOverlay¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Adw.ToastOverlay(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A widget showing toasts above its content.
<picture> <source srcset=”toast-overlay-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”toast-overlay.png” alt=”toast-overlay”> </picture>
Much like [class`Gtk`.Overlay],
AdwToastOverlay
is a container with a single main child, on top of which it can display a [class`Toast`], overlaid. Toasts can be shown with [method`ToastOverlay`.add_toast].See [class`Toast`] for details.
- CSS nodes
`` toastoverlay ├── [child] ├── toast ┊ ├── widget ┊ │ ├── [label.heading]
│ ╰── [custom title] ├── [button] ╰── button.circular.flat
AdwToastOverlay
’s CSS node is calledtoastoverlay
. It contains the child, as well as zero or moretoast
subnodes.Each of the
toast
nodes contains awidget
subnode, optionally abutton
subnode, and anotherbutton
subnode with.circular
and.flat
style classes.The
widget
subnode contains alabel
subnode with the.heading
style class, or a custom widget provided by the application.- Accessibility
AdwToastOverlay
uses theGTK_ACCESSIBLE_ROLE_TAB_GROUP
role.- classmethod new()¶
- Returns:
the new created
AdwToastOverlay
- Return type:
Creates a new
AdwToastOverlay
.
- add_toast(toast)¶
- Parameters:
toast (
Adw.Toast
) – a toast
Displays toast.
Only one toast can be shown at a time; if a toast is already being displayed, either toast or the original toast will be placed in a queue, depending on the priority of toast. See [property`Toast`:py:data::priority<Adw.ToastOverlay.props.priority>].
If called on a toast that’s already displayed, its timeout will be reset.
If called on a toast currently in the queue, the toast will be bumped forward to be shown as soon as possible.
- get_child()¶
- Returns:
the child widget of self
- Return type:
Gtk.Widget
orNone
Gets the child widget of self.
- set_child(child)¶
- Parameters:
child (
Gtk.Widget
orNone
) – the child widget
Sets the child widget of self.
Property Details¶
- Adw.ToastOverlay.props.child¶
- Name:
child
- Type:
- Default Value:
- Flags:
The child widget.