ComboRow
Object Hierarchy:
Adw.ComboRow
Adw.ComboRow
Adw.ComboRow
Adw.ActionRow
Adw.ActionRow
Adw.ActionRow->Adw.ComboRow
Adw.PreferencesRow
Adw.PreferencesRow
Adw.PreferencesRow->Adw.ActionRow
Gtk.ListBoxRow
Gtk.ListBoxRow
Gtk.ListBoxRow->Adw.PreferencesRow
Gtk.Widget
Gtk.Widget
Gtk.Widget->Gtk.ListBoxRow
GLib.InitiallyUnowned
GLib.InitiallyUnowned
GLib.InitiallyUnowned->Gtk.Widget
GLib.Object
GLib.Object
GLib.Object->GLib.InitiallyUnowned
Gtk.Accessible
Gtk.Accessible
Gtk.Accessible->Adw.ComboRow
Gtk.Accessible->Adw.ActionRow
Gtk.Accessible->Adw.PreferencesRow
Gtk.Accessible->Gtk.ListBoxRow
Gtk.Accessible->Gtk.Widget
Gtk.Buildable
Gtk.Buildable
Gtk.Buildable->Adw.ComboRow
Gtk.Buildable->Adw.ActionRow
Gtk.Buildable->Adw.PreferencesRow
Gtk.Buildable->Gtk.ListBoxRow
Gtk.Buildable->Gtk.Widget
Gtk.ConstraintTarget
Gtk.ConstraintTarget
Gtk.ConstraintTarget->Adw.ComboRow
Gtk.ConstraintTarget->Adw.ActionRow
Gtk.ConstraintTarget->Adw.PreferencesRow
Gtk.ConstraintTarget->Gtk.ListBoxRow
Gtk.ConstraintTarget->Gtk.Widget
Gtk.Actionable
Gtk.Actionable
Gtk.Actionable->Adw.ComboRow
Gtk.Actionable->Adw.ActionRow
Gtk.Actionable->Adw.PreferencesRow
Gtk.Actionable->Gtk.ListBoxRow
Description:
[
CCode ( type_id =
"adw_combo_row_get_type ()" ) ]
[
Version ( since =
"1.0" ) ]
public class ComboRow :
ActionRow ,
Accessible ,
Actionable ,
Buildable ,
ConstraintTarget
A [class@Gtk.
ListBoxRow] used to choose from a list of items.
<picture> <source srcset="combo-row-dark.png" media="(prefers-color-scheme: dark)"> <img src="combo-row.png"
alt="combo-row"> </picture>
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: ```xml <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 [property@ComboRow:selected] and [property@ComboRow:selected-item] properties can be used to keep track of the selected item and
react to their changes.
`AdwComboRow` mirrors [[email protected] ], see that widget for details.
`AdwComboRow` is [[email protected] :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 [[email protected] ], which in turn contains a
[[email protected] ], both are accessible via their regular nodes.
Accessibility
`AdwComboRow` uses the `GTK_ACCESSIBLE_ROLE_COMBO_BOX` role.
Content:
Properties:
public Expression expression { get ; set ; }
An expression used to obtain strings from items.
public ListItemFactory factory { get ; set ; }
Factory for populating list items.
public ListItemFactory list_factory { get ; set ; }
The factory for populating list items in the popup.
public ListModel model { get ; set ; }
Model for the displayed items.
public uint selected { get ; set ; }
The position of the selected item.
public Object selected_item { get ; }
The selected item.
public bool use_subtitle { get ; set ; }
Whether to use the current value as the subtitle.
Creation methods:
Methods:
public unowned Expression ? get_expression ()
Gets the expression used to obtain strings from items.
public unowned ListItemFactory ? get_factory ()
Gets the factory that's currently used to populate list items.
public unowned ListItemFactory ? get_list_factory ()
Gets the factory that's currently used to populate list items in the
popup.
public unowned ListModel ? get_model ()
Gets the model that provides the displayed items.
public uint get_selected ()
Gets the position of the selected item.
public unowned Object ? get_selected_item ()
Gets the selected item.
public bool get_use_subtitle ()
Gets whether to use the current value as the subtitle.
public void set_expression (Expression ? expression)
Sets the expression used to obtain strings from items.
public void set_factory (ListItemFactory ? factory)
Sets the `GtkListItemFactory` to use for populating list items.
public void set_list_factory (ListItemFactory ? factory)
Sets the `GtkListItemFactory` to use for populating list items in the
popup.
public void set_model (ListModel ? model)
Sets the [iface@Gio.
public void set_selected (uint position)
Selects the item at the given position.
public void set_use_subtitle (bool use_subtitle)
Sets whether to use the current value as the subtitle.
Inherited Members:
All known members inherited from class Adw.ActionRow
All known members inherited from class Adw.PreferencesRow
All known members inherited from class Gtk.ListBoxRow
activatable
activate
changed
child
get_activatable
get_child
get_header
get_index
get_selectable
is_selected
selectable
set_activatable
set_child
set_header
set_selectable
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref
All known members inherited from interface Gtk.Accessible
accessible_role
get_accessible_role
reset_property
reset_relation
reset_state
update_property
update_property_value
update_relation
update_relation_value
update_state
update_state_value
All known members inherited from interface Gtk.Actionable
action_name
action_target
get_action_name
get_action_target_value
set_action_name
set_action_target
set_action_target_value
set_detailed_action_name
All known members inherited from interface Gtk.Buildable
add_child
custom_finished
custom_tag_end
custom_tag_start
get_buildable_id
get_id
get_internal_child
parser_finished
set_buildable_property
set_id