ExpanderRow

A gtk.list_box_row.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 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.

Constructors

this
this()

Creates a new adw.expander_row.ExpanderRow.

Members

Functions

addAction
void addAction(gtk.widget.Widget widget)

Adds an action widget to self.

addPrefix
void addPrefix(gtk.widget.Widget widget)

Adds a prefix widget to self.

addRow
void addRow(gtk.widget.Widget child)

Adds a widget to self.

addSuffix
void addSuffix(gtk.widget.Widget widget)

Adds an suffix widget to self.

getEnableExpansion
bool getEnableExpansion()

Gets whether the expansion of self is enabled.

getExpanded
bool getExpanded()

Gets whether self is expanded.

getIconName
string getIconName()

Gets the icon name for self.

getShowEnableSwitch
bool getShowEnableSwitch()

Gets whether the switch enabling the expansion of self is visible.

getSubtitle
string getSubtitle()

Gets the subtitle for self.

getSubtitleLines
int getSubtitleLines()

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

getTitleLines
int getTitleLines()

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

remove
void remove(gtk.widget.Widget child)

Removes a child from self.

setEnableExpansion
void setEnableExpansion(bool enableExpansion)

Sets whether the expansion of self is enabled.

setExpanded
void setExpanded(bool expanded)

Sets whether self is expanded.

setIconName
void setIconName(string iconName)

Sets the icon name for self.

setShowEnableSwitch
void setShowEnableSwitch(bool showEnableSwitch)

Sets whether the switch enabling the expansion of self is visible.

setSubtitle
void setSubtitle(string subtitle)

Sets the subtitle for self.

setSubtitleLines
void setSubtitleLines(int subtitleLines)

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

setTitleLines
void setTitleLines(int titleLines)

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

Inherited Members

From PreferencesRow

getTitle
string getTitle()

Gets the title of the preference represented by self.

getTitleSelectable
bool getTitleSelectable()

Gets whether the user can copy the title from the label

getUseMarkup
bool getUseMarkup()

Gets whether to use Pango markup for the title label.

getUseUnderline
bool getUseUnderline()

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

setTitle
void setTitle(string title)

Sets the title of the preference represented by self.

setTitleSelectable
void setTitleSelectable(bool titleSelectable)

Sets whether the user can copy the title from the label

setUseMarkup
void setUseMarkup(bool useMarkup)

Sets whether to use Pango markup for the title label.

setUseUnderline
void setUseUnderline(bool useUnderline)

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