Handy.ExpanderRow

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.ExpanderRow Handy.ExpanderRow Handy.PreferencesRow->Handy.ExpanderRow

Subclasses:

None

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

add_action (widget)

add_prefix (widget)

get_enable_expansion ()

get_expanded ()

get_icon_name ()

get_show_enable_switch ()

get_subtitle ()

get_use_underline ()

set_enable_expansion (enable_expansion)

set_expanded (expanded)

set_icon_name (icon_name)

set_show_enable_switch (show_enable_switch)

set_subtitle (subtitle)

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)

Properties

Inherited:

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

Name

Type

Flags

Short Description

enable-expansion

bool

r/w/en

Whether the expansion is enabled

expanded

bool

r/w/en

Whether the row is expanded

icon-name

str

r/w/en

Icon name

show-enable-switch

bool

r/w/en

Whether the switch enabling the expansion is visible

subtitle

str

r/w/en

The subtitle for this row

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

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

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.ExpanderRow(**kwargs)
Bases:

Handy.PreferencesRow

Abstract:

No

Structure:

Handy.ExpanderRowClass

A [class`Gtk`.ListBoxRow] used to reveal widgets.

The HdyExpanderRow widget allows the user to reveal or hide widgets below it. It also allows the user to enable the expansion of the row, allowing to disable all that the row contains.

Handy.ExpanderRow as Gtk.Buildable

The HdyExpanderRow implementation of the [iface`Gtk`.Buildable] interface supports adding a child as an action widget by specifying “action” as the “type” attribute of a <child> element.

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

CSS nodes

HdyExpanderRow has a main CSS node with name row, and the .expander style class. It has the .empty style class when it contains no children.

It contains the subnodes row.header for its main embedded row, list.nested for the list it can expand, and image.expander-row-arrow for its arrow.

When expanded, HdyExpanderRow will add the .checked-expander-row-previous-sibling style class to its previous sibling, and remove it when retracted.

New in version 1.0.

classmethod new()
Returns:

the newly created HdyExpanderRow

Return type:

Gtk.Widget

Creates a new HdyExpanderRow.

New in version 1.0.

add_action(widget)
Parameters:

widget (Gtk.Widget) – the action widget

Adds an action widget to 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_enable_expansion()
Returns:

whether the expansion of self is enabled

Return type:

bool

Gets whether the expansion of self is enabled.

New in version 1.0.

get_expanded()
Return type:

bool

get_icon_name()
Returns:

the icon name for self

Return type:

str

Gets the icon name for self.

New in version 1.0.

get_show_enable_switch()
Returns:

whether the switch enabling the expansion of self is visible

Return type:

bool

Gets whether the switch enabling the expansion of self is visible.

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_use_underline()
Returns:

whether an embedded underlines indicates a mnemonic

Return type:

bool

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

New in version 1.0.

set_enable_expansion(enable_expansion)
Parameters:

enable_expansion (bool) – TRUE to enable the expansion

Sets whether the expansion of self is enabled.

New in version 1.0.

set_expanded(expanded)
Parameters:

expanded (bool) –

set_icon_name(icon_name)
Parameters:

icon_name (str) – the icon name

Sets the icon name for self.

New in version 1.0.

set_show_enable_switch(show_enable_switch)
Parameters:

show_enable_switch (bool) – TRUE to show the switch enabling the expansion

Sets whether the switch enabling the expansion of self is visible.

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_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 labels indicates a mnemonic.

New in version 1.0.

Property Details

Handy.ExpanderRow.props.enable_expansion
Name:

enable-expansion

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether expansion is enabled.

New in version 1.0.

Handy.ExpanderRow.props.expanded
Name:

expanded

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the row is expanded.

New in version 1.0.

Handy.ExpanderRow.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.ExpanderRow.props.show_enable_switch
Name:

show-enable-switch

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the switch enabling the expansion is visible.

New in version 1.0.

Handy.ExpanderRow.props.subtitle
Name:

subtitle

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The subtitle for this row.

New in version 1.0.