SwitchRow


Object Hierarchy:

Adw.SwitchRow Adw.SwitchRow Adw.SwitchRow Adw.ActionRow Adw.ActionRow Adw.ActionRow->Adw.SwitchRow Adw.PreferencesRow Adw.PreferencesRow Adw.PreferencesRow->Adw.ActionRow Gtk.ListBoxRow Gtk.ListBoxRow Gtk.ListBoxRow->Adw.PreferencesRow Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.ListBoxRow GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Gtk.Accessible Gtk.Accessible Gtk.Accessible->Adw.SwitchRow Gtk.Accessible->Adw.ActionRow Gtk.Accessible->Adw.PreferencesRow Gtk.Accessible->Gtk.ListBoxRow Gtk.Accessible->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Adw.SwitchRow Gtk.Buildable->Adw.ActionRow Gtk.Buildable->Adw.PreferencesRow Gtk.Buildable->Gtk.ListBoxRow Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget Gtk.ConstraintTarget Gtk.ConstraintTarget->Adw.SwitchRow Gtk.ConstraintTarget->Adw.ActionRow Gtk.ConstraintTarget->Adw.PreferencesRow Gtk.ConstraintTarget->Gtk.ListBoxRow Gtk.ConstraintTarget->Gtk.Widget Gtk.Actionable Gtk.Actionable Gtk.Actionable->Adw.SwitchRow Gtk.Actionable->Adw.ActionRow Gtk.Actionable->Adw.PreferencesRow Gtk.Actionable->Gtk.ListBoxRow

Description:

[ CCode ( type_id = "adw_switch_row_get_type ()" ) ]
[ Version ( since = "1.4" ) ]
public sealed class SwitchRow : ActionRow, Accessible, Actionable, Buildable, ConstraintTarget

A [class@Gtk.

ListBoxRow] used to represent two states.

<picture> <source srcset="switch-row-dark.png" media="(prefers-color-scheme: dark)"> <img src="switch-row.png" alt="switch-row"> </picture>

The `AdwSwitchRow` widget contains a [class@Gtk.Switch] that allows the user to select between two states: "on" or "off". When activated, the row will invert its active state.

The user can control the switch by activating the row or by dragging on the switch handle.

See [class@Gtk.Switch] for details.

Example of an `AdwSwitchRow` UI definition: ```xml <object class="AdwSwitchRow"> <property name="title" translatable="yes">Switch Row</property> <signal name="notify:active" handler="switch_row_notify_active_cb"/> </object> ```

The [property@SwitchRow:active] property should be connected to in order to monitor changes to the active state.


Namespace: Adw
Package: libadwaita-1

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class Gtk.Widget