ToastOverlay

class ToastOverlay(val adwToastOverlayPointer: <Error class: unknown class><<Error class: unknown class>>)(source)

A widget showing toasts above its content.

toast-overlay

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.

Constructors

Link copied to clipboard
constructor()

Creates a new AdwToastOverlay.

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

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val adwToastOverlayPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
var child: <Error class: unknown class>?

The child widget.

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>>

Functions

Link copied to clipboard
fun addToast(toast: Toast)

Displays @toast.