MgWorkGrid

MgWorkGrid — Grid (tabular view) to display and modify data provided by a SELECT query

Synopsis




struct      MgWorkGrid;
guint       mg_work_grid_get_type           (void);
GtkWidget*  mg_work_grid_new                (MgQuery *query,
                                             MgTarget *modified);
void        mg_work_grid_set_sample_size    (MgWorkGrid *grid,
                                             gint sample_size);
void        mg_work_grid_set_sample_start   (MgWorkGrid *grid,
                                             gint sample_start);

Object Hierarchy


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

Implemented Interfaces

MgWorkGrid implements MgWorkWidget and AtkImplementorIface.

Properties


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

Signal Prototypes


"selection-changed"
            void        user_function      (MgWorkGrid *mgworkgrid,
                                            gboolean arg1,
                                            gpointer user_data);

Description

This widget uses a SELECT query and displays the results of its execution, in a tabular view (one row per result).

Optionnaly, if a table to be modified (identified through a MgTarget object) is provided, the widget allows the user to perform some modification actions on the data (UPDATE, DELETE, INSERT operations). In this case, the queries to perform the modifications are built by the widget and do not need to be provided by the programmer (they are computed by the MgWorkCore object).

Details

struct MgWorkGrid

struct MgWorkGrid;


mg_work_grid_get_type ()

guint       mg_work_grid_get_type           (void);

Returns :

mg_work_grid_new ()

GtkWidget*  mg_work_grid_new                (MgQuery *query,
                                             MgTarget *modified);

Creates a new MgWorkGrid widget.

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

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

query : a MgQuery object
modified : a MgTarget object, or NULL
Returns : the new widget

mg_work_grid_set_sample_size ()

void        mg_work_grid_set_sample_size    (MgWorkGrid *grid,
                                             gint sample_size);

grid :
sample_size :

mg_work_grid_set_sample_start ()

void        mg_work_grid_set_sample_start   (MgWorkGrid *grid,
                                             gint sample_start);

grid :
sample_start :

Properties

"actions-visible" (gboolean : Write)

"info-cell-visible" (gboolean : Write)

"title-string" (gchararray : Write)

"title-visible" (gboolean : Write)

Signals

The "selection-changed" signal

void        user_function                  (MgWorkGrid *mgworkgrid,
                                            gboolean arg1,
                                            gpointer user_data);

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