GnomeDbGrid

GnomeDbGrid — Database grid widget

Synopsis




void        (*GnomeDbGridForeachFunc)       (GnomeDbGrid *grid,
                                             gint row,
                                             gpointer user_data);
            GnomeDbGrid;
GtkWidget*  gnome_db_grid_new               (void);
GtkWidget*  gnome_db_grid_new_with_select_query
                                            (GnomeDbQuery *query,
                                             GnomeDbTarget *modified);
GtkWidget*  gnome_db_grid_new_with_gda_model
                                            (GnomeDbDict *dict,
                                             GdaDataModel *model);
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);
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);
void        gnome_db_grid_set_model         (GnomeDbGrid *grid,
                                             GnomeDbDataModel *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);

Object Hierarchy


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

Implemented Interfaces

GnomeDbGrid implements AtkImplementorIface and GnomeDbDataWidget.

Properties


  "actions-visible"      gboolean              : Write
  "info-cell-visible"    gboolean              : Write
  "title-string"         gchararray            : Write
  "title-visible"        gboolean              : Write

Signal Prototypes


"create-popup-menu"
            void        user_function      (GnomeDbGrid *dbgrid,
                                            gpointer arg1,
                                            gpointer user_data);
"double-clicked"
            void        user_function      (GnomeDbGrid *dbgrid,
                                            gint arg1,
                                            gpointer user_data);
"selection-changed"
            void        user_function      (GnomeDbGrid *dbgrid,
                                            gboolean arg1,
                                            gpointer user_data);

Description

Details

GnomeDbGridForeachFunc ()

void        (*GnomeDbGridForeachFunc)       (GnomeDbGrid *grid,
                                             gint row,
                                             gpointer user_data);

grid :
row :
user_data :

GnomeDbGrid

typedef struct _GnomeDbGrid GnomeDbGrid;


gnome_db_grid_new ()

GtkWidget*  gnome_db_grid_new               (void);

Creates a new GnomeDbGrid widget

Returns : the new widget

gnome_db_grid_new_with_select_query ()

GtkWidget*  gnome_db_grid_new_with_select_query
                                            (GnomeDbQuery *query,
                                             GnomeDbTarget *modified);

Creates a new GnomeDbGrid widget.

query must be a SELECT query (no union, etc selection query)

The modified target must belong to query and represent modifiable entity (a GnomeDbTable for example). If modified is NULL then no modification will be allowed.

query : a GnomeDbQuery object
modified : a GnomeDbTarget object, or NULL
Returns : the new widget

gnome_db_grid_new_with_gda_model ()

GtkWidget*  gnome_db_grid_new_with_gda_model
                                            (GnomeDbDict *dict,
                                             GdaDataModel *model);

Creates a new GnomeDbGrid widget suitable to display the data in model

dict : a GnomeDbDict dictionnary, or NULL
model : a GdaDataModel
Returns : the new widget

gnome_db_grid_set_title ()

void        gnome_db_grid_set_title         (GnomeDbGrid *grid,
                                             const gchar *title);

grid :
title :

gnome_db_grid_set_column_title ()

void        gnome_db_grid_set_column_title  (GnomeDbGrid *grid,
                                             gint col,
                                             const gchar *title);

grid :
col :
title :

gnome_db_grid_get_column_title ()

const gchar* gnome_db_grid_get_column_title (GnomeDbGrid *grid,
                                             gint col);

grid :
col :
Returns :

gnome_db_grid_set_show_title ()

void        gnome_db_grid_set_show_title    (GnomeDbGrid *grid,
                                             gboolean show);

grid :
show :

gnome_db_grid_set_title_icon_from_file ()

void        gnome_db_grid_set_title_icon_from_file
                                            (GnomeDbGrid *grid,
                                             const gchar *file);

grid :
file :

gnome_db_grid_set_title_icon_from_stock ()

void        gnome_db_grid_set_title_icon_from_stock
                                            (GnomeDbGrid *grid,
                                             const gchar *stock_id,
                                             GtkIconSize size);

grid :
stock_id :
size :

gnome_db_grid_set_show_title_icon ()

void        gnome_db_grid_set_show_title_icon
                                            (GnomeDbGrid *grid,
                                             gboolean show);

grid :
show :

gnome_db_grid_get_show_title_icon ()

gboolean    gnome_db_grid_get_show_title_icon
                                            (GnomeDbGrid *grid);

grid :
Returns :

gnome_db_grid_set_model ()

void        gnome_db_grid_set_model         (GnomeDbGrid *grid,
                                             GnomeDbDataModel *model);

grid :
model :

gnome_db_grid_get_selection ()

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.

If new rows have been inserted, then those new rows will have a row number equal to -1.

grid : a GnomeDbGrid widget
Returns : a new list, should be freed (by calling g_list_free) when no longer needed.

gnome_db_grid_foreach_selected ()

void        gnome_db_grid_foreach_selected  (GnomeDbGrid *grid,
                                             GnomeDbGridForeachFunc foreach_func,
                                             gpointer user_data);

grid :
foreach_func :
user_data :

gnome_db_grid_select_all ()

void        gnome_db_grid_select_all        (GnomeDbGrid *grid);

grid :

gnome_db_grid_unselect_all ()

void        gnome_db_grid_unselect_all      (GnomeDbGrid *grid);

grid :

Properties

The "actions-visible" property

  "actions-visible"      gboolean              : Write

Default value: FALSE


The "info-cell-visible" property

  "info-cell-visible"    gboolean              : Write

Default value: FALSE


The "title-string" property

  "title-string"         gchararray            : Write

Default value: NULL


The "title-visible" property

  "title-visible"        gboolean              : Write

Default value: FALSE

Signals

The "create-popup-menu" signal

void        user_function                  (GnomeDbGrid *dbgrid,
                                            gpointer arg1,
                                            gpointer user_data);

dbgrid :the object which received the signal.
arg1 :
user_data :user data set when the signal handler was connected.

The "double-clicked" signal

void        user_function                  (GnomeDbGrid *dbgrid,
                                            gint arg1,
                                            gpointer user_data);

dbgrid :the object which received the signal.
arg1 :
user_data :user data set when the signal handler was connected.

The "selection-changed" signal

void        user_function                  (GnomeDbGrid *dbgrid,
                                            gboolean arg1,
                                            gpointer user_data);

dbgrid :the object which received the signal.
arg1 :
user_data :user data set when the signal handler was connected.