1.60 <AdwSwitchRow>

Class: <AdwSwitchRow>

It derives from <AdwActionRow>.

A <GtkListBoxRow> used to represent two states.

The <AdwSwitchRow> widget contains a <GtkSwitch> 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 <GtkSwitch> for details.

Example of an <AdwSwitchRow> UI definition:

<object class="AdwSwitchRow">
  <property name="title" translatable="yes">Switch Row</property>
  <signal name="notify::active" handler="switch_row_notify_active_cb"/>
</object>

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

Accessibility

<AdwSwitchRow> uses the Gtk.AccessibleRole.switch role.

Properties

Property: switch-row:active self

Whether the switch row is in the "on" or "off" position.

Its value is a boolean.

Set it with (set! (switch-row:active self) value).

Procedures

Method: switch-row:get-active? self ⇒ %return
Method: get-active? self ⇒ %return

Gets whether self is in its "on" or "off" position.

self

Passed: a <AdwSwitchRow>.

a switch row

%return

Returned: a boolean.

whether self is active or not

Procedure: switch-row:new ⇒ %return

Creates a new <AdwSwitchRow>.

%return

Returned: a <GtkWidget>.

the newly created <AdwSwitchRow>

Method: switch-row:set-active self is-active
Method: set-active self is-active

Sets whether self is in its "on" or "off" position

self

Passed: a <AdwSwitchRow>.

a switch row

is-active

Passed: a boolean.

whether self should be active