Handy.ActionRow¶
- Subclasses:
Methods¶
- Inherited:
Handy.PreferencesRow (5), Gtk.ListBoxRow (10), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Actionable (5)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.ListBoxRow (1), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.Actionable (4)
|
Properties¶
- Inherited:
Handy.PreferencesRow (2), Gtk.ListBoxRow (2), Gtk.Container (3), Gtk.Widget (39), Gtk.Actionable (2)
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
The widget to be activated when the row is activated |
||
r/w/en |
Icon name |
||
r/w/en |
Subtitle |
||
r/w/en |
The desired number of subtitle lines |
||
r/w/en |
The desired number of title lines |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Gtk.ListBoxRow (1), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Short Description |
|---|---|
This signal is emitted after the row has been activated. |
Fields¶
- Inherited:
Gtk.ListBoxRow (1), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Handy.ActionRow(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A [class`Gtk`.ListBoxRow] used to present actions.
The
HdyActionRowwidget 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.
HdyActionRowis unactivatable by default, giving it an activatable widget will automatically make it activatable, but unsetting it won’t change the row’s activatability.The
HdyActionRowimplementation 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
HdyActionRowhas a main CSS node with namerow.It contains the subnode
box.headerfor its main horizontal box, andbox.titlefor the vertical box containing the title and subtitle labels.It contains subnodes
label.titleandlabel.subtitlerepresenting respectively the title label and subtitle label.Added in version 1.0.
- classmethod new()¶
- Returns:
the newly created
HdyActionRow- Return type:
Creates a new
HdyActionRow.Added in version 1.0.
- activate()¶
Activates self.
Added in version 1.0.
- add_prefix(widget)¶
- Parameters:
widget (
Gtk.Widget) – the prefix widget
Adds a prefix widget to self.
Added in version 1.0.
- get_activatable_widget()¶
- Returns:
the activatable widget for self
- Return type:
Gtk.WidgetorNone
Gets the widget activated when self is activated.
Added in version 1.0.
- get_icon_name()¶
- Returns:
the icon name for self
- Return type:
Gets the icon name for self.
Added in version 1.0.
- get_subtitle()¶
-
Gets the subtitle for self.
Added in version 1.0.
- 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.
If the value is 0, the number of lines won’t be limited.
Added in version 1.2.
- 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.
If the value is 0, the number of lines won’t be limited.
Added in version 1.2.
- get_use_underline()¶
- Returns:
whether an embedded underline in the title or subtitle indicates a mnemonic
- Return type:
Gets whether an embedded underline in the title or subtitle indicates a mnemonic.
Added in version 1.0.
- set_activatable_widget(widget)¶
- Parameters:
widget (
Gtk.WidgetorNone) – the target widget
Sets the widget to activate when self is activated.
Added in version 1.0.
- set_icon_name(icon_name)¶
- Parameters:
icon_name (
str) – the icon name
Sets the icon name for self.
Added in version 1.0.
- set_subtitle(subtitle)¶
-
Sets the subtitle for self.
Added in version 1.0.
- 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.
Added in version 1.2.
- 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.
Added in version 1.2.
- set_use_underline(use_underline)¶
- Parameters:
use_underline (
bool) –TRUEif underlines in the text indicate mnemonics
Sets whether an embedded underline in the title or subtitle indicates a mnemonic.
Added in version 1.0.
- do_activate() virtual¶
Activates self.
Added in version 1.0.
Signal Details¶
- Handy.ActionRow.signals.activated(action_row)¶
- Signal Name:
activated- Flags:
- Parameters:
action_row (
Handy.ActionRow) – The object which received the signal
This signal is emitted after the row has been activated.
Added in version 1.0.
Property Details¶
- Handy.ActionRow.props.activatable_widget¶
- Name:
activatable-widget- Type:
- Default Value:
- Flags:
The activatable widget for this row.
The widget is activated, either by clicking on it, by calling [method`ActionRow`.activate], or via mnemonics in the title or the subtitle. See the [property`ActionRow`:py:data::use-underline<Handy.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.
Added in version 1.0.
- Handy.ActionRow.props.icon_name¶
- Name:
icon-name- Type:
- Default Value:
''- Flags:
The icon name for this row.
Added in version 1.0.
- Handy.ActionRow.props.subtitle¶
- Name:
subtitle- Type:
- Default Value:
''- Flags:
The subtitle for this row.
Added in version 1.0.
- Handy.ActionRow.props.subtitle_lines¶
- Name:
subtitle-lines- Type:
- Default Value:
1- 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.
Added in version 1.2.
- Handy.ActionRow.props.title_lines¶
- Name:
title-lines- Type:
- Default Value:
1- 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.
Added in version 1.2.