![]() |
![]() |
![]() |
Libmergeant Reference Manual | ![]() |
---|
MgWorkMatrixMgWorkMatrix — Widget to modify the assoctations between two tables |
MgWorkMatrix; enum MgWorkMatrixType; guint mg_work_matrix_get_type (void); GtkWidget* mg_work_matrix_new (MgConf *conf, MgQuery *rows_select_query, MgTarget *rows_target, MgQuery *cols_select_query, MgTarget *cols_target, MgDbTable *modif_table, GSList *modif_table_fields); void mg_work_matrix_set_view_type (MgWorkMatrix *matrix, MgWorkMatrixType type);
GObject +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkVBox +----MgWorkMatrix
"assoc-data-only" gboolean : Write "layout-nb-columns" gint : Read / Write "title-string" gchararray : Write "title-visible" gboolean : Write
This widget provides an easy way of modifying the contents of an association table (a table which purpose is to store the primary keys of two or more tables, as foreign keys, and optionnaly some associated data).
Upon widget creation, the SELECT queries limiting the values of the two associated tables are required, as well as the MgDbTable table which will be modified. The widget then uses the Foreign key constraints defined in the data dictionnary to define the real modification queries.
typedef enum { MG_WORK_MATRIX_TABULAR_SYNTHETIC = 0, MG_WORK_MATRIX_LIST_DETAILLED = 1, MG_WORK_MATRIX_LIST_SYNTHETIC = 2, } MgWorkMatrixType;
GtkWidget* mg_work_matrix_new (MgConf *conf, MgQuery *rows_select_query, MgTarget *rows_target, MgQuery *cols_select_query, MgTarget *cols_target, MgDbTable *modif_table, GSList *modif_table_fields);
Creates a new MgWorkMatrix widget.
rows_select_query
and cols_select_query
must be SELECT queries, from their results depend what
will be displayed in each row and column of the associated matrix widget.
The rows_target
and cols_target
targets are used as reference for primary key values.
conf : |
a MgConf object |
rows_select_query : |
|
rows_target : |
|
cols_select_query : |
|
cols_target : |
|
modif_table : |
|
modif_table_fields : |
|
Returns : | the new widget |
void mg_work_matrix_set_view_type (MgWorkMatrix *matrix, MgWorkMatrixType type);
Select which way the matrix
widget must present its interface
matrix : |
a MgWorkMatrix widget |
type : |
a MgWorkMatrixType value |
assoc-data-only
" property"assoc-data-only" gboolean : Write
Disallow INSERT and DELETE on the modified table.
Default value: FALSE
layout-nb-columns
" property"layout-nb-columns" gint : Read / Write
Number of columns when the chosen view involves a table layout.
Allowed values: >= 0
Default value: 4
title-string
" property"title-string" gchararray : Write
String to display in the widget's title.
Default value: NULL
title-visible
" property"title-visible" gboolean : Write
Show of hide the title of the widget.
Default value: FALSE
<< MgWorkGrid | MgWorkLayout >> |