Handy.ActionRow

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Actionable Gtk.Actionable GObject.GInterface->Gtk.Actionable Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.ListBoxRow Gtk.ListBoxRow Gtk.Actionable->Gtk.ListBoxRow Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.ListBoxRow Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Handy.PreferencesRow Handy.PreferencesRow Gtk.ListBoxRow->Handy.PreferencesRow Gtk.Widget->Gtk.Container Handy.ActionRow Handy.ActionRow Handy.PreferencesRow->Handy.ActionRow

Subclasses:

Handy.ComboRow

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

new ()

activate ()

add_prefix (widget)

get_activatable_widget ()

get_icon_name ()

get_subtitle ()

get_subtitle_lines ()

get_title_lines ()

get_use_underline ()

set_activatable_widget (widget)

set_icon_name (icon_name)

set_subtitle (subtitle)

set_subtitle_lines (subtitle_lines)

set_title_lines (title_lines)

set_use_underline (use_underline)

Virtual Methods

Inherited:

Gtk.ListBoxRow (1), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.Actionable (4)

do_activate ()

Properties

Inherited:

Handy.PreferencesRow (2), Gtk.ListBoxRow (2), Gtk.Container (3), Gtk.Widget (39), Gtk.Actionable (2)

Name

Type

Flags

Short Description

activatable-widget

Gtk.Widget

r/w

The widget to be activated when the row is activated

icon-name

str

r/w/en

Icon name

subtitle

str

r/w/en

Subtitle

subtitle-lines

int

r/w/en

The desired number of subtitle lines

title-lines

int

r/w/en

The desired number of title lines

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gtk.ListBoxRow (1), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Short Description

activated

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

Handy.PreferencesRow

r

Class Details

class Handy.ActionRow(**kwargs)
Bases:

Handy.PreferencesRow

Abstract:

No

Structure:

Handy.ActionRowClass

A [class`Gtk`.ListBoxRow] used to present actions.

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

HdyActionRow is unactivatable by default, giving it an activatable widget will automatically make it activatable, but unsetting it won’t change the row’s activatability.

Handy.ActionRow as Gtk.Buildable

The HdyActionRow 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

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

New in version 1.0.

classmethod new()
Returns:

the newly created HdyActionRow

Return type:

Gtk.Widget

Creates a new HdyActionRow.

New in version 1.0.

activate()

Activates self.

New in version 1.0.

add_prefix(widget)
Parameters:

widget (Gtk.Widget) – the prefix widget

Adds a prefix widget to self.

New in version 1.0.

get_activatable_widget()
Returns:

the activatable widget for self

Return type:

Gtk.Widget or None

Gets the widget activated when self is activated.

New in version 1.0.

get_icon_name()
Returns:

the icon name for self

Return type:

str

Gets the icon name for self.

New in version 1.0.

get_subtitle()
Returns:

the subtitle for self

Return type:

str or None

Gets the subtitle for self.

New 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:

int

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.

New 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:

int

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.

New in version 1.2.

get_use_underline()
Returns:

whether an embedded underline in the title or subtitle indicates a mnemonic

Return type:

bool

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

New in version 1.0.

set_activatable_widget(widget)
Parameters:

widget (Gtk.Widget or None) – the target widget

Sets the widget to activate when self is activated.

New in version 1.0.

set_icon_name(icon_name)
Parameters:

icon_name (str) – the icon name

Sets the icon name for self.

New in version 1.0.

set_subtitle(subtitle)
Parameters:

subtitle (str or None) – the subtitle

Sets the subtitle for self.

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

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

New in version 1.2.

set_use_underline(use_underline)
Parameters:

use_underline (bool) – TRUE if underlines in the text indicate mnemonics

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

New in version 1.0.

do_activate() virtual

Activates self.

New in version 1.0.

Signal Details

Handy.ActionRow.signals.activated(action_row)
Signal Name:

activated

Flags:

RUN_LAST

Parameters:

action_row (Handy.ActionRow) – The object which received the signal

This signal is emitted after the row has been activated.

New in version 1.0.

Property Details

Handy.ActionRow.props.activatable_widget
Name:

activatable-widget

Type:

Gtk.Widget

Default Value:

None

Flags:

READABLE, WRITABLE

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.

New in version 1.0.

Handy.ActionRow.props.icon_name
Name:

icon-name

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The icon name for this row.

New in version 1.0.

Handy.ActionRow.props.subtitle
Name:

subtitle

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The subtitle for this row.

New in version 1.0.

Handy.ActionRow.props.subtitle_lines
Name:

subtitle-lines

Type:

int

Default Value:

1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

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.

New in version 1.2.

Handy.ActionRow.props.title_lines
Name:

title-lines

Type:

int

Default Value:

1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

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.

New in version 1.2.