Clutter 0.8.2 Reference Manual | ||||
---|---|---|---|---|
ClutterListModel; ClutterModel* clutter_list_model_new (guint n_columns, ...); ClutterModel* clutter_list_model_newv (guint n_columns, GType *types, const gchar * const names[]);
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
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.
|
number of columns in the model |
|
n_columns number of GType and string pairs
|
Returns : |
a new ClutterListModel |
Since 0.6
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.
|
number of columns in the model |
|
an array of GType types for the columns, from first to last |
|
an array of names for the columns, from first to last |
Returns : |
a new default ClutterModel |
Since 0.6