Adw.ExpanderRow¶
- Subclasses:
None
Methods¶
- Inherited:
Adw.PreferencesRow (9), Gtk.ListBoxRow (12), Gtk.Widget (183), GObject.Object (37), Gtk.Accessible (17), Gtk.Buildable (1), Gtk.Actionable (5)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Adw.PreferencesRow (4), Gtk.ListBoxRow (3), Gtk.Widget (35), 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
AdwExpanderRowwidget 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
AdwExpanderRowimplementation 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
AdwExpanderRowhas a main CSS node with namerowand the.expanderstyle class. It has the.emptystyle class when it contains no children.It contains the subnodes
row.headerfor its main embedded row,list.nestedfor the list it can expand, andimage.expander-row-arrowfor its arrow.- Style classes
AdwExpanderRowcan use the . style class to emphasize the row subtitle instead of the row title, which is useful for displaying read-only properties.When used together with the
.monospacestyle class, only the subtitle becomes monospace, not the title or any extra widgets.- 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.