![]() |
![]() |
![]() |
Libgnomedb Reference Manual | ![]() |
---|---|---|---|---|
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);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkVBox +----GnomeDbMatrix
"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 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.
typedef enum { GNOME_DB_MATRIX_TABULAR_SYNTHETIC = 0, GNOME_DB_MATRIX_LIST_DETAILLED = 1, GNOME_DB_MATRIX_LIST_SYNTHETIC = 2, } GnomeDbMatrixType;
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 |
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 |
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