Klasse SwitchRow

Alle implementierten Schnittstellen:
PointerInterface

public class SwitchRow extends ActionRow
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.

## Accessibility

`AdwSwitchRow` uses the `GTK_ACCESSIBLE_ROLE_SWITCH` role.

https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.SwitchRow.html

  • Konstruktordetails

    • SwitchRow

      public SwitchRow(PointerContainer pointer)
    • SwitchRow

      public SwitchRow()
      Creates a new `AdwSwitchRow`.
  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getActive

      public boolean getActive()
      Gets whether @self is in its "on" or "off" position.
      Gibt zurück:
      whether @self is active or not
    • setActive

      public void setActive(boolean is_active)
      Sets whether @self is in its "on" or "off" position
      Parameter:
      is_active - whether @self should be active
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Setzt außer Kraft:
      asAccessible in Klasse ActionRow
      Gibt zurück:
      Accessible
    • asActionable

      public Actionable asActionable()
      Implements interface Actionable. Call this to get access to interface functions.
      Setzt außer Kraft:
      asActionable in Klasse ActionRow
      Gibt zurück:
      Actionable
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Setzt außer Kraft:
      asBuildable in Klasse ActionRow
      Gibt zurück:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Setzt außer Kraft:
      asConstraintTarget in Klasse ActionRow
      Gibt zurück:
      ConstraintTarget
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()