Class

AdwSwitchRow

Description [src]

final class Adw.SwitchRow : Adw.ActionRow {
  /* No available fields */
}

A GtkListBoxRow used to represent two states.

switch-row

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 AdwSwitchRow:active property should be connected to in order to monitor changes to the active state.

Available since:1.4

Ancestors

Implements

  • GtkAccessible
  • GtkActionable
  • GtkBuildable
  • GtkConstraintTarget

Constructors

adw_switch_row_new

Creates a new AdwSwitchRow.

Available since: 1.4

Instance methods

adw_switch_row_get_active

Gets whether self is in its “on” or “off” position.

Available since: 1.4

adw_switch_row_set_active

Sets whether self is in its “on” or “off” position.

Available since: 1.4

Methods inherited from AdwActionRow (16)
adw_action_row_activate

Activates self.

adw_action_row_add_prefix

Adds a prefix widget to self.

adw_action_row_add_suffix

Adds a suffix widget to self.

adw_action_row_get_activatable_widget

Gets the widget activated when self is activated.

adw_action_row_get_icon_name

Gets the icon name for self.

Deprecated since: 1.3

adw_action_row_get_subtitle

Gets the subtitle for self.

adw_action_row_get_subtitle_lines

Gets the number of lines at the end of which the subtitle label will be ellipsized.

adw_action_row_get_subtitle_selectable

Gets whether the user can copy the subtitle from the label.

Available since: 1.3

adw_action_row_get_title_lines

Gets the number of lines at the end of which the title label will be ellipsized.

adw_action_row_remove

Removes a child from self.

adw_action_row_set_activatable_widget

Sets the widget to activate when self is activated.

adw_action_row_set_icon_name

Sets the icon name for self.

Deprecated since: 1.3

adw_action_row_set_subtitle

Sets the subtitle for self.

adw_action_row_set_subtitle_lines

Sets the number of lines at the end of which the subtitle label will be ellipsized.

adw_action_row_set_subtitle_selectable

Sets whether the user can copy the subtitle from the label.

Available since: 1.3

adw_action_row_set_title_lines

Sets the number of lines at the end of which the title label will be ellipsized.

Methods inherited from AdwPreferencesRow (8)
adw_preferences_row_get_title

Gets the title of the preference represented by self.

adw_preferences_row_get_title_selectable

Gets whether the user can copy the title from the label.

Available since: 1.1

adw_preferences_row_get_use_markup

Gets whether to use Pango markup for the title label.

Available since: 1.2

adw_preferences_row_get_use_underline

Gets whether an embedded underline in the title indicates a mnemonic.

adw_preferences_row_set_title

Sets the title of the preference represented by self.

adw_preferences_row_set_title_selectable

Sets whether the user can copy the title from the label.

Available since: 1.1

adw_preferences_row_set_use_markup

Sets whether to use Pango markup for the title label.

Available since: 1.2

adw_preferences_row_set_use_underline

Sets whether an embedded underline in the title indicates a mnemonic.

Properties

Adw.SwitchRow:active

Whether the switch row is in the “on” or “off” position.

Available since: 1.4

Properties inherited from AdwActionRow (6)
Adw.ActionRow:activatable-widget

The widget to activate when the row is activated.

Adw.ActionRow:icon-name

The icon name for this row.

Deprecated since: 1.3

Adw.ActionRow:subtitle

The subtitle for this row.

Adw.ActionRow:subtitle-lines

The number of lines at the end of which the subtitle label will be ellipsized.

Adw.ActionRow:subtitle-selectable

Whether the user can copy the subtitle from the label.

Available since: 1.3

Adw.ActionRow:title-lines

The number of lines at the end of which the title label will be ellipsized.

Properties inherited from AdwPreferencesRow (4)
Adw.PreferencesRow:title

The title of the preference represented by this row.

Adw.PreferencesRow:title-selectable

Whether the user can copy the title from the label.

Available since: 1.1

Adw.PreferencesRow:use-markup

Whether to use Pango markup for the title label.

Available since: 1.2

Adw.PreferencesRow:use-underline

Whether an embedded underline in the title indicates a mnemonic.

Class structure

struct AdwSwitchRowClass {
  AdwActionRowClass parent_class;
  
}
Class members
parent_class
AdwActionRowClass
  No description available.