## GnomeDbBasicForm GnomeDbBasicForm — A GUI form to present data in a GdaSet |

## Synopsis

                        GnomeDbBasicForm;
                        GnomeDbBasicFormClass;
                        GnomeDbBasicFormPriv;
    GtkWidget *         gnome_db_basic_form_new             (GdaSet *data_set);
    GtkWidget *         gnome_db_basic_form_new_custom      (GdaSet *data_set,
                                                             const gchar *glade_file,
                                                             const gchar *root_element,
                                                             const gchar *form_prefix);
    GtkWidget *         gnome_db_basic_form_new_in_dialog   (GdaSet *data_set,
                                                             GtkWindow *parent,
                                                             const gchar *title,
                                                             const gchar *header);
    GdaSet *            gnome_db_basic_form_get_data_set    (GnomeDbBasicForm *form);
    gboolean            gnome_db_basic_form_is_valid        (GnomeDbBasicForm *form);
    gboolean            gnome_db_basic_form_has_been_changed
                                                            (GnomeDbBasicForm *form);
    void                gnome_db_basic_form_reset           (GnomeDbBasicForm *form);
    void                gnome_db_basic_form_set_current_as_orig
                                                            (GnomeDbBasicForm *form);

    void                gnome_db_basic_form_entry_show      (GnomeDbBasicForm *form,
                                                             GdaHolder *param,
                                                             gboolean show);
    void                gnome_db_basic_form_entry_grab_focus
                                                            (GnomeDbBasicForm *form,
                                                             GdaHolder *param);
    void                gnome_db_basic_form_entry_set_editable
                                                            (GnomeDbBasicForm *form,
                                                             GdaHolder *param,
                                                             gboolean editable);
    void                gnome_db_basic_form_set_entries_auto_default
                                                            (GnomeDbBasicForm *form,
                                                             gboolean auto_default);
    void                gnome_db_basic_form_set_entries_default
                                                            (GnomeDbBasicForm *form);
    GtkWidget *         gnome_db_basic_form_get_entry_widget
                                                            (GnomeDbBasicForm *form,
                                                             GdaHolder *param);
    GtkWidget *         gnome_db_basic_form_get_label_widget
                                                            (GnomeDbBasicForm *form,
                                                             GdaHolder *param);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBox
                                     +----GtkVBox
                                           +----GnomeDbBasicForm
                                                 +----GnomeDbRawForm

## Implemented Interfaces

GnomeDbBasicForm implements GtkBuildable, GtkOrientable and AtkImplementorIface.

## Properties

      "data-layout"              gpointer              : Write
      "entries-auto-default"     gboolean              : Read / Write
      "headers-sensitive"        gboolean              : Read / Write
      "layout-spec"              gpointer              : Write
      "paramlist"                gpointer              : Read / Write
      "show-actions"             gboolean              : Read / Write

## Signals

      "activated"                                      : Run First
      "param-changed"                                  : Run First

## Description

## Details

### GnomeDbBasicForm

    typedef struct _GnomeDbBasicForm GnomeDbBasicForm;

### GnomeDbBasicFormClass

    typedef struct {
    	GtkVBoxClass          parent_class;

    	/* signals */
            void       (*param_changed)         (GnomeDbBasicForm *form, GdaHolder *param, gboolean is_user_modif);
    	void       (*activated)             (GnomeDbBasicForm *form);
    } GnomeDbBasicFormClass;

### GnomeDbBasicFormPriv

    typedef struct _GnomeDbBasicFormPriv GnomeDbBasicFormPriv;

### gnome_db_basic_form_new ()

    GtkWidget *         gnome_db_basic_form_new             (GdaSet *data_set);

Creates a new GnomeDbBasicForm widget using all the parameters provided in `paramlist`.

The global layout is rendered using a table (a GtkTable), and an entry is created for each node of `paramlist`.

`data_set` : |
Returns : | the new widget

### gnome_db_basic_form_new_custom ()

    GtkWidget *         gnome_db_basic_form_new_custom      (GdaSet *data_set,
                                                             const gchar *glade_file,
                                                             const gchar *root_element,
                                                             const gchar *form_prefix);

Creates a new GnomeDbBasicForm widget using all the parameters provided in `paramlist`.

The layout is specified in the `glade_file` specification, and an entry is created for each node of `paramlist`.

`data_set` : |
`glade_file` : | a Glade XML file name
`root_element` : | the name of the top-most widget in `glade_file` to use in the new form
`form_prefix` : | the prefix used to look for widgets to add entries in
Returns : | the new widget

### gnome_db_basic_form_new_in_dialog ()

    GtkWidget *         gnome_db_basic_form_new_in_dialog   (GdaSet *data_set,
                                                             GtkWindow *parent,
                                                             const gchar *title,
                                                             const gchar *header);

Creates a new GnomeDbBasicForm widget in the same way as `gnome_db_basic_form_new()` and puts it into a GtkDialog widget. The returned dialog has the "Ok" and "Cancel" buttons which respectively return GTK_RESPONSE_ACCEPT and GTK_RESPONSE_REJECT.

The GnomeDbBasicForm widget is attached to the dialog using the user property "form".

`data_set` : |
`parent` : | the parent window for the new dialog, or `NULL`
`title` : | the title of the dialog window, or `NULL`
`header` : | a helper text displayed at the top of the dialog, or `NULL`
Returns : | the new GtkDialog widget

### gnome_db_basic_form_get_data_set ()

    GdaSet *            gnome_db_basic_form_get_data_set    (GnomeDbBasicForm *form);

Get a pointer to the GdaSet object which is modified by `form`

`form` : | a GnomeDbBasicForm widget
Returns : |

### gnome_db_basic_form_is_valid ()

    gboolean            gnome_db_basic_form_is_valid        (GnomeDbBasicForm *form);

Tells if the form can be used as-is (if all the parameters do have some valid values)

`form` : | a GnomeDbBasicForm widget
Returns : | TRUE if the form is valid

### gnome_db_basic_form_has_been_changed ()

    gboolean            gnome_db_basic_form_has_been_changed
                                                            (GnomeDbBasicForm *form);

Tells if the form has had at least on entry changed, or not

`form` : | a GnomeDbBasicForm widget
Returns : |

### gnome_db_basic_form_reset ()

    void                gnome_db_basic_form_reset           (GnomeDbBasicForm *form);

Resets all the entries in the form to their original values

`form` : | a GnomeDbBasicForm widget

### gnome_db_basic_form_set_current_as_orig ()

    void                gnome_db_basic_form_set_current_as_orig
                                                            (GnomeDbBasicForm *form);

Tells `form` that the current values in the different entries are to be considered as the original values for all the entries; the immediate consequence is that any sub-sequent call to `gnome_db_basic_form_has_been_changed()` will return FALSE (of course until any entry is changed).

`form` : | a GnomeDbBasicForm widget

### gnome_db_basic_form_entry_show ()

    void                gnome_db_basic_form_entry_show      (GnomeDbBasicForm *form,
                                                             GdaHolder *param,
                                                             gboolean show);

Shows or hides the GnomeDbDataEntry in `form` which corresponds to the `param` parameter

`form` : | a GnomeDbBasicForm widget
`param` : | a GdaHolder object
`show` : |

### gnome_db_basic_form_entry_grab_focus ()

    void                gnome_db_basic_form_entry_grab_focus
                                                            (GnomeDbBasicForm *form,
                                                             GdaHolder *param);

Makes the data entry corresponding to `param` grab the focus for the window it's in

`form` : | a GnomeDbBasicForm widget
`param` : | a GdaHolder object

### gnome_db_basic_form_entry_set_editable ()

    void                gnome_db_basic_form_entry_set_editable
                                                            (GnomeDbBasicForm *form,
                                                             GdaHolder *param,
                                                             gboolean editable);

Sets the GnomeDbDataEntry in `form` which corresponds to the `param` parameter editable or not

`form` : | a GnomeDbBasicForm widget
`param` : | a GdaHolder object
`editable` : | `TRUE` if corresponding data entry must be editable

### gnome_db_basic_form_set_entries_auto_default ()

    void                gnome_db_basic_form_set_entries_auto_default
                                                            (GnomeDbBasicForm *form,
                                                             gboolean auto_default);

Sets weather all the GnomeDbDataEntry entries in the form must default to a default value if they are assigned a non valid value. Depending on the real type of entry, it will provide a default value which the user does not need to modify if it is OK.

For example a date entry can by default display the current date.

`form` : | a GnomeDbBasicForm widget
`auto_default` : |

### gnome_db_basic_form_set_entries_default ()

    void                gnome_db_basic_form_set_entries_default
                                                            (GnomeDbBasicForm *form);

For each entry in the form, sets it to a default value if it is possible to do so.

`form` : | a GnomeDbBasicForm widget

### gnome_db_basic_form_get_entry_widget ()

    GtkWidget *         gnome_db_basic_form_get_entry_widget
                                                            (GnomeDbBasicForm *form,
                                                             GdaHolder *param);

Get the GnomeDbDataEntry in `form` which corresponds to the param parameter.

`form` : | a GnomeDbBasicForm widget
`param` : | a GdaHolder object
Returns : | the requested widget, or `NULL` if not found

### gnome_db_basic_form_get_label_widget ()

    GtkWidget *         gnome_db_basic_form_get_label_widget
                                                            (GnomeDbBasicForm *form,
                                                             GdaHolder *param);

Get the label in `form` which corresponds to the param parameter.

`form` : | a GnomeDbBasicForm widget
`param` : | a GdaHolder object
Returns : | the requested widget, or `NULL` if not found

## Property Details

### The `"data-layout"` property

      "data-layout"              gpointer              : Write

### The `"entries-auto-default"` property

      "entries-auto-default"     gboolean              : Read / Write

Default value: FALSE

### The `"headers-sensitive"` property

      "headers-sensitive"        gboolean              : Read / Write

Default value: FALSE

### The `"layout-spec"` property

      "layout-spec"              gpointer              : Write

### The `"paramlist"` property

      "paramlist"                gpointer              : Read / Write

### The `"show-actions"` property

      "show-actions"             gboolean              : Read / Write

Default value: FALSE

## Signal Details

### The `"activated"` signal

    void                user_function                      (GnomeDbBasicForm *dbbasicform,
                                                            gpointer          user_data)        : Run First

`dbbasicform` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"param-changed"` signal

    void                user_function                      (GnomeDbBasicForm *form,
                                                            GdaHolder        *param,
                                                            gboolean          is_user_modif,
                                                            gpointer          user_data)          : Run First

Emitted when a GdaHolder changes

`form` : | GnomeDbBasicForm
`param` : | that changed
`is_user_modif` : | TRUE if the modification has been initiated by a user modification
`user_data` : | user data set when the signal handler was connected.