ToastOverlay


Object Hierarchy:

Adw.ToastOverlay Adw.ToastOverlay Adw.ToastOverlay Gtk.Widget Gtk.Widget Gtk.Widget->Adw.ToastOverlay GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Gtk.Accessible Gtk.Accessible Gtk.Accessible->Adw.ToastOverlay Gtk.Accessible->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Adw.ToastOverlay Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget Gtk.ConstraintTarget Gtk.ConstraintTarget->Adw.ToastOverlay Gtk.ConstraintTarget->Gtk.Widget

Description:

[ CCode ( type_id = "adw_toast_overlay_get_type ()" ) ]
public sealed class ToastOverlay : Widget, Accessible, Buildable, ConstraintTarget

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 called `toastoverlay`. It contains the child, as well as zero or more `toast` subnodes.

Each of the `toast` nodes contains a `widget` subnode, optionally a `button` subnode, and another `button` subnode with `.circular` and `.flat` style classes.

The `widget` subnode contains a `label` subnode with the `.heading` style class, or a custom widget provided by the application.

Accessibility

`AdwToastOverlay` uses the `GTK_ACCESSIBLE_ROLE_TAB_GROUP` role.


Namespace: Adw
Package: libadwaita-1

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class Gtk.Widget