Adw.ExpanderRow¶
- Subclasses:
None
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¶
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 |
|||
r/w/en |
|||
r/w/en |
|
||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Adw.ExpanderRow(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A [class`Gtk`.ListBoxRow] used to reveal widgets.
<picture> <source srcset=”expander-row-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”expander-row.png” alt=”expander-row”> </picture>
The
AdwExpanderRow
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.The
AdwExpanderRow
implementation of the [iface`Gtk`.Buildable] interface supports adding a child as an suffix widget by specifying “suffix” 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
AdwExpanderRow
has a main CSS node with namerow
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, andimage.expander-row-arrow
for its arrow.- classmethod new()¶
- Returns:
the newly created
AdwExpanderRow
- Return type:
Creates a new
AdwExpanderRow
.
- add_action(widget)¶
- Parameters:
widget (
Gtk.Widget
) – a widget
Adds an action widget to self.
Deprecated since version 1.4: Use [method`ExpanderRow`.add_suffix] to add a suffix.
- add_prefix(widget)¶
- Parameters:
widget (
Gtk.Widget
) – a widget
Adds a prefix widget to self.
- add_row(child)¶
- Parameters:
child (
Gtk.Widget
) – a widget
Adds a widget to self.
The widget will appear in the expanding list below self.
- add_suffix(widget)¶
- Parameters:
widget (
Gtk.Widget
) – a widget
Adds an suffix widget to self.
New in version 1.4.
- get_enable_expansion()¶
- Returns:
whether the expansion of self is enabled.
- Return type:
Gets whether the expansion of self is enabled.
- get_icon_name()¶
-
Gets the icon name for self.
Deprecated since version 1.3: Use [method`ExpanderRow`.add_prefix] to add an icon.
- get_show_enable_switch()¶
- Returns:
whether the switch enabling the expansion is visible
- Return type:
Gets whether the switch enabling the expansion of self is visible.
- 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.
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.
New in version 1.3.
- remove(child)¶
- Parameters:
child (
Gtk.Widget
) – the child to be removed
Removes a child from self.
- set_enable_expansion(enable_expansion)¶
- Parameters:
enable_expansion (
bool
) – whether to enable the expansion
Sets whether the expansion of self is enabled.
- set_expanded(expanded)¶
- Parameters:
expanded (
bool
) – whether to expand the row
Sets whether self is expanded.
- set_icon_name(icon_name)¶
-
Sets the icon name for self.
Deprecated since version 1.3: Use [method`ExpanderRow`.add_prefix] to add an icon.
- set_show_enable_switch(show_enable_switch)¶
- Parameters:
show_enable_switch (
bool
) – whether to show the switch enabling the expansion
Sets whether the switch enabling the expansion of self is visible.
- 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.ExpanderRow.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.
New in version 1.3.
Property Details¶
- Adw.ExpanderRow.props.enable_expansion¶
- Name:
enable-expansion
- Type:
- Default Value:
- Flags:
Whether expansion is enabled.
- Adw.ExpanderRow.props.expanded¶
- Name:
expanded
- Type:
- Default Value:
- Flags:
Whether the row is expanded.
- Adw.ExpanderRow.props.icon_name¶
- Name:
icon-name
- Type:
- Default Value:
''
- Flags:
The icon name for this row.
Deprecated since version 1.3: Use [method`ExpanderRow`.add_prefix] to add an icon.
- Adw.ExpanderRow.props.show_enable_switch¶
- Name:
show-enable-switch
- Type:
- Default Value:
- Flags:
Whether the switch enabling the expansion is visible.
- Adw.ExpanderRow.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.ExpanderRow.props.use_markup>] is set to
FALSE
.
- Adw.ExpanderRow.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.
New in version 1.3.
- Adw.ExpanderRow.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.
New in version 1.3.