MgWorkMatrix

MgWorkMatrix — Widget to modify the assoctations between two tables

Synopsis




struct      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);

Object Hierarchy


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

Implemented Interfaces

MgWorkMatrix implements MgWorkWidget and AtkImplementorIface.

Properties


  "assoc-data-only"      gboolean             : Write
  "layout-nb-columns"    gint                 : Read / Write
  "title-string"         gchararray           : Write
  "title-visible"        gboolean             : Write

Description

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.

Details

struct MgWorkMatrix

struct MgWorkMatrix;


enum MgWorkMatrixType

typedef enum {
	MG_WORK_MATRIX_TABULAR_SYNTHETIC = 0,
	MG_WORK_MATRIX_LIST_DETAILLED    = 1,
	MG_WORK_MATRIX_LIST_SYNTHETIC    = 2,
} MgWorkMatrixType;


mg_work_matrix_get_type ()

guint       mg_work_matrix_get_type         (void);

Returns :

mg_work_matrix_new ()

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

mg_work_matrix_set_view_type ()

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

Properties

"assoc-data-only" (gboolean : Write)

Disallow INSERT and DELETE on the modified table.

"layout-nb-columns" (gint : Read / Write)

Number of columns when the chosen view involves a table layout.

"title-string" (gchararray : Write)

String to display in the widget's title.

"title-visible" (gboolean : Write)

Show of hide the title of the widget.