1.2 <AdwActionRow>

Class: <AdwActionRow>

It derives from <AdwPreferencesRow>.

A <GtkListBoxRow> used to present actions.

The <AdwActionRow> 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.

<AdwActionRow> 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 <AdwActionRow> implementation of the <GtkBuildable> 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

<AdwActionRow> 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.

Style classes

<AdwActionRow> can use the ‘.property‘ style class to emphasize the row subtitle instead of the row title, which is useful for displaying read-only properties.

When used together with the .monospace style class, only the subtitle becomes monospace, not the title or any extra widgets.

Fields

parent-instance

Properties

Property: action-row:activatable-widget self

The widget to activate when the row is activated.

The row can be activated either by clicking on it, calling ActionRow.activate, or via mnemonics in the title. See the PreferencesRow:use-underline property to enable mnemonics.

The target widget will be activated by emitting the widget:mnemonic-activate signal on it.

Its value is a <GtkWidget>, or #f.

Set it with (set! (action-row:activatable-widget self) value).

Property: action-row:icon-name self

The icon name for this row.

Its value is a string, or #f.

Set it with (set! (action-row:icon-name self) value).

Property: action-row:subtitle self

The subtitle for this row.

The subtitle is interpreted as Pango markup unless PreferencesRow:use-markup is set to FALSE.

Its value is a string, or #f.

Set it with (set! (action-row:subtitle self) value).

Property: action-row:subtitle-lines self

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

If the value is 0, the number of lines won’t be limited.

Its value is a 32-bit integer.

Set it with (set! (action-row:subtitle-lines self) value).

Property: action-row:subtitle-selectable self

Whether the user can copy the subtitle from the label.

See also label:selectable.

Its value is a boolean.

Set it with (set! (action-row:subtitle-selectable self) value).

Property: action-row:title-lines self

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

If the value is 0, the number of lines won’t be limited.

Its value is a 32-bit integer.

Set it with (set! (action-row:title-lines self) value).

Procedures

Method: action-row:activate self
Method: activate self

Activates self.

self

Passed: a <AdwActionRow>.

an action row

Method: action-row:add-prefix self widget
Method: add-prefix self widget

Adds a prefix widget to self.

self

Passed: a <AdwActionRow>.

an action row

widget

Passed: a <GtkWidget>.

a widget

Method: action-row:add-suffix self widget
Method: add-suffix self widget

Adds a suffix widget to self.

self

Passed: a <AdwActionRow>.

an action row

widget

Passed: a <GtkWidget>.

a widget

Method: action-row:get-activatable-widget self ⇒ %return
Method: get-activatable-widget self ⇒ %return

Gets the widget activated when self is activated.

self

Passed: a <AdwActionRow>.

an action row

%return

Returned: a <GtkWidget>, or #f.

the activatable widget for self

Method: action-row:get-icon-name self ⇒ %return
Method: get-icon-name self ⇒ %return

Gets the icon name for self.

self

Passed: a <AdwActionRow>.

an action row

%return

Returned: a string, or #f.

the icon name for self

Method: action-row:get-subtitle self ⇒ %return
Method: get-subtitle self ⇒ %return

Gets the subtitle for self.

self

Passed: a <AdwActionRow>.

an action row

%return

Returned: a string, or #f.

the subtitle for self

Method: action-row:get-subtitle-lines self ⇒ %return
Method: get-subtitle-lines self ⇒ %return

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

self

Passed: a <AdwActionRow>.

an action row

%return

Returned: a 32-bit integer.

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

Method: action-row:get-subtitle-selectable? self ⇒ %return
Method: get-subtitle-selectable? self ⇒ %return

Gets whether the user can copy the subtitle from the label

self

Passed: a <AdwActionRow>.

an action row

%return

Returned: a boolean.

whether the user can copy the subtitle from the label

Method: action-row:get-title-lines self ⇒ %return
Method: get-title-lines self ⇒ %return

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

self

Passed: a <AdwActionRow>.

an action row

%return

Returned: a 32-bit integer.

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

Procedure: action-row:new ⇒ %return

Creates a new <AdwActionRow>.

%return

Returned: a <GtkWidget>.

the newly created <AdwActionRow>

Method: action-row:remove self widget
Method: remove self widget

Removes a child from self.

self

Passed: a <AdwActionRow>.

an action row

widget

Passed: a <GtkWidget>.

the child to be removed

Method: action-row:set-activatable-widget self [widget]
Method: set-activatable-widget self [widget]

Sets the widget to activate when self is activated.

The row can be activated either by clicking on it, calling ActionRow.activate, or via mnemonics in the title. See the PreferencesRow:use-underline property to enable mnemonics.

The target widget will be activated by emitting the widget:mnemonic-activate signal on it.

self

Passed: a <AdwActionRow>.

an action row

widget

Passed, or left out: a <GtkWidget>, or #f.

the target widget

Method: action-row:set-icon-name self [icon-name]
Method: set-icon-name self [icon-name]

Sets the icon name for self.

self

Passed: a <AdwActionRow>.

an action row

icon-name

Passed, or left out: a string, or #f.

the icon name

Method: action-row:set-subtitle self subtitle
Method: set-subtitle self subtitle

Sets the subtitle for self.

The subtitle is interpreted as Pango markup unless PreferencesRow:use-markup is set to FALSE.

self

Passed: a <AdwActionRow>.

an action row

subtitle

Passed: a string.

the subtitle

Method: action-row:set-subtitle-lines self subtitle-lines
Method: set-subtitle-lines self subtitle-lines

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

If the value is 0, the number of lines won’t be limited.

self

Passed: a <AdwActionRow>.

an action row

subtitle-lines

Passed: a 32-bit integer.

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

Method: action-row:set-subtitle-selectable self subtitle-selectable
Method: set-subtitle-selectable self subtitle-selectable

Sets whether the user can copy the subtitle from the label

See also label:selectable.

self

Passed: a <AdwActionRow>.

an action row

subtitle-selectable

Passed: a boolean.

TRUE if the user can copy the subtitle from the label

Method: action-row:set-title-lines self title-lines
Method: set-title-lines self title-lines

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

If the value is 0, the number of lines won’t be limited.

self

Passed: a <AdwActionRow>.

an action row

title-lines

Passed: a 32-bit integer.

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

Signals

Signal: action-row:activated

Connect a handler with (connect object action-row:activated handler). It is called as (handler self).

This signal is emitted after the row has been activated.

self

Passed: a <AdwActionRow>.

Virtual methods

Virtual method: action-row:do-activate implementor self

Activates self.

To override it in a new class, give register-type #:vfuncs `((activate . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: <AdwActionRow>, or a class that derives from it, or its GType number.

self

Passed: a <AdwActionRow>.

an action row