|  |  |  | libgnomedb Reference Manual |  | 
|---|
struct GnomeDbGridPrivate; void (*GnomeDbGridForeachFunc) (GnomeDbGrid *grid, gint row, gpointer user_data); GtkWidget* gnome_db_grid_new (void); GtkWidget* gnome_db_grid_new_with_model (GdaDataModel *model); const gchar* gnome_db_grid_get_title (GnomeDbGrid *grid); void gnome_db_grid_set_title (GnomeDbGrid *grid, const gchar *title); gboolean gnome_db_grid_get_show_title (GnomeDbGrid *grid); void gnome_db_grid_set_show_title (GnomeDbGrid *grid, gboolean show); GdaDataModel* gnome_db_grid_get_model (GnomeDbGrid *grid); void gnome_db_grid_set_model (GnomeDbGrid *grid, GdaDataModel *model); GList* gnome_db_grid_get_selection (GnomeDbGrid *grid); void gnome_db_grid_foreach_selected (GnomeDbGrid *grid, GnomeDbGridForeachFunc foreach_func, gpointer user_data); void gnome_db_grid_select_all (GnomeDbGrid *grid); void gnome_db_grid_unselect_all (GnomeDbGrid *grid); GtkSelectionMode gnome_db_grid_get_selection_mode (GnomeDbGrid *grid); void gnome_db_grid_set_selection_mode (GnomeDbGrid *grid, GtkSelectionMode mode); void gnome_db_grid_hide_column_titles (GnomeDbGrid *grid); void gnome_db_grid_show_column_titles (GnomeDbGrid *grid); gpointer gnome_db_grid_get_row_data (GnomeDbGrid *grid, gint row); void gnome_db_grid_set_row_data (GnomeDbGrid *grid, gint row, gpointer data); gint gnome_db_grid_find_row_from_data (GnomeDbGrid *grid, gpointer data);
void        (*GnomeDbGridForeachFunc)       (GnomeDbGrid *grid,
                                             gint row,
                                             gpointer user_data);| grid : | |
| row : | |
| user_data : | 
 | 
GtkWidget* gnome_db_grid_new_with_model (GdaDataModel *model);
| model : | |
| Returns : | 
 | 
const gchar* gnome_db_grid_get_title (GnomeDbGrid *grid);
Get the title for the given grid.
| grid : | a GnomeDbGrid widget. | 
| Returns : | the title associated with the grid. | 
void        gnome_db_grid_set_title         (GnomeDbGrid *grid,
                                             const gchar *title);Set the title for the given grid.
| grid : | a GnomeDbGrid widget. | 
| title : | new title. | 
gboolean gnome_db_grid_get_show_title (GnomeDbGrid *grid);
Get whether the title is being shown for the given grid.
| grid : | a GnomeDbGrid widget. | 
| Returns : | TRUE if the title is shown, FALSE if not. | 
void        gnome_db_grid_set_show_title    (GnomeDbGrid *grid,
                                             gboolean show);Set the title displating mode for the given grid.
| grid : | a GnomeDbGrid widget. | 
| show : | whether to show the title or not. | 
void        gnome_db_grid_set_model         (GnomeDbGrid *grid,
                                             GdaDataModel *model);| grid : | |
| model : | 
 | 
GList* gnome_db_grid_get_selection (GnomeDbGrid *grid);
Returns the list of the currently selected rows in a GnomeDbGrid widget. The returned value is a list of integers, which represent each of the selected rows.
| grid : | a GnomeDbGrid widget. | 
| Returns : | a GList of integers. This list should be freed (by calling g_list_free) when no longer needed. | 
void        gnome_db_grid_foreach_selected  (GnomeDbGrid *grid,
                                             GnomeDbGridForeachFunc foreach_func,
                                             gpointer user_data);Call the given function for each selected row in the GnomeDbGrid widget.
| grid : | a GnomeDbGrid widget. | 
| foreach_func : | function to be called for each selected row. | 
| user_data : | data to pass over to foreach_func. | 
GtkSelectionMode gnome_db_grid_get_selection_mode
                                            (GnomeDbGrid *grid);| grid : | |
| Returns : | 
 | 
void        gnome_db_grid_set_selection_mode
                                            (GnomeDbGrid *grid,
                                             GtkSelectionMode mode);| grid : | |
| mode : | 
 | 
gpointer    gnome_db_grid_get_row_data      (GnomeDbGrid *grid,
                                             gint row);Get the data associated (see gnome_db_grid_set_row_data) with the given row.
| grid : | a GnomeDbGrid widget. | 
| row : | the row to retrieve data for. | 
| Returns : | the data associated with the given row. | 
void        gnome_db_grid_set_row_data      (GnomeDbGrid *grid,
                                             gint row,
                                             gpointer data);Associate a given data pointer with the given row in the grid widget. This allows you to store context-specific data for each row on the grid.
| grid : | a GnomeDbGrid widget. | 
| row : | the row to set the data for. | 
| data : | the data. | 
| <<< gnome-db-form | GnomeDbIconList >>> |