GnomeDbGrid

Name

GnomeDbGrid -- Data-bound grid widget

Synopsis



GtkWidget*  gnome_db_grid_new               (GdaRecordset *recset);
void        gnome_db_grid_set_background    (GnomeDbGrid *grid,
                                             gint row,
                                             GdkColor *color);
void        gnome_db_grid_set_foreground    (GnomeDbGrid *grid,
                                             gint row,
                                             GdkColor *color);
void        gnome_db_grid_select_all        (GnomeDbGrid *grid);
void        gnome_db_grid_clear_selection   (GnomeDbGrid *grid);
gint        gnome_db_grid_get_selected_rows (GnomeDbGrid *grid);
void        gnome_db_grid_copy_clipboard    (GnomeDbGrid *grid);
const gchar* gnome_db_grid_get_cell         (GnomeDbGrid *grid,
                                             gint col,
                                             gint row);
void        gnome_db_grid_set_column_visibility
                                            (GnomeDbGrid *grid,
                                             gint col,
                                             gint vis);
void        gnome_db_grid_set_row_visibility
                                            (GnomeDbGrid *grid,
                                             gint row,
                                             gint vis);
void        gnome_db_grid_hide_column_titles
                                            (GnomeDbGrid *grid);
void        gnome_db_grid_show_column_titles
                                            (GnomeDbGrid *grid);
void        gnome_db_grid_hide_row_numbers  (GnomeDbGrid *grid);
void        gnome_db_grid_show_row_numbers  (GnomeDbGrid *grid);
#define     gnome_db_grid_get_row_count     (grid)
void        gnome_db_grid_clear             (GnomeDbGrid *grid);
void        gnome_db_grid_refresh           (GnomeDbGrid *grid);
GdaRecordset* gnome_db_grid_get_recordset   (GnomeDbGrid *grid);
void        gnome_db_grid_set_recordset     (GnomeDbGrid *grid,
                                             GdaRecordset *recset);

Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GtkContainer
               +----GtkBox
                     +----GtkVBox
                           +----GnomeDbGrid

Description

Details

gnome_db_grid_new ()

GtkWidget*  gnome_db_grid_new               (GdaRecordset *recset);

Creates a new GnomeDbGrid widget, which displays the given recordset, if given

recset : recordset to be shown
Returns : a pointer to the new widget, or NULL on error


gnome_db_grid_set_background ()

void        gnome_db_grid_set_background    (GnomeDbGrid *grid,
                                             gint row,
                                             GdkColor *color);

Sets the background color of an entire row. The "color" parameter must already be allocated

grid : the grid widget
row : row number
color : color to be used as background


gnome_db_grid_set_foreground ()

void        gnome_db_grid_set_foreground    (GnomeDbGrid *grid,
                                             gint row,
                                             GdkColor *color);

Sets the foreground color of an entire row. The "color" parameter must already be allocated

grid : the grid widget
row : row number
color : color to be used as foreground


gnome_db_grid_select_all ()

void        gnome_db_grid_select_all        (GnomeDbGrid *grid);

Selects all cells in the given grid

grid : the grid widget


gnome_db_grid_clear_selection ()

void        gnome_db_grid_clear_selection   (GnomeDbGrid *grid);

grid : 


gnome_db_grid_get_selected_rows ()

gint        gnome_db_grid_get_selected_rows (GnomeDbGrid *grid);

grid : the grid widget
Returns : the number of selected rows in the given grid widget


gnome_db_grid_copy_clipboard ()

void        gnome_db_grid_copy_clipboard    (GnomeDbGrid *grid);

Copies the current selection to the clipboard

grid : the grid widget


gnome_db_grid_get_cell ()

const gchar* gnome_db_grid_get_cell         (GnomeDbGrid *grid,
                                             gint col,
                                             gint row);

grid : the grid widget
col : column number
row : row number
Returns :the text of the given cell


gnome_db_grid_set_column_visibility ()

void        gnome_db_grid_set_column_visibility
                                            (GnomeDbGrid *grid,
                                             gint col,
                                             gint vis);

Shows or hides a column in the given grid widget. The default is to show all columns

grid : the grid object
col : column to be hidden/shown
vis : hide (0) or show (1)


gnome_db_grid_set_row_visibility ()

void        gnome_db_grid_set_row_visibility
                                            (GnomeDbGrid *grid,
                                             gint row,
                                             gint vis);

Shows or hides a row in the given grid widget. The default is to show all rows

grid : the grid object
row : row to be hidden/shown vis: hide (0) or show (1)
vis : 


gnome_db_grid_hide_column_titles ()

void        gnome_db_grid_hide_column_titles
                                            (GnomeDbGrid *grid);

Hides columns in the given grid

grid : the grid widget


gnome_db_grid_show_column_titles ()

void        gnome_db_grid_show_column_titles
                                            (GnomeDbGrid *grid);

Shows columns in the given grid

grid : the grid object


gnome_db_grid_hide_row_numbers ()

void        gnome_db_grid_hide_row_numbers  (GnomeDbGrid *grid);

Hides row numbers in the given grid

grid : the grid widget


gnome_db_grid_show_row_numbers ()

void        gnome_db_grid_show_row_numbers  (GnomeDbGrid *grid);

Show row numbers in the given grid

grid : the grid widget


gnome_db_grid_get_row_count()

#define     gnome_db_grid_get_row_count(grid)

grid : 


gnome_db_grid_clear ()

void        gnome_db_grid_clear             (GnomeDbGrid *grid);

Removes all rows from the given grid

grid : the grid widget


gnome_db_grid_refresh ()

void        gnome_db_grid_refresh           (GnomeDbGrid *grid);

Refresh grid's contents

grid : the grid widget


gnome_db_grid_get_recordset ()

GdaRecordset* gnome_db_grid_get_recordset   (GnomeDbGrid *grid);

Returns the GdaRecordset object being used by this grid

grid : the grid widget
Returns : a pointer to the GdaRecordsetobject, or NULL if none is being used or if there is an error


gnome_db_grid_set_recordset ()

void        gnome_db_grid_set_recordset     (GnomeDbGrid *grid,
                                             GdaRecordset *recset);

Sets the recordset to be displayed on the given grid. The GnomeDbGrid widget keeps a reference to the GdaRecordset object, so you should call gda_recordset_free after successfully calling this function when you no longer need the reference to the GdaRecordset object.

grid : the grid widget
recset : recordset to be displayed