ActionRow

A gtk.list_box_row.ListBoxRow used to present actions.

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

The adw.action_row.ActionRow widget can have a title, a subtitle and an icon. The row can receive additional widgets at its end, or prefix widgets at its start.

It is convenient to present a preference and its related actions.

adw.action_row.ActionRow is unactivatable by default, giving it an activatable widget will automatically make it activatable, but unsetting it won't change the row's activatability.

AdwActionRow as GtkBuildable

The adw.action_row.ActionRow implementation of the gtk.buildable.Buildable interface supports adding a child at its end by specifying “suffix” or omitting the “type” attribute of a <child> element.

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

CSS nodes

adw.action_row.ActionRow has a main CSS node with name row.

It contains the subnode box.header for its main horizontal box, and box.title for the vertical box containing the title and subtitle labels.

It contains subnodes label.title and label.subtitle representing respectively the title label and subtitle label.

adw.action_row.ActionRow can use the `.property` style class to emphasize the row subtitle instead of the row title, which is useful for displaying read-only properties.

Constructors

this
this()

Creates a new adw.action_row.ActionRow.

Members

Functions

activate
void activate()

Activates self.

addPrefix
void addPrefix(gtk.widget.Widget widget)

Adds a prefix widget to self.

addSuffix
void addSuffix(gtk.widget.Widget widget)

Adds a suffix widget to self.

connectActivated
ulong connectActivated(T callback, Flag!"After" after)

Connect to Activated signal.

getActivatableWidget
gtk.widget.Widget getActivatableWidget()

Gets the widget activated when self is activated.

getIconName
string getIconName()

Gets the icon name for self.

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.

getSubtitleSelectable
bool getSubtitleSelectable()

Gets whether the user can copy the subtitle from the label

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 widget)

Removes a child from self.

setActivatableWidget
void setActivatableWidget(gtk.widget.Widget widget)

Sets the widget to activate when self is activated.

setIconName
void setIconName(string iconName)

Sets the icon name for self.

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.

setSubtitleSelectable
void setSubtitleSelectable(bool subtitleSelectable)

Sets whether the user can copy the subtitle from the label

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.