gcr-collection-model

## gcr-collection-model gcr-collection-model |

## Synopsis

    struct              GcrCollectionModel;
    struct              GcrCollectionModelClass;
    enum                GcrCollectionModelMode;
    GcrCollectionModel * gcr_collection_model_new           (GcrCollection *collection,
                                                             GcrCollectionModelMode mode,
                                                             ...);
    GcrCollectionModel * gcr_collection_model_new_full      (GcrCollection *collection,
                                                             GcrCollectionModelMode mode,
                                                             const GcrColumn *columns);
    guint               gcr_collection_model_set_columns    (GcrCollectionModel *self,
                                                             const GcrColumn *columns);
    GcrCollection *     gcr_collection_model_get_collection (GcrCollectionModel *self);
    void                gcr_collection_model_set_collection (GcrCollectionModel *self,
                                                             GcrCollection *collection);
    gboolean            gcr_collection_model_iter_for_object
                                                            (GcrCollectionModel *self,
                                                             GObject *object,
                                                             GtkTreeIter *iter);
    GObject *           gcr_collection_model_object_for_iter
                                                            (GcrCollectionModel *self,
                                                             const GtkTreeIter *iter);
    gboolean            gcr_collection_model_is_selected    (GcrCollectionModel *self,
                                                             GtkTreeIter *iter);
    void                gcr_collection_model_change_selected
                                                            (GcrCollectionModel *self,
                                                             GtkTreeIter *iter,
                                                             gboolean selected);
    void                gcr_collection_model_toggle_selected
                                                            (GcrCollectionModel *self,
                                                             GtkTreeIter *iter);
    GList *             gcr_collection_model_get_selected_objects
                                                            (GcrCollectionModel *self);
    void                gcr_collection_model_set_selected_objects
                                                            (GcrCollectionModel *self,
                                                             GList *selected);
    gint                gcr_collection_model_column_for_selected
                                                            (GcrCollectionModel *self);

## Object Hierarchy

      GObject
       +----GcrCollectionModel

## Implemented Interfaces

GcrCollectionModel implements GtkTreeModel and GtkTreeSortable.

## Properties

      "collection"               GcrCollection*        : Read / Write
      "columns"                  gpointer              : Read / Write / Construct Only
      "mode"                     GcrCollectionModelMode  : Read / Write / Construct Only

## Description

## Details

### struct GcrCollectionModel

    struct GcrCollectionModel;

### struct GcrCollectionModelClass

    struct GcrCollectionModelClass {
    	GObjectClass parent_class;
    };

### enum GcrCollectionModelMode

    typedef enum {
    	GCR_COLLECTION_MODEL_LIST = 0,
    	GCR_COLLECTION_MODEL_TREE
    } GcrCollectionModelMode;

`GCR_COLLECTION_MODEL_LIST` |
`GCR_COLLECTION_MODEL_TREE` |

### gcr_collection_model_new ()

    GcrCollectionModel * gcr_collection_model_new           (GcrCollection *collection,
                                                             GcrCollectionModelMode mode,
                                                             ...);

### gcr_collection_model_new_full ()

    GcrCollectionModel * gcr_collection_model_new_full      (GcrCollection *collection,
                                                             GcrCollectionModelMode mode,
                                                             const GcrColumn *columns);

### gcr_collection_model_set_columns ()

    guint               gcr_collection_model_set_columns    (GcrCollectionModel *self,
                                                             const GcrColumn *columns);

### gcr_collection_model_get_collection ()

    GcrCollection *     gcr_collection_model_get_collection (GcrCollectionModel *self);

### gcr_collection_model_set_collection ()

    void                gcr_collection_model_set_collection (GcrCollectionModel *self,
                                                             GcrCollection *collection);

### gcr_collection_model_iter_for_object ()

    gboolean            gcr_collection_model_iter_for_object
                                                            (GcrCollectionModel *self,
                                                             GObject *object,
                                                             GtkTreeIter *iter);

### gcr_collection_model_object_for_iter ()

    GObject *           gcr_collection_model_object_for_iter
                                                            (GcrCollectionModel *self,
                                                             const GtkTreeIter *iter);

### gcr_collection_model_is_selected ()

    gboolean            gcr_collection_model_is_selected    (GcrCollectionModel *self,
                                                             GtkTreeIter *iter);

### gcr_collection_model_change_selected ()

    void                gcr_collection_model_change_selected
                                                            (GcrCollectionModel *self,
                                                             GtkTreeIter *iter,
                                                             gboolean selected);

### gcr_collection_model_toggle_selected ()

    void                gcr_collection_model_toggle_selected
                                                            (GcrCollectionModel *self,
                                                             GtkTreeIter *iter);

### gcr_collection_model_get_selected_objects ()

    GList *             gcr_collection_model_get_selected_objects
                                                            (GcrCollectionModel *self);

### gcr_collection_model_set_selected_objects ()

    void                gcr_collection_model_set_selected_objects
                                                            (GcrCollectionModel *self,
                                                             GList *selected);

### gcr_collection_model_column_for_selected ()

    gint                gcr_collection_model_column_for_selected
                                                            (GcrCollectionModel *self);

## Property Details

### The `"collection"` property

      "collection"               GcrCollection*        : Read / Write

Collection to get objects from.

### The `"columns"` property

      "columns"                  gpointer              : Read / Write / Construct Only

Columns for the model.

### The `"mode"` property

      "mode"                     GcrCollectionModelMode  : Read / Write / Construct Only

Tree or list mode.

Default value: GCR_COLLECTION_MODEL_TREE