set_for_enum


Description:

public void set_for_enum (Type enum_type, owned ComboRowGetEnumValueNameFunc? get_name_func)

Creates a model for enum_type and binds it to this.

The items of the model will be [class@EnumValueObject] objects.

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.

This is more convenient to use than [method@ComboRow.bind_name_model] if you want to represent values of an enumeration with names.

See [func@enum_value_row_name].

Parameters:

this

a combo row

enum_type

the enumeration [alias@GLib.Type] to be bound to this

get_name_func

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

user_data

user data passed to get_name_func

user_data_free_func

function for freeing user_data