AdwComboRow

AdwComboRow

Functions

Properties

GtkExpression * expression Read / Write
GtkListItemFactory * factory Read / Write
GtkListItemFactory * list-factory Read / Write
GListModel * model Read / Write
guint selected Read / Write
GObject * selected-item Read
gboolean use-subtitle Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkListBoxRow
                ╰── AdwPreferencesRow
                    ╰── AdwActionRow
                        ╰── AdwComboRow

Implemented Interfaces

AdwComboRow implements GtkAccessible, GtkBuildable, GtkConstraintTarget and GtkActionable.

Description

Functions

adw_combo_row_new ()

GtkWidget *
adw_combo_row_new (void);

Creates a new AdwComboRow.

Returns

a new AdwComboRow

Since: 1.0


adw_combo_row_get_model ()

GListModel *
adw_combo_row_get_model (AdwComboRow *self);

Gets the model that provides the displayed items.

Parameters

self

a AdwComboRow

 

Returns

The model in use.

[nullable][transfer none]

Since: 1.0


adw_combo_row_set_model ()

void
adw_combo_row_set_model (AdwComboRow *self,
                         GListModel *model);

Sets the GListModel to use.

Parameters

self

a AdwComboRow

 

model

the model to use or NULL for none.

[allow-none][transfer none]

Since: 1.0


adw_combo_row_set_selected ()

void
adw_combo_row_set_selected (AdwComboRow *self,
                            guint position);

Selects the item at the given position.

Parameters

self

a AdwComboRow

 

position

the position of the item to select, or GTK_INVALID_LIST_POSITION

 

Since: 1.0


adw_combo_row_get_selected ()

guint
adw_combo_row_get_selected (AdwComboRow *self);

Gets the position of the selected item.

Parameters

self

a AdwComboRow

 

Returns

the position of the selected item, or GTK_INVALID_LIST_POSITION if not item is selected

Since: 1.0


adw_combo_row_get_selected_item ()

gpointer
adw_combo_row_get_selected_item (AdwComboRow *self);

Gets the selected item. If no item is selected, NULL is returned.

Parameters

self

a AdwComboRow

 

Returns

The selected item.

[transfer none][type GObject][nullable]

Since: 1.0


adw_combo_row_get_factory ()

GtkListItemFactory *
adw_combo_row_get_factory (AdwComboRow *self);

Gets the factory that's currently used to populate list items.

The factory returned by this function is always used for the item in the button. It is also used for items in the popup if “list-factory” is not set.

Parameters

self

a AdwComboRow

 

Returns

The factory in use.

[nullable][transfer none]

Since: 1.0


adw_combo_row_set_factory ()

void
adw_combo_row_set_factory (AdwComboRow *self,
                           GtkListItemFactory *factory);

Sets the GtkListItemFactory to use for populating list items.

Parameters

self

a AdwComboRow

 

factory

the factory to use or NULL for none.

[allow-none][transfer none]

Since: 1.0


adw_combo_row_get_list_factory ()

GtkListItemFactory *
adw_combo_row_get_list_factory (AdwComboRow *self);

Gets the factory that's currently used to populate list items in the popup.

Parameters

self

a AdwComboRow

 

Returns

The factory in use.

[nullable][transfer none]

Since: 1.0


adw_combo_row_set_list_factory ()

void
adw_combo_row_set_list_factory (AdwComboRow *self,
                                GtkListItemFactory *factory);

Sets the GtkListItemFactory to use for populating list items in the popup.

Parameters

self

a AdwComboRow

 

factory

the factory to use or NULL for none.

[allow-none][transfer none]

Since: 1.0


adw_combo_row_get_expression ()

GtkExpression *
adw_combo_row_get_expression (AdwComboRow *self);

Gets the expression set with adw_combo_row_set_expression().

Parameters

self

a AdwComboRow

 

Returns

a GtkExpression or NULL.

[nullable][transfer none]

Since: 1.0


adw_combo_row_set_expression ()

void
adw_combo_row_set_expression (AdwComboRow *self,
                              GtkExpression *expression);

Sets the expression that gets evaluated to obtain strings, used to bind strings to labels produced by the default factory.

The expression must have a value type of G_TYPE_STRING.

Parameters

self

a AdwComboRow

 

expression

a GtkExpression, or NULL.

[nullable]

Since: 1.0


adw_combo_row_get_use_subtitle ()

gboolean
adw_combo_row_get_use_subtitle (AdwComboRow *self);

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

Parameters

self

a GtkListBoxRow

 

Returns

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

Since: 1.0


adw_combo_row_set_use_subtitle ()

void
adw_combo_row_set_use_subtitle (AdwComboRow *self,
                                gboolean use_subtitle);

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

If TRUE, you should not access AdwActionRow:subtitle.

Parameters

self

a AdwComboRow

 

use_subtitle

TRUE to set the current value as the subtitle

 

Since: 1.0

Types and Values

ADW_TYPE_COMBO_ROW

#define ADW_TYPE_COMBO_ROW (adw_combo_row_get_type())

struct AdwComboRowClass

struct AdwComboRowClass {
  AdwActionRowClass parent_class;
};

Members


AdwComboRow

typedef struct _AdwComboRow AdwComboRow;

Property Details

The “expression” property

  “expression”               GtkExpression *

An expression to evaluate to obtain strings, used to bind strings to labels produced by the default factory.

[type GtkExpression]

Owner: AdwComboRow

Flags: Read / Write

Since: 1.0


The “factory” property

  “factory”                  GtkListItemFactory *

Factory for populating list items.

Owner: AdwComboRow

Flags: Read / Write

Since: 1.0


The “list-factory” property

  “list-factory”             GtkListItemFactory *

The factory for populating list items in the popup.

If this is not set, “factory” is used.

Owner: AdwComboRow

Flags: Read / Write

Since: 1.0


The “model” property

  “model”                    GListModel *

Model for the displayed items.

Owner: AdwComboRow

Flags: Read / Write

Since: 1.0


The “selected” property

  “selected”                 guint

The position of the selected item in “model”, or GTK_INVALID_LIST_POSITION if no item is selected.

Owner: AdwComboRow

Flags: Read / Write

Default value: 4294967295

Since: 1.0


The “selected-item” property

  “selected-item”            GObject *

The selected item.

Owner: AdwComboRow

Flags: Read

Since: 1.0


The “use-subtitle” property

  “use-subtitle”             gboolean

TRUE to set the current value as the subtitle.

If you use a custom list item factory, you will need to give the row a name conversion expression with “expression”.

If TRUE, you should not access “subtitle”.

Owner: AdwComboRow

Flags: Read / Write

Default value: FALSE

Since: 1.0