Adw.ActionRow¶
- Subclasses:
Methods¶
- Inherited:
Adw.PreferencesRow (9), Gtk.ListBoxRow (12), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Actionable (5)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.ListBoxRow (1), Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9), Gtk.Actionable (4)
|
Properties¶
- Inherited:
Adw.PreferencesRow (4), Gtk.ListBoxRow (3), Gtk.Widget (34), Gtk.Accessible (1), Gtk.Actionable (2)
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
d/r/w/en |
|
||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
This signal is emitted after the row has been activated. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Adw.ActionRow(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A [class`Gtk`.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
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.The
AdwActionRow
implementation of the [iface`Gtk`.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
AdwActionRow
has a main CSS node with namerow
.It contains the subnode
box.header
for its main horizontal box, andbox.title
for the vertical box containing the title and subtitle labels.It contains subnodes
label.title
andlabel.subtitle
representing respectively the title label and subtitle label.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.- classmethod new()¶
- Returns:
the newly created
AdwActionRow
- Return type:
Creates a new
AdwActionRow
.
- activate()¶
Activates self.
- add_prefix(widget)¶
- Parameters:
widget (
Gtk.Widget
) – a widget
Adds a prefix widget to self.
- add_suffix(widget)¶
- Parameters:
widget (
Gtk.Widget
) – a widget
Adds a suffix widget to self.
- get_activatable_widget()¶
- Returns:
the activatable widget for self
- Return type:
Gtk.Widget
orNone
Gets the widget activated when self is activated.
- get_icon_name()¶
-
Gets the icon name for self.
Deprecated since version 1.3: Use [method`ActionRow`.add_prefix] to add an icon.
- get_subtitle_lines()¶
- Returns:
the number of lines at the end of which the subtitle label will be ellipsized
- Return type:
Gets the number of lines at the end of which the subtitle label will be ellipsized.
- get_subtitle_selectable()¶
- Returns:
whether the user can copy the subtitle from the label
- Return type:
Gets whether the user can copy the subtitle from the label
New in version 1.3.
- get_title_lines()¶
- Returns:
the number of lines at the end of which the title label will be ellipsized
- Return type:
Gets the number of lines at the end of which the title label will be ellipsized.
- remove(widget)¶
- Parameters:
widget (
Gtk.Widget
) – the child to be removed
Removes a child from self.
- set_activatable_widget(widget)¶
- Parameters:
widget (
Gtk.Widget
orNone
) – the target widget
Sets the widget to activate when self is activated.
The row can be activated either by clicking on it, calling [method`ActionRow`.activate], or via mnemonics in the title. See the [property`PreferencesRow`:py:data::use-underline<Adw.ActionRow.props.use_underline>] property to enable mnemonics.
The target widget will be activated by emitting the [signal`Gtk`.Widget::mnemonic-activate] signal on it.
- set_icon_name(icon_name)¶
-
Sets the icon name for self.
Deprecated since version 1.3: Use [method`ActionRow`.add_prefix] to add an icon.
- set_subtitle(subtitle)¶
- Parameters:
subtitle (
str
) – the subtitle
Sets the subtitle for self.
The subtitle is interpreted as Pango markup unless [property`PreferencesRow`:py:data::use-markup<Adw.ActionRow.props.use_markup>] is set to
FALSE
.
- set_subtitle_lines(subtitle_lines)¶
- Parameters:
subtitle_lines (
int
) – the number of lines at the end of which the subtitle label will be ellipsized
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.
- set_subtitle_selectable(subtitle_selectable)¶
- Parameters:
subtitle_selectable (
bool
) –TRUE
if the user can copy the subtitle from the label
Sets whether the user can copy the subtitle from the label
See also [property`Gtk`.Label:selectable].
New in version 1.3.
- set_title_lines(title_lines)¶
- Parameters:
title_lines (
int
) – the number of lines at the end of which the title label will be ellipsized
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.
- do_activate() virtual¶
Activates self.
Signal Details¶
- Adw.ActionRow.signals.activated(action_row)¶
- Signal Name:
activated
- Flags:
- Parameters:
action_row (
Adw.ActionRow
) – The object which received the signal
This signal is emitted after the row has been activated.
Property Details¶
- Adw.ActionRow.props.activatable_widget¶
- Name:
activatable-widget
- Type:
- Default Value:
- Flags:
The widget to activate when the row is activated.
The row can be activated either by clicking on it, calling [method`ActionRow`.activate], or via mnemonics in the title. See the [property`PreferencesRow`:py:data::use-underline<Adw.ActionRow.props.use_underline>] property to enable mnemonics.
The target widget will be activated by emitting the [signal`Gtk`.Widget::mnemonic-activate] signal on it.
- Adw.ActionRow.props.icon_name¶
- Name:
icon-name
- Type:
- Default Value:
''
- Flags:
The icon name for this row.
Deprecated since version 1.3: Use [method`ActionRow`.add_prefix] to add an icon.
- Adw.ActionRow.props.subtitle¶
- Name:
subtitle
- Type:
- Default Value:
''
- Flags:
The subtitle for this row.
The subtitle is interpreted as Pango markup unless [property`PreferencesRow`:py:data::use-markup<Adw.ActionRow.props.use_markup>] is set to
FALSE
.
- Adw.ActionRow.props.subtitle_lines¶
- Name:
subtitle-lines
- Type:
- Default Value:
0
- Flags:
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.
- Adw.ActionRow.props.subtitle_selectable¶
- Name:
subtitle-selectable
- Type:
- Default Value:
- Flags:
Whether the user can copy the subtitle from the label.
See also [property`Gtk`.Label:selectable].
New in version 1.3.
- Adw.ActionRow.props.title_lines¶
- Name:
title-lines
- Type:
- Default Value:
0
- Flags:
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.