ClutterListModel

ClutterListModel — List model implementation

Synopsis

                    ClutterListModel;
ClutterModel*       clutter_list_model_new              (guint n_columns,
                                                         ...);
ClutterModel*       clutter_list_model_newv             (guint n_columns,
                                                         GType *types,
                                                         const gchar * const names[]);

Object Hierarchy

  GObject
   +----ClutterModel
         +----ClutterListModel

Description

ClutterListModel is a ClutterModel implementation provided by Clutter. ClutterListModel uses a GSequence for storing the values for each row, so it's optimized for insertion and look up in sorted lists.

ClutterListModel is a terminal class: it cannot be subclassed, only instantiated.

ClutterListModel is available since Clutter 0.6

Details

ClutterListModel

typedef struct _ClutterListModel ClutterListModel;


clutter_list_model_new ()

ClutterModel*       clutter_list_model_new              (guint n_columns,
                                                         ...);

Creates a new default model with n_columns columns with the types and names passed in.

For example:

model = clutter_list_model_new (3,
                                G_TYPE_INT,      "Score",
                                G_TYPE_STRING,   "Team",
                                GDK_TYPE_PIXBUF, "Logo");

will create a new ClutterModel with three columns of type int, string and GdkPixbuf respectively.

Note that the name of the column can be set to NULL, in which case the canonical name of the type held by the column will be used as the title.

n_columns :

number of columns in the model

... :

n_columns number of GType and string pairs

Returns :

a new ClutterListModel

Since 0.6


clutter_list_model_newv ()

ClutterModel*       clutter_list_model_newv             (guint n_columns,
                                                         GType *types,
                                                         const gchar * const names[]);

Non-vararg version of clutter_list_model_new(). This function is useful for language bindings.

n_columns :

number of columns in the model

types :

an array of GType types for the columns, from first to last

names :

an array of names for the columns, from first to last

Returns :

a new default ClutterModel

Since 0.6