Object Hierarchy:

Gcr.CollectionModel Gcr.CollectionModel Gcr.CollectionModel GLib.Object GLib.Object GLib.Object->Gcr.CollectionModel Gtk.TreeModel Gtk.TreeModel Gtk.TreeModel->Gcr.CollectionModel Gtk.TreeSortable Gtk.TreeSortable Gtk.TreeSortable->Gcr.CollectionModel


[ CCode ( type_id = "gcr_collection_model_get_type ()" ) ]
public class CollectionModel : Object, TreeModel, TreeSortable

Ain implementation of a [iface@Gtk.

TreeModel] which contains a row for each object in a [iface@Gcr.Collection].

As objects are added or removed from the collection, rows are added and removed from this model.

The row values come from the properties of the objects in the collection. Use [] to create a new collection model. To have more control over the values use a set of [struct@Gcr.Column] structures to define the columns. This can be done with [ ctor@CollectionModel.new_full] or [method@CollectionModel.set_columns].

Each row can have a selected state, which is represented by a boolean column. The selected state can be toggled with toggle_selected or set with set_selected_objects and retrieved with [ method@CollectionModel.get_selected_objects].

To determine which object a row represents and vice versa, use the [method@CollectionModel.iter_for_object] or [ method@CollectionModel.object_for_iter] functions.

Namespace: Gcr
Package: gcr-ui-3



Creation methods:


Inherited Members: