|  |  |  | libgnomedb Reference Manual |  | 
|---|
| GnomeDbGridGnomeDbGrid — Database grid widget | 
            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);
void        gnome_db_grid_set_column_title  (GnomeDbGrid *grid,
                                             gint col,
                                             const gchar *title);
const gchar* gnome_db_grid_get_column_title (GnomeDbGrid *grid,
                                             gint col);
gboolean    gnome_db_grid_get_show_title    (GnomeDbGrid *grid);
void        gnome_db_grid_set_show_title    (GnomeDbGrid *grid,
                                             gboolean show);
void        gnome_db_grid_set_title_icon_from_file
                                            (GnomeDbGrid *grid,
                                             const gchar *file);
void        gnome_db_grid_set_title_icon_from_stock
                                            (GnomeDbGrid *grid,
                                             const gchar *stock_id,
                                             GtkIconSize size);
void        gnome_db_grid_set_show_title_icon
                                            (GnomeDbGrid *grid,
                                             gboolean show);
gboolean    gnome_db_grid_get_show_title_icon
                                            (GnomeDbGrid *grid);
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_row        (GnomeDbGrid *grid,
                                             gint row);
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_set_column_titles_visible
                                            (GnomeDbGrid *grid,
                                             gboolean visible);
gboolean    gnome_db_grid_get_column_titles_visible
                                            (GnomeDbGrid *grid);
#define     gnome_db_grid_show_column_titles(grid)
#define     gnome_db_grid_hide_column_titles(grid)
void        gnome_db_grid_set_column_visible
                                            (GnomeDbGrid *grid,
                                             gint col,
                                             gboolean visible);
gboolean    gnome_db_grid_get_column_visible
                                            (GnomeDbGrid *grid,
                                             gint col);
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 (void);
Create a GnomeDbGrid.
| Returns : | a GtkWidget widget. | 
GtkWidget* gnome_db_grid_new_with_model (GdaDataModel *model);
Create a GnomeDbGrid with a GdaDataModel.
| model : | a GdaDataModel variable. | 
| Returns : | a GtkWidget widget. | 
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. | 
void gnome_db_grid_set_column_title (GnomeDbGrid *grid, gint col, const gchar *title);
Sets the title for a column
| grid : | a GnomeDbGrid widget | 
| col : | the number of the column to change the title | 
| title : | the new title for this column | 
const gchar* gnome_db_grid_get_column_title (GnomeDbGrid *grid, gint col);
Get the title of a column
| grid : | a GnomeDbGrid widget | 
| col : | the number of the column to get the title | 
| Returns : | the title of a column. | 
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 displaying mode for the given grid.
| grid : | a GnomeDbGrid widget. | 
| show : | whether to show the title or not. | 
void        gnome_db_grid_set_title_icon_from_file
                                            (GnomeDbGrid *grid,
                                             const gchar *file);Set the icon for the given grid.
| grid : | a GnomeDbGrid widget. | 
| file : | image filename. | 
void        gnome_db_grid_set_title_icon_from_stock
                                            (GnomeDbGrid *grid,
                                             const gchar *stock_id,
                                             GtkIconSize size);Set the icon using a stock icon for the given grid.
| grid : | a GnomeDbGrid widget. | 
| stock_id : | a stock icon name. | 
| size : | a stock icon size. | 
void        gnome_db_grid_set_show_title_icon
                                            (GnomeDbGrid *grid,
                                             gboolean show);Set the icon displaying mode for the given grid.
| grid : | a GnomeDbGrid widget. | 
| show : | whether to show the icon or not. | 
gboolean    gnome_db_grid_get_show_title_icon
                                            (GnomeDbGrid *grid);Get whether the icon is being shown for the given grid.
| grid : | a GnomeDbGrid widget. | 
| Returns : | TRUE if the icon is shown, FALSE if not. | 
GdaDataModel* gnome_db_grid_get_model (GnomeDbGrid *grid);
Retrieve the GdaDataModel associated with this GnomeDbGrid.
| grid : | a GnomeDbGrid widget. | 
| Returns : | a GdaDataModel widget. | 
void gnome_db_grid_set_model (GnomeDbGrid *grid, GdaDataModel *model);
Set the new model for the given grid.
| grid : | a GnomeDbGrid widget. | 
| model : | a GdaDataModel widget. | 
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. | 
void gnome_db_grid_select_row (GnomeDbGrid *grid, gint row);
Select the given row in the GnomeDbGrid widget.
| grid : | a GnomeDbGrid widget. | 
| row : | the number of the row to be selected. | 
void gnome_db_grid_select_all (GnomeDbGrid *grid);
Select all rows in the GnomeDbGrid widget.
| grid : | a GnomeDbGrid widget. | 
void gnome_db_grid_unselect_all (GnomeDbGrid *grid);
Unselect all rows of the GnomeDbGrid widget.
| grid : | a GnomeDbGrid widget. | 
GtkSelectionMode gnome_db_grid_get_selection_mode
                                            (GnomeDbGrid *grid);Retrieve the selection mode of a GnomeDbGrid widget.
| grid : | a GnomeDbGrid widget. | 
| Returns : | a GtkSelectionMode widget. | 
void        gnome_db_grid_set_selection_mode
                                            (GnomeDbGrid *grid,
                                             GtkSelectionMode mode);
| grid : | |
| mode : | 
void        gnome_db_grid_set_column_titles_visible
                                            (GnomeDbGrid *grid,
                                             gboolean visible);Hide or Show the titles of the GnomeDbGrid widget.
| grid : | a GnomeDbGrid widget. | 
| visible : | a gboolean. | 
gboolean    gnome_db_grid_get_column_titles_visible
                                            (GnomeDbGrid *grid);Retrieve a gboolean ( TRUE or FALSE ).
| grid : | a GnomeDbGrid widget. | 
| Returns : | 
void        gnome_db_grid_set_column_visible
                                            (GnomeDbGrid *grid,
                                             gint col,
                                             gboolean visible);Hide or Show the column "col" of the GnomeDbGrid widget.
| grid : | a GnomeDbGrid widget. | 
| col : | column number. | 
| visible : | a gboolean. | 
gboolean    gnome_db_grid_get_column_visible
                                            (GnomeDbGrid *grid,
                                             gint col);Retrieve a gboolean ( TRUE or FALSE ).
| grid : | a GnomeDbGrid widget. | 
| col : | column number. | 
| Returns : | 
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. | 
gint        gnome_db_grid_find_row_from_data
                                            (GnomeDbGrid *grid,
                                             gpointer data);Find the row number for the row to which the given data is associated.
| grid : | a GnomeDbGrid widget. | 
| data : | data to search for. | 
| Returns : | the row number if found, or -1 if not. | 
| << GnomeDbFindDialog | GnomeDbIconList >> |