## GalViewCollection

GalViewCollection

## Synopsis

    struct              GalViewCollectionItem;
    struct              GalViewCollection;
    GalViewCollection * gal_view_collection_new             (const gchar *system_directory,
                                                             const gchar *user_directory);
    const gchar *       gal_view_collection_get_system_directory
                                                            (GalViewCollection *collection);
    const gchar *       gal_view_collection_get_user_directory
                                                            (GalViewCollection *collection);
    gint                gal_view_collection_get_count       (GalViewCollection *collection);
    GalView *           gal_view_collection_get_view        (GalViewCollection *collection,
                                                             gint n);
    GalViewCollectionItem * gal_view_collection_get_view_item
                                                            (GalViewCollection *collection,
                                                             gint n);
    gint                gal_view_collection_get_view_index_by_id
                                                            (GalViewCollection *collection,
                                                             const gchar *view_id);
    void                gal_view_collection_delete_view     (GalViewCollection *collection,
                                                             gint i);
    void                gal_view_collection_save            (GalViewCollection *collection);
    GalView *           gal_view_collection_load_view_from_file
                                                            (GalViewCollection *collection,
                                                             const gchar *type,
                                                             const gchar *filename);
    const gchar *       gal_view_collection_append_with_title
                                                            (GalViewCollection *collection,
                                                             const gchar *title,
                                                             GalView *view);
    const gchar *       gal_view_collection_set_nth_view    (GalViewCollection *collection,
                                                             gint i,
                                                             GalView *view);
    const gchar *       gal_view_collection_get_default_view
                                                            (GalViewCollection *collection);

## Object Hierarchy

      GObject
       +----GalViewCollection

## Properties

      "system-directory"         gchar*                : Read / Write / Construct Only
      "user-directory"           gchar*                : Read / Write / Construct Only

## Signals

      "changed"                                        : Run Last

## Description

## Details

### struct GalViewCollectionItem

    struct GalViewCollectionItem {
    	GalView *view;
    	gchar *id;
    	gboolean changed;
    	gboolean ever_changed;
    	gboolean built_in;
    	gchar *filename;
    	gchar *title;
    	gchar *type;
    	GalViewCollection *collection;
    	guint view_changed_id;
    };

### struct GalViewCollection

    struct GalViewCollection;

### gal_view_collection_new ()

    GalViewCollection * gal_view_collection_new             (const gchar *system_directory,
                                                             const gchar *user_directory);

Creates a GalViewCollection and loads ".galview" files from `system_directory` and `user_directory`.

`system_directory` : | directory from which to load built-in views
`user_directory` : | directory from which to load user-created views

### gal_view_collection_get_system_directory ()

    const gchar *       gal_view_collection_get_system_directory
                                                            (GalViewCollection *collection);

Returns the directory from which built-in views were loaded.

`collection` : | a GalViewCollection
Returns : | the system directory for `collection`

### gal_view_collection_get_user_directory ()

    const gchar *       gal_view_collection_get_user_directory
                                                            (GalViewCollection *collection);

Returns the directory from which user-created views were loaded.

`collection` : | a GalViewCollection
Returns : | the user directory for `collection`

### gal_view_collection_get_count ()

    gint                gal_view_collection_get_count       (GalViewCollection *collection);

Calculates the number of views in the given collection.

`collection` : | The view collection to count
Returns : | The number of views in the collection.

### gal_view_collection_get_view ()

    GalView *           gal_view_collection_get_view        (GalViewCollection *collection,
                                                             gint n);

`collection` : | The view collection to query
`n` : | The view to get.
Returns : | The nth view in the collection

### gal_view_collection_get_view_item ()

    GalViewCollectionItem * gal_view_collection_get_view_item
                                                            (GalViewCollection *collection,
                                                             gint n);

`collection` : | The view collection to query
`n` : | The view item to get.
Returns : | The nth view item in the collection

### gal_view_collection_get_view_index_by_id ()

    gint                gal_view_collection_get_view_index_by_id
                                                            (GalViewCollection *collection,
                                                             const gchar *view_id);

### gal_view_collection_delete_view ()

    void                gal_view_collection_delete_view     (GalViewCollection *collection,
                                                             gint i);

### gal_view_collection_save ()

    void                gal_view_collection_save            (GalViewCollection *collection);

Saves the data to the user directory specified in set storage directories. This is primarily for internal use by other parts of gal_view.

`collection` : | The view collection to save information for

### gal_view_collection_load_view_from_file ()

    GalView *           gal_view_collection_load_view_from_file
                                                            (GalViewCollection *collection,
                                                             const gchar *type,
                                                             const gchar *filename);

### gal_view_collection_append_with_title ()

    const gchar *       gal_view_collection_append_with_title
                                                            (GalViewCollection *collection,
                                                             const gchar *title,
                                                             GalView *view);

### gal_view_collection_set_nth_view ()

    const gchar *       gal_view_collection_set_nth_view    (GalViewCollection *collection,
                                                             gint i,
                                                             GalView *view);

### gal_view_collection_get_default_view ()

    const gchar *       gal_view_collection_get_default_view
                                                            (GalViewCollection *collection);

## Property Details

### The `"system-directory"` property

      "system-directory"         gchar*                : Read / Write / Construct Only

Directory from which to load built-in views.

Default value: NULL

### The `"user-directory"` property

      "user-directory"           gchar*                : Read / Write / Construct Only

Directory from which to load user-created views.

Default value: NULL

## Signal Details

### The `"changed"` signal

    void                user_function                      (GalViewCollection *galviewcollection,
                                                            gpointer           user_data)              : Run Last