Method

HandyComboRowbind_name_model

Declaration [src]

void
hdy_combo_row_bind_name_model (
  HdyComboRow* self,
  GListModel* model,
  HdyComboRowGetNameFunc get_name_func,
  gpointer user_data,
  GDestroyNotify user_data_free_func
)

Description [src]

Binds model to self.

If self was already bound to a model, that previous binding is destroyed.

The contents of self are cleared and then filled with widgets that represent items from model. self is updated whenever model changes. If model is NULL, self is left empty.

This is more convenient to use than hdy_combo_row_bind_model() if you want to represent items of the model with names.

Available since:1.0

Parameters

model

Type: GObject

The GListModel to be bound to self.

The argument can be NULL.
The data is owned by the caller of the function.
get_name_func

Type: HdyComboRowGetNameFunc

A function that creates names for items, or NULL in case you also passed NULL as model.

The argument can be NULL.
user_data

Type: gpointer

User data passed to get_name_func.

The argument can be NULL.
The data is owned by the caller of the function.
user_data_free_func

Type: GDestroyNotify

Function for freeing user_data.