MgWorkGrid

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

Synopsis




            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
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkVBox
                                       +----MgWorkGrid

Implemented Interfaces

MgWorkGrid implements AtkImplementorIface and MgWorkWidget.

Properties


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

Signals


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

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

MgWorkGrid

typedef struct _MgWorkGrid 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 :

Property Details

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

Signal Details

The "selection-changed" signal

void        user_function                  (MgWorkGrid *mgworkgrid,
                                            gboolean    arg1,
                                            gpointer    user_data)       : Run first

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