Class: Clutter::Model
- Inherits:
-
Object
- Object
- Clutter::Model
- Defined in:
- (unknown)
Overview
Class for Clutter::Model instances.
Direct Known Subclasses
Instance Method Summary collapse
-
#append(array) ⇒ nil
Creates and appends a new row to the Clutter::Model, setting the row values upon creation.
-
#appendv(n_columns, columns, values) ⇒ nil
Creates and appends a new row to the Clutter::Model, setting the row values for the given columns upon creation.
-
#filter_iter(iter) ⇒ Boolean
Checks whether the row pointer by iter should be filtered or not using the filtering function set on model.
-
#filter_row(row) ⇒ Boolean
Checks whether row should be filtered or not using the filtering function set on model.
-
#filter_set ⇒ Boolean
Returns whether the model has a filter in place, set using clutter_model_set_filter().
-
#filter_set=(filter_set) ⇒ Boolean
Whether the Clutter::Model has a filter set.
-
#filter_set? ⇒ Boolean
Whether the Clutter::Model has a filter set.
-
#first_iter ⇒ Clutter::ModelIter
Retrieves a Clutter::ModelIter representing the first non-filtered row in model.
-
#foreach(func, user_data) ⇒ nil
Calls func for each row in the model.
-
#get_column_name(column) ⇒ String
Retrieves the name of the column.
-
#get_column_type(column) ⇒ GLib::Type
Retrieves the type of the column.
-
#get_iter_at_row(row) ⇒ Clutter::ModelIter
Retrieves a Clutter::ModelIter representing the row at the given index.
-
#insert(row, array) ⇒ nil
Inserts a new row to the Clutter::Model at row, setting the row values upon creation.
-
#insert_value(row, column, value) ⇒ nil
Sets the data in the cell specified by iter and column.
-
#insertv(row, n_columns, columns, values) ⇒ nil
Inserts data at row into the Clutter::Model, setting the row values for the given columns upon creation.
-
#last_iter ⇒ Clutter::ModelIter
Retrieves a Clutter::ModelIter representing the last non-filtered row in model.
-
#n_columns ⇒ Integer
Retrieves the number of columns inside model.
-
#n_rows ⇒ Integer
Retrieves the number of rows inside model, eventually taking into account any filtering function set using clutter_model_set_filter().
-
#prepend(array) ⇒ nil
Creates and prepends a new row to the Clutter::Model, setting the row values upon creation.
-
#prependv(n_columns, columns, values) ⇒ nil
Creates and prepends a new row to the Clutter::Model, setting the row values for the given columns upon creation.
-
#remove(row) ⇒ nil
Removes the row at the given position from the model.
-
#resort ⇒ nil
Force a resort on the model.
-
#set_filter(func, user_data, notify) ⇒ nil
Filters the model using the given filtering function.
-
#set_names(n_columns, names) ⇒ nil
Assigns a name to the columns of a Clutter::Model.
-
#set_sort(column, func, user_data, notify) ⇒ nil
Sorts model using the given sorting function.
-
#set_types(n_columns, types) ⇒ nil
Sets the types of the columns inside a Clutter::Model.
-
#sorting_column ⇒ Integer
Retrieves the number of column used for sorting the model.
-
#sorting_column=(column) ⇒ nil
Sets the model to sort by column.
Instance Method Details
#append(array) ⇒ nil
Creates and appends a new row to the Clutter::Model, setting the row values upon creation. For example, to append a new row where column 0 is type %G_TYPE_INT and column 1 is of type %G_TYPE_STRING:
ClutterModel *model; model = clutter_model_default_new (2, G_TYPE_INT, "Score", G_TYPE_STRING, "Team"); clutter_model_append (model, 0, 42, 1, "Team #1", -1);
#appendv(n_columns, columns, values) ⇒ nil
Creates and appends a new row to the Clutter::Model, setting the row values for the given columns upon creation.
#filter_iter(iter) ⇒ Boolean
Checks whether the row pointer by iter should be filtered or not using the filtering function set on model.
This function should be used only by subclasses of Clutter::Model.
#filter_row(row) ⇒ Boolean
Checks whether row should be filtered or not using the filtering function set on model.
This function should be used only by subclasses of Clutter::Model.
#filter_set ⇒ Boolean
Returns whether the model has a filter in place, set using clutter_model_set_filter()
#filter_set=(filter_set) ⇒ Boolean
Whether the Clutter::Model has a filter set
This property is set to true if a filter function has been set using clutter_model_set_filter()
#filter_set? ⇒ Boolean
Whether the Clutter::Model has a filter set
This property is set to true if a filter function has been set using clutter_model_set_filter()
#first_iter ⇒ Clutter::ModelIter
Retrieves a Clutter::ModelIter representing the first non-filtered row in model.
#foreach(func, user_data) ⇒ nil
Calls func for each row in the model.
#get_column_name(column) ⇒ String
Retrieves the name of the column
#get_column_type(column) ⇒ GLib::Type
Retrieves the type of the column.
#get_iter_at_row(row) ⇒ Clutter::ModelIter
Retrieves a Clutter::ModelIter representing the row at the given index.
If a filter function has been set using clutter_model_set_filter() then the model implementation will return the first non filtered row.
#insert(row, array) ⇒ nil
Inserts a new row to the Clutter::Model at row, setting the row values upon creation. For example, to insert a new row at index 100, where column 0 is type %G_TYPE_INT and column 1 is of type %G_TYPE_STRING:
ClutterModel *model; model = clutter_model_default_new (2, G_TYPE_INT, "Score", G_TYPE_STRING, "Team"); clutter_model_insert (model, 3, 0, 42, 1, "Team #1", -1);
#insert_value(row, column, value) ⇒ nil
Sets the data in the cell specified by iter and column. The type of value must be convertable to the type of the column. If the row does not exist then it is created.
#insertv(row, n_columns, columns, values) ⇒ nil
Inserts data at row into the Clutter::Model, setting the row values for the given columns upon creation.
#last_iter ⇒ Clutter::ModelIter
Retrieves a Clutter::ModelIter representing the last non-filtered row in model.
#n_columns ⇒ Integer
Retrieves the number of columns inside model.
#n_rows ⇒ Integer
Retrieves the number of rows inside model, eventually taking into account any filtering function set using clutter_model_set_filter().
#prepend(array) ⇒ nil
Creates and prepends a new row to the Clutter::Model, setting the row values upon creation. For example, to prepend a new row where column 0 is type %G_TYPE_INT and column 1 is of type %G_TYPE_STRING:
ClutterModel *model; model = clutter_model_default_new (2, G_TYPE_INT, "Score", G_TYPE_STRING, "Team"); clutter_model_prepend (model, 0, 42, 1, "Team #1", -1);
#prependv(n_columns, columns, values) ⇒ nil
Creates and prepends a new row to the Clutter::Model, setting the row values for the given columns upon creation.
#remove(row) ⇒ nil
Removes the row at the given position from the model.
#resort ⇒ nil
Force a resort on the model. This function should only be used by subclasses of Clutter::Model.
#set_filter(func, user_data, notify) ⇒ nil
Filters the model using the given filtering function.
#set_names(n_columns, names) ⇒ nil
Assigns a name to the columns of a Clutter::Model.
This function is meant primarily for #GObjects that inherit from Clutter::Model, and should only be used when contructing a #ClutterModel. It will not work after the initial creation of the Clutter::Model.
#set_sort(column, func, user_data, notify) ⇒ nil
Sorts model using the given sorting function.
#set_types(n_columns, types) ⇒ nil
Sets the types of the columns inside a Clutter::Model.
This function is meant primarily for #GObjects that inherit from Clutter::Model, and should only be used when contructing a #ClutterModel. It will not work after the initial creation of the Clutter::Model.
#sorting_column ⇒ Integer
Retrieves the number of column used for sorting the model.
#sorting_column=(column) ⇒ nil
Sets the model to sort by column. If column is a negative value the sorting column will be unset.