MgWorkForm

MgWorkForm — Form to display and modify data provided by a SELECT query

Synopsis




            MgWorkForm;
guint       mg_work_form_get_type           (void);
GtkWidget*  mg_work_form_new                (MgQuery *query,
                                             MgTarget *modified);
GtkWidget*  mg_work_form_new_in_layout      (MgQuery *query,
                                             MgTarget *modified,
                                             GtkWidget *layout,
                                             GHashTable *box_widgets);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkVBox
                                       +----MgWorkForm

Implemented Interfaces

MgWorkForm implements AtkImplementorIface and MgWorkWidget.

Properties


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

Description

This widget uses a SELECT query and displays the results of its execution, with buttons to move within the result rows.

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

MgWorkForm

typedef struct _MgWorkForm MgWorkForm;


mg_work_form_get_type ()

guint       mg_work_form_get_type           (void);

Returns :

mg_work_form_new ()

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

Creates a new MgWorkForm 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_form_new_in_layout ()

GtkWidget*  mg_work_form_new_in_layout      (MgQuery *query,
                                             MgTarget *modified,
                                             GtkWidget *layout,
                                             GHashTable *box_widgets);

Creates a new MgWorkForm 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.

This function is similar to mg_work_form_new() but provides a GtkWidget to pack entries in. The box_widgets hash table has keys corresponding to the query fields of query, and corresponding values pointing to the GtkBox widgets where the MGDataEntry widgets will be packed.

If any of layout or box_widgets is NULL, then this function is equivalent to mg_work_form_new().

query : a MgQuery object
modified : a MgTarget object, or NULL
layout : a GtkWidget object
box_widgets : a GHashTable of GtkBox widgets
Returns : the new widget

Property Details

The "actions-visible" property

  "actions-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

See Also

The MgForm widget which is being used in this widget.