Class
AdwComboRow
Description [src]
class Adw.ComboRow : Adw.ActionRow {
parent_instance: AdwActionRow
}
A GtkListBoxRow
used to choose from a list of items.
The AdwComboRow
widget allows the user to choose from a list of valid
choices. The row displays the selected choice. When activated, the row
displays a popover which allows the user to make a new choice.
Example of an AdwComboRow
UI definition:
<object class="AdwComboRow">
<property name="title" translatable="yes">Combo Row</property>
<property name="model">
<object class="GtkStringList">
<items>
<item translatable="yes">Foo</item>
<item translatable="yes">Bar</item>
<item translatable="yes">Baz</item>
</items>
</object>
</property>
</object>
The AdwComboRow:selected
and AdwComboRow:selected-item
properties can be used to keep track of the selected item and react to their changes.
AdwComboRow
mirrors GtkDropDown
, see that widget for details.
AdwComboRow
is GtkListBoxRow:activatable
if a model is set.
CSS nodes
AdwComboRow
has a main CSS node with name row
and the .combo
style class.
Its popover has the node named popover
with the .menu
style class, it
contains a GtkScrolledWindow
, which in turn contains a
GtkListView
, both are accessible via their regular nodes.
Accessibility
AdwComboRow
uses the GTK_ACCESSIBLE_ROLE_COMBO_BOX
role.
Ancestors
- AdwActionRow
- AdwPreferencesRow
- GtkListBoxRow
- GtkWidget
- GInitiallyUnowned
- GObject
Constructors
adw_combo_row_new
Creates a new AdwComboRow
.
Instance methods
adw_combo_row_get_expression
Gets the expression used to obtain strings from items.
adw_combo_row_get_factory
Gets the factory for populating list items.
adw_combo_row_get_list_factory
Gets the factory for populating list items in the popup.
adw_combo_row_get_model
Gets the model that provides the displayed items.
adw_combo_row_get_selected
Gets the position of the selected item.
adw_combo_row_get_selected_item
Gets the selected item.
adw_combo_row_get_use_subtitle
Gets whether to use the current value as the subtitle.
adw_combo_row_set_expression
Sets the expression used to obtain strings from items.
adw_combo_row_set_factory
Sets the factory for populating list items.
adw_combo_row_set_list_factory
Sets the factory for populating list items in the popup.
adw_combo_row_set_model
Sets the model that provides the displayed items.
adw_combo_row_set_selected
Selects the item at the given position.
adw_combo_row_set_use_subtitle
Sets whether to use the current value as the subtitle.
Methods inherited from AdwActionRow (16)
adw_action_row_activate
Activates self
.
adw_action_row_add_prefix
Adds a prefix widget to self
.
adw_action_row_add_suffix
Adds a suffix widget to self
.
adw_action_row_get_activatable_widget
Gets the widget activated when self
is activated.
adw_action_row_get_icon_name
Gets the icon name for self
.
Deprecated since: 1.3
adw_action_row_get_subtitle
Gets the subtitle for self
.
adw_action_row_get_subtitle_lines
Gets the number of lines at the end of which the subtitle label will be ellipsized.
adw_action_row_get_subtitle_selectable
Gets whether the user can copy the subtitle from the label.
Available since: 1.3
adw_action_row_get_title_lines
Gets the number of lines at the end of which the title label will be ellipsized.
adw_action_row_remove
Removes a child from self
.
adw_action_row_set_activatable_widget
Sets the widget to activate when self
is activated.
adw_action_row_set_icon_name
Sets the icon name for self
.
Deprecated since: 1.3
adw_action_row_set_subtitle
Sets the subtitle for self
.
adw_action_row_set_subtitle_lines
Sets the number of lines at the end of which the subtitle label will be ellipsized.
adw_action_row_set_subtitle_selectable
Sets whether the user can copy the subtitle from the label.
Available since: 1.3
adw_action_row_set_title_lines
Sets the number of lines at the end of which the title label will be ellipsized.
Methods inherited from AdwPreferencesRow (8)
adw_preferences_row_get_title
Gets the title of the preference represented by self
.
adw_preferences_row_get_title_selectable
Gets whether the user can copy the title from the label.
Available since: 1.1
adw_preferences_row_get_use_markup
Gets whether to use Pango markup for the title label.
Available since: 1.2
adw_preferences_row_get_use_underline
Gets whether an embedded underline in the title indicates a mnemonic.
adw_preferences_row_set_title
Sets the title of the preference represented by self
.
adw_preferences_row_set_title_selectable
Sets whether the user can copy the title from the label.
Available since: 1.1
adw_preferences_row_set_use_markup
Sets whether to use Pango markup for the title label.
Available since: 1.2
adw_preferences_row_set_use_underline
Sets whether an embedded underline in the title indicates a mnemonic.
Properties
Adw.ComboRow:expression
An expression used to obtain strings from items.
Adw.ComboRow:factory
Factory for populating list items.
Adw.ComboRow:list-factory
The factory for populating list items in the popup.
Adw.ComboRow:model
The model that provides the displayed items.
Adw.ComboRow:selected
The position of the selected item.
Adw.ComboRow:selected-item
The selected item.
Adw.ComboRow:use-subtitle
Whether to use the current value as the subtitle.
Properties inherited from AdwActionRow (6)
Adw.ActionRow:activatable-widget
The widget to activate when the row is activated.
Adw.ActionRow:icon-name
The icon name for this row.
Deprecated since: 1.3
Adw.ActionRow:subtitle
The subtitle for this row.
Adw.ActionRow:subtitle-lines
The number of lines at the end of which the subtitle label will be ellipsized.
Adw.ActionRow:subtitle-selectable
Whether the user can copy the subtitle from the label.
Available since: 1.3
Adw.ActionRow:title-lines
The number of lines at the end of which the title label will be ellipsized.
Properties inherited from AdwPreferencesRow (4)
Adw.PreferencesRow:title
The title of the preference represented by this row.
Adw.PreferencesRow:title-selectable
Whether the user can copy the title from the label.
Available since: 1.1
Adw.PreferencesRow:use-markup
Whether to use Pango markup for the title label.
Available since: 1.2
Adw.PreferencesRow:use-underline
Whether an embedded underline in the title indicates a mnemonic.