Class ExpanderRow

All Implemented Interfaces:
PointerInterface

public class ExpanderRow extends PreferencesRow
A [class@Gtk.ListBoxRow] used to reveal widgets.

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

The `AdwExpanderRow` widget allows the user to reveal or hide widgets below
it. It also allows the user to enable the expansion of the row, allowing to
disable all that the row contains.

## AdwExpanderRow as GtkBuildable

The `AdwExpanderRow` implementation of the [iface@Gtk.Buildable] interface
supports adding a child as an action widget by specifying “action” as the
“type” attribute of a <child> element.

It also supports adding it as a prefix widget by specifying “prefix” as the
“type” attribute of a <child> element.

## CSS nodes

`AdwExpanderRow` has a main CSS node with name `row` and the `.expander`
style class. It has the `.empty` style class when it contains no children.

It contains the subnodes `row.header` for its main embedded row,
`list.nested` for the list it can expand, and `image.expander-row-arrow` for
its arrow.

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

  • Constructor Details

    • ExpanderRow

      public ExpanderRow(PointerContainer pointer)
    • ExpanderRow

      public ExpanderRow()
      Creates a new `AdwExpanderRow`.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • addAction

      public void addAction(@Nonnull Widget widget)
      Adds an action widget to @self.
      Parameters:
      widget - a widget
    • addPrefix

      public void addPrefix(@Nonnull Widget widget)
      Adds a prefix widget to @self.
      Parameters:
      widget - a widget
    • addRow

      public void addRow(@Nonnull Widget child)
      Adds a widget to @self.

      The widget will appear in the expanding list below @self.
      Parameters:
      child - a widget
    • getEnableExpansion

      public boolean getEnableExpansion()
      Gets whether the expansion of @self is enabled.
      Returns:
      whether the expansion of @self is enabled.
    • getExpanded

      public boolean getExpanded()
      Gets whether @self is expanded.
      Returns:
      whether @self is expanded
    • getIconName

      public Str getIconName()
      Gets the icon name for @self.
      Returns:
      the icon name for @self
    • getShowEnableSwitch

      public boolean getShowEnableSwitch()
      Gets whether the switch enabling the expansion of @self is visible.
      Returns:
      whether the switch enabling the expansion is visible
    • getSubtitle

      public Str getSubtitle()
      Gets the subtitle for @self.
      Returns:
      the subtitle for @self
    • remove

      public void remove(@Nonnull Widget child)
      Parameters:
      child -
    • setEnableExpansion

      public void setEnableExpansion(boolean enable_expansion)
      Sets whether the expansion of @self is enabled.
      Parameters:
      enable_expansion - whether to enable the expansion
    • setExpanded

      public void setExpanded(boolean expanded)
      Sets whether @self is expanded.
      Parameters:
      expanded - whether to expand the row
    • setIconName

      public void setIconName(@Nullable Str icon_name)
      Sets the icon name for @self.
      Parameters:
      icon_name - the icon name
    • setIconName

      public void setIconName(String icon_name)
      Sets the icon name for @self.
      Parameters:
      icon_name - the icon name
    • setShowEnableSwitch

      public void setShowEnableSwitch(boolean show_enable_switch)
      Sets whether the switch enabling the expansion of @self is visible.
      Parameters:
      show_enable_switch - whether to show the switch enabling the expansion
    • setSubtitle

      public void setSubtitle(@Nonnull Str subtitle)
      Sets the subtitle for @self.

      The subtitle is interpreted as Pango markup unless
      [property@PreferencesRow:use-markup] is set to `FALSE`.
      Parameters:
      subtitle - the subtitle
    • setSubtitle

      public void setSubtitle(String subtitle)
      Sets the subtitle for @self.

      The subtitle is interpreted as Pango markup unless
      [property@PreferencesRow:use-markup] is set to `FALSE`.
      Parameters:
      subtitle - the subtitle
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Overrides:
      asAccessible in class PreferencesRow
      Returns:
      Accessible
    • asActionable

      public Actionable asActionable()
      Implements interface Actionable. Call this to get access to interface functions.
      Overrides:
      asActionable in class PreferencesRow
      Returns:
      Actionable
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Overrides:
      asBuildable in class PreferencesRow
      Returns:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Overrides:
      asConstraintTarget in class PreferencesRow
      Returns:
      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()