adw.expander_row

Module for [ExpanderRow] class

Types 3

A [gtk.list_box_row.ListBoxRow] used to reveal widgets.

expander-row

The [adw.expander_row.ExpanderRow] 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 [adw.expander_row.ExpanderRow] implementation of the [gtk.buildable.Buildable] interface supports adding a child as an suffix widget by specifying “suffix” 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

[adw.expander_row.ExpanderRow] 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.

Methods
GType _gType() @property
ExpanderRow self()Returns `this`, for use in `with` statements.
ExpanderRowGidBuilder builder()Get builder for [adw.expander_row.ExpanderRow] Returns: New builder object
bool enableExpansion() @propertyGet `enableExpansion` property. Returns: Whether expansion is enabled.
void enableExpansion(bool propval) @propertySet `enableExpansion` property. Params: propval = Whether expansion is enabled.
bool expanded() @propertyGet `expanded` property. Returns: Whether the row is expanded.
void expanded(bool propval) @propertySet `expanded` property. Params: propval = Whether the row is expanded.
string iconName() @propertyGet `iconName` property. Returns: The icon name for this row.
void iconName(string propval) @propertySet `iconName` property. Params: propval = The icon name for this row.
bool showEnableSwitch() @propertyGet `showEnableSwitch` property. Returns: Whether the switch enabling the expansion is visible.
void showEnableSwitch(bool propval) @propertySet `showEnableSwitch` property. Params: propval = Whether the switch enabling the expansion is visible.
string subtitle() @propertyGet `subtitle` property. Returns: The subtitle for this row.
void subtitle(string propval) @propertySet `subtitle` property. Params: propval = The subtitle for this row.
int subtitleLines() @propertyGet `subtitleLines` property. Returns: The number of lines at the end of which the subtitle label will be ellipsized.
void subtitleLines(int propval) @propertySet `subtitleLines` property. Params: propval = The number of lines at the end of which the subtitle label will be ellipsized.
int titleLines() @propertyGet `titleLines` property. Returns: The number of lines at the end of which the title label will be ellipsized.
void titleLines(int propval) @propertySet `titleLines` property. Params: propval = The number of lines at the end of which the title label will be ellipsized.
void addAction(gtk.widget.Widget widget)Adds an action widget to self.
void addPrefix(gtk.widget.Widget widget)Adds a prefix widget to self.
void addRow(gtk.widget.Widget child)Adds a widget to self.
void addSuffix(gtk.widget.Widget widget)Adds an suffix widget to self.
bool getEnableExpansion()Gets whether the expansion of self is enabled. Returns: whether the expansion of self is enabled.
bool getExpanded()Gets whether self is expanded. Returns: whether self is expanded
string getIconName()Gets the icon name for self. Returns: the icon name for self
bool getShowEnableSwitch()Gets whether the switch enabling the expansion of self is visible. Returns: whether the switch enabling the expansion is visible
string getSubtitle()Gets the subtitle for self. Returns: the subtitle for self
int getSubtitleLines()Gets the number of lines at the end of which the subtitle label will be ellipsized. Returns: the number of lines at the end of which the subtitle label will be ellipsized
int getTitleLines()Gets the number of lines at the end of which the title label will be ellipsized. Returns: the number of lines at the end of which the title label will be ellipsized
void remove(gtk.widget.Widget child)Removes a child from self.
void setEnableExpansion(bool enableExpansion)Sets whether the expansion of self is enabled.
void setExpanded(bool expanded)Sets whether self is expanded.
void setIconName(string iconName = null)Sets the icon name for self.
void setShowEnableSwitch(bool showEnableSwitch)Sets whether the switch enabling the expansion of self is visible.
void setSubtitle(string subtitle)Sets the subtitle for self.
void setSubtitleLines(int subtitleLines)Sets the number of lines at the end of which the subtitle label will be ellipsized.
void setTitleLines(int titleLines)Sets the number of lines at the end of which the title label will be ellipsized.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new [adw.expanderrow.ExpanderRow]. Returns: the newly created [adw.expanderrow.ExpanderRow]
Methods
T enableExpansion(bool propval)Set `enableExpansion` property. Params: propval = Whether expansion is enabled. Returns: Builder instance for fluent chaining
T expanded(bool propval)Set `expanded` property. Params: propval = Whether the row is expanded. Returns: Builder instance for fluent chaining
T iconName(string propval)Set `iconName` property. Params: propval = The icon name for this row. Returns: Builder instance for fluent chaining
T showEnableSwitch(bool propval)Set `showEnableSwitch` property. Params: propval = Whether the switch enabling the expansion is visible. Returns: Builder instance for fluent chaining
T subtitle(string propval)Set `subtitle` property. Params: propval = The subtitle for this row.
T subtitleLines(int propval)Set `subtitleLines` property. Params: propval = The number of lines at the end of which the subtitle label will be ellipsized.
T titleLines(int propval)Set `titleLines` property. Params: propval = The number of lines at the end of which the title label will be ellipsized.

Fluent builder for [adw.expander_row.ExpanderRow]