![]() | ![]() | ![]() | Libmergeant Reference Manual | ![]() |
---|
MgWorkForm — Form to display and modify data provided by a SELECT query
struct 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);
GObject +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkVBox +----MgWorkForm
"actions-visible" gboolean : Write "title-string" gchararray : Write "title-visible" gboolean : Write
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).
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.
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().
<< MgSelector | MgWorkGrid >> |