## GnomeDbMatrix

GnomeDbMatrix — Widget to modify the assoctations between two tables

##

# Synopsis

    struct      GnomeDbMatrix;
    enum        GnomeDbMatrixType;
    GType       gnome_db_matrix_get_type        (void);
    GtkWidget*  gnome_db_matrix_new             (GnomeDbDict *dict,
                                                 GnomeDbQuery *rows_select_query,
                                                 GnomeDbTarget *rows_target,
                                                 GnomeDbQuery *cols_select_query,
                                                 GnomeDbTarget *cols_target,
                                                 GnomeDbTable *modif_table,
                                                 GSList *modif_table_fields);
    void        gnome_db_matrix_set_view_type   (GnomeDbMatrix *matrix,
                                                 GnomeDbMatrixType type);

## Object Hierarchy

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

## Implemented Interfaces

GnomeDbMatrix implements AtkImplementorIface and GnomeDbDataWidget.

## 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 GnomeDbTable table which will be modified. The widget then uses the Foreign key constraints defined in the data dictionary to define the real modification queries.

## Details

### struct GnomeDbMatrix

    struct GnomeDbMatrix;

### enum GnomeDbMatrixType

    typedef enum {
    	GNOME_DB_MATRIX_TABULAR_SYNTHETIC = 0,
    	GNOME_DB_MATRIX_LIST_DETAILLED    = 1,
    	GNOME_DB_MATRIX_LIST_SYNTHETIC    = 2,
    } GnomeDbMatrixType;

### gnome_db_matrix_get_type ()

    GType       gnome_db_matrix_get_type        (void);

Returns : |

### gnome_db_matrix_new ()

    GtkWidget*  gnome_db_matrix_new             (GnomeDbDict *dict,
                                                 GnomeDbQuery *rows_select_query,
                                                 GnomeDbTarget *rows_target,
                                                 GnomeDbQuery *cols_select_query,
                                                 GnomeDbTarget *cols_target,
                                                 GnomeDbTable *modif_table,
                                                 GSList *modif_table_fields);

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

`dict` : | a GnomeDbDict object
`rows_select_query` : |
`rows_target` : |
`cols_select_query` : |
`cols_target` : |
`modif_table` : |
`modif_table_fields` : |
Returns : | the new widget

### gnome_db_matrix_set_view_type ()

    void        gnome_db_matrix_set_view_type   (GnomeDbMatrix *matrix,
                                                 GnomeDbMatrixType type);

Select which way the `matrix` widget must present its interface

`matrix` : | a GnomeDbMatrix widget
`type` : | a GnomeDbMatrixType 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.