Top | ![]() |
![]() |
![]() |
![]() |
GtkFilterListModel is a list model that filters a given other listmodel. It hides some elements from the other model according to criteria given by a GtkFilter.
GtkFilterListModel * gtk_filter_list_model_new (GListModel *model
,GtkFilter *filter
);
Creates a new GtkFilterListModel that will filter model
using the given
filter
.
GtkFilterListModel *
gtk_filter_list_model_new_for_type (GType item_type
);
Creates a new empty filter list model set up to return items of type item_type
.
It is up to the application to set a proper filter and model to ensure
the item type is matched.
void gtk_filter_list_model_set_model (GtkFilterListModel *self
,GListModel *model
);
Sets the model to be filtered.
Note that GTK makes no effort to ensure that model
conforms to
the item type of self
. It assumes that the caller knows what they
are doing and have set up an appropriate filter to ensure that item
types match.
GListModel *
gtk_filter_list_model_get_model (GtkFilterListModel *self
);
Gets the model currently filtered or NULL
if none.
void gtk_filter_list_model_set_filter (GtkFilterListModel *self
,GtkFilter *filter
);
Sets the filter used to filter items.
GtkFilter *
gtk_filter_list_model_get_filter (GtkFilterListModel *self
);
Gets the GtkFilter currently set on self
.
“filter”
property“filter” GtkFilter *
The filter for this model
Owner: GtkFilterListModel
Flags: Read / Write
“item-type”
property “item-type” GType *
The GType for elements of this object
Owner: GtkFilterListModel
Flags: Read / Write / Construct Only
Allowed values: GObject