|  |  |  | GNOME Data Access 5 manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
| GdauiDataStoreGdauiDataStore — Bridge between a GdaDataModel and a GtkTreeModel | 
struct GdauiDataStore; GtkTreeModel * gdaui_data_store_new (GdaDataModel *model); GdaDataProxy * gdaui_data_store_get_proxy (GdauiDataStore *store); gint gdaui_data_store_get_row_from_iter (GdauiDataStore *store,GtkTreeIter *iter); gboolean gdaui_data_store_get_iter_from_values (GdauiDataStore *store,GtkTreeIter *iter,GSList *values,gint *cols_index); gboolean gdaui_data_store_set_value (GdauiDataStore *store,GtkTreeIter *iter,gint col,const GValue *value); void gdaui_data_store_delete (GdauiDataStore *store,GtkTreeIter *iter); void gdaui_data_store_undelete (GdauiDataStore *store,GtkTreeIter *iter); gboolean gdaui_data_store_append (GdauiDataStore *store,GtkTreeIter *iter);
"model" gpointer : Read / Write / Construct Only "prepend-null-entry" gboolean : Read / Write "proxy" gpointer : Read
The GdauiDataStore object implements the GtkTreeModel interface on top of a GdaDataModel to be able to display its contents in a GtkTreeView.
GtkTreeModel *      gdaui_data_store_new                (GdaDataModel *model);
Creates a GtkTreeModel interface with a GdaDataModel
| 
 | a GdaDataModel object | 
| Returns : | the new object. [transfer full] | 
Since 4.2
GdaDataProxy *      gdaui_data_store_get_proxy          (GdauiDataStore *store);
| 
 | a GdauiDataStore object | 
| Returns : | the internal GdaDataProxy being used by store. [transfer none] | 
Since 4.2
gint gdaui_data_store_get_row_from_iter (GdauiDataStore *store,GtkTreeIter *iter);
Get the number of the row represented by iter
| 
 | a GdauiDataStore object | 
| 
 | a valid GtkTreeIter | 
| Returns : | the row number, or -1 if an error occurred | 
Since 4.2
gboolean gdaui_data_store_get_iter_from_values (GdauiDataStore *store,GtkTreeIter *iter,GSList *values,gint *cols_index);
Sets iter to the first row where all the values in values at the columns identified at
cols_index match. If the row can't be identified, then the contents of iter is not modified.
NOTE: the cols_index array MUST contain a column index for each value in values
| 
 | a GdauiDataStore object | 
| 
 | an unset GtkTreeIter to set to the requested row. [out] | 
| 
 | a list of GValue values. [element-type GValue] | 
| 
 | an array of gint containing the column number to match each value of values | 
| Returns : | TRUEif the row has been identifiediterwas set | 
Since 4.2
gboolean gdaui_data_store_set_value (GdauiDataStore *store,GtkTreeIter *iter,gint col,const GValue *value);
Stores a value in the store data model.
| 
 | a GdauiDataStore object | 
| 
 | the considered row | 
| 
 | the data model column | 
| 
 | the value to store (gets copied) | 
| Returns : | TRUEon success | 
Since 4.2
void gdaui_data_store_delete (GdauiDataStore *store,GtkTreeIter *iter);
Marks the row pointed by iter to be deleted
| 
 | a GdauiDataStore object | 
| 
 | the considered row | 
Since 4.2
void gdaui_data_store_undelete (GdauiDataStore *store,GtkTreeIter *iter);
Remove the "to be deleted" mark the row pointed by iter, if it existed.
| 
 | a GdauiDataStore object | 
| 
 | the considered row | 
Since 4.2
gboolean gdaui_data_store_append (GdauiDataStore *store,GtkTreeIter *iter);
Appends a new row.
| 
 | a GdauiDataStore object | 
| 
 | an unset GtkTreeIter to set to the appended row | 
| Returns : | TRUEif no error occurred | 
Since 4.2