Class

HandyComboRow

Description [src]

class Handy.ComboRow : Handy.ActionRow {
  parent_instance: HdyActionRow
}

A GtkListBoxRow used to choose from a list of items.

The HdyComboRow 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.

The HdyComboRow uses the model-view pattern; the list of valid choices is specified in the form of a GListModel, and the display of the choices can be adapted to the data in the model via widget creation functions.

HdyComboRow is GtkListBoxRow:activatable if a model is set.

CSS nodes

HdyComboRow has a main CSS node with name row.

Its popover has the node name popover with the .combo style class, it contains a GtkScrolledWindow, which in turn contains a GtkListBox, both are accessible via their regular nodes.

A checkmark of node and style class image.checkmark in the popover denotes the current item.

Available since:1.0

Ancestors

Implements

  • AtkImplementorIface
  • GtkActionable
  • GtkBuildable

Constructors

hdy_combo_row_new

Creates a new HdyComboRow.

Available since: 1.0

Instance methods

hdy_combo_row_bind_model

Binds model to self.

Available since: 1.0

hdy_combo_row_bind_name_model

Binds model to self.

Available since: 1.0

hdy_combo_row_get_model

Gets the model bound to self.

Available since: 1.0

hdy_combo_row_get_selected_index

Gets the index of the selected item in its GListModel.

Available since: 1.0

hdy_combo_row_get_use_subtitle

Gets whether the current value of self should be displayed as its subtitle.

Available since: 1.0

hdy_combo_row_set_for_enum

Creates a model for enum_type and binds it to self.

Available since: 1.0

hdy_combo_row_set_get_name_func

Sets a closure to convert items into names.

Available since: 1.0

hdy_combo_row_set_selected_index

Sets the index of the selected item in its GListModel.

Available since: 1.0

hdy_combo_row_set_use_subtitle

Sets whether the current value of self should be displayed as its subtitle.

Available since: 1.0

Methods inherited from HdyActionRow (14)
hdy_action_row_activate

Activates self.

Available since: 1.0

hdy_action_row_add_prefix

Adds a prefix widget to self.

Available since: 1.0

hdy_action_row_get_activatable_widget

Gets the widget activated when self is activated.

Available since: 1.0

hdy_action_row_get_icon_name

Gets the icon name for self.

Available since: 1.0

hdy_action_row_get_subtitle

Gets the subtitle for self.

Available since: 1.0

hdy_action_row_get_subtitle_lines

Gets the number of lines at the end of which the subtitle label will be ellipsized.

Available since: 1.2

hdy_action_row_get_title_lines

Gets the number of lines at the end of which the title label will be ellipsized.

Available since: 1.2

hdy_action_row_get_use_underline

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

Available since: 1.0

hdy_action_row_set_activatable_widget

Sets the widget to activate when self is activated.

Available since: 1.0

hdy_action_row_set_icon_name

Sets the icon name for self.

Available since: 1.0

hdy_action_row_set_subtitle

Sets the subtitle for self.

Available since: 1.0

hdy_action_row_set_subtitle_lines

Sets the number of lines at the end of which the subtitle label will be ellipsized.

Available since: 1.2

hdy_action_row_set_title_lines

Sets the number of lines at the end of which the title label will be ellipsized.

Available since: 1.2

hdy_action_row_set_use_underline

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

Available since: 1.0

Methods inherited from HdyPreferencesRow (4)
hdy_preferences_row_get_title

Gets the title of the preference represented by self.

Available since: 1.0

hdy_preferences_row_get_use_underline

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

Available since: 1.0

hdy_preferences_row_set_title

Sets the title of the preference represented by self.

Available since: 1.0

hdy_preferences_row_set_use_underline

Sets whether an embedded underline in the title indicates a mnemonic.

Available since: 1.0

Properties

Handy.ComboRow:selected-index

The index of the selected item in its GListModel.

Available since: 1.0

Handy.ComboRow:use-subtitle

Whether to use the current value as the subtitle.

Available since: 1.0

Properties inherited from HdyActionRow (6)
Handy.ActionRow:activatable-widget

The activatable widget for this row.

Available since: 1.0

Handy.ActionRow:icon-name

The icon name for this row.

Available since: 1.0

Handy.ActionRow:subtitle

The subtitle for this row.

Available since: 1.0

Handy.ActionRow:subtitle-lines

The number of lines at the end of which the subtitle label will be ellipsized.

Available since: 1.2

Handy.ActionRow:title-lines

The number of lines at the end of which the title label will be ellipsized.

Available since: 1.2

Handy.ActionRow:use-underline

Whether embedded underlines in the title or subtitle indicates a mnemonic.

Available since: 1.0

Properties inherited from HdyPreferencesRow (2)
Handy.PreferencesRow:title

The title of the preference represented by this row.

Available since: 1.0

Handy.PreferencesRow:use-underline

Whether an embedded underline in the title indicates a mnemonic.

Available since: 1.0

Class structure

struct HandyComboRowClass {
  HdyActionRowClass parent_class;
  
}
Class members
parent_class
HdyActionRowClass
 

The parent class.