bind_model
Description:
[ Version ( since = "3.18" ) ]
public void bind_model (ListModel? model, owned FlowBoxCreateWidgetFunc? create_widget_func)
public void bind_model (ListModel? model, owned FlowBoxCreateWidgetFunc? create_widget_func)
Binds model to this.
If this was already bound to a model, that previous binding is destroyed.
The contents of this are cleared and then filled with widgets that represent items from model.
this is updated whenever model changes. If model is null
, this is left empty.
It is undefined to add or remove widgets directly (for example, with insert or add) while this is bound to a model.
Note that using a model is incompatible with the filtering and sorting functionality in GtkFlowBox. When using a model, filtering and sorting should be implemented by the model.
Parameters:
| this |
a FlowBox |
| model |
the ListModel to be bound to this |
| create_widget_func |
a function that creates widgets for items |
| user_data |
user data passed to |
| user_data_free_func |
function for freeing |