| GNOME Data Access 4 manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals | ||||
GdauiBasicFormGdauiBasicForm — Form widget mapping the values contained in a GdaSet |
![]() |
GdauiBasicForm;
GdauiFormLayoutSpec;
GtkWidget * gdaui_basic_form_new (GdaSet *data_set);
GtkWidget * gdaui_basic_form_new_custom (GdaSet *data_set,
const gchar *glade_file,
const gchar *root_element,
const gchar *form_prefix);
GtkWidget * gdaui_basic_form_new_in_dialog (GdaSet *data_set,
GtkWindow *parent,
const gchar *title,
const gchar *header);
GdaSet * gdaui_basic_form_get_data_set (GdauiBasicForm *form);
gboolean gdaui_basic_form_is_valid (GdauiBasicForm *form);
gboolean gdaui_basic_form_has_been_changed (GdauiBasicForm *form);
void gdaui_basic_form_reset (GdauiBasicForm *form);
void gdaui_basic_form_set_current_as_orig
(GdauiBasicForm *form);
void gdaui_basic_form_show_entry_actions (GdauiBasicForm *form,
gboolean show_actions);
void gdaui_basic_form_entry_show (GdauiBasicForm *form,
GdaHolder *param,
gboolean show);
void gdaui_basic_form_entry_grab_focus (GdauiBasicForm *form,
GdaHolder *param);
void gdaui_basic_form_entry_set_editable (GdauiBasicForm *form,
GdaHolder *param,
gboolean editable);
void gdaui_basic_form_set_entries_auto_default
(GdauiBasicForm *form,
gboolean auto_default);
void gdaui_basic_form_set_entries_default
(GdauiBasicForm *form);
GtkWidget * gdaui_basic_form_get_entry_widget (GdauiBasicForm *form,
GdaHolder *param);
GtkWidget * gdaui_basic_form_get_label_widget (GdauiBasicForm *form,
GdaHolder *param);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkVBox +----GdauiBasicForm
GdauiBasicForm implements GtkBuildable, GtkOrientable and AtkImplementorIface.
"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
typedef struct {
#ifdef HAVE_LIBGLADE
GladeXML *xml_object; /* one of xml_object or */
#endif
gchar *xml_file; /* xml_file is required */
gchar *root_element; /* required */
gchar *form_prefix; /* required */
} GdauiFormLayoutSpec;
GtkWidget * gdaui_basic_form_new (GdaSet *data_set);
Creates a new GdauiBasicForm 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.
|
|
Returns : |
the new widget |
GtkWidget * gdaui_basic_form_new_custom (GdaSet *data_set, const gchar *glade_file, const gchar *root_element, const gchar *form_prefix);
Creates a new GdauiBasicForm 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.
|
|
|
a Glade XML file name |
|
the name of the top-most widget in glade_file to use in the new form
|
|
the prefix used to look for widgets to add entries in |
Returns : |
the new widget |
GtkWidget * gdaui_basic_form_new_in_dialog (GdaSet *data_set, GtkWindow *parent, const gchar *title, const gchar *header);
Creates a new GdauiBasicForm widget in the same way as gdaui_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 GdauiBasicForm widget is attached to the dialog using the user property "form".
GdaSet * gdaui_basic_form_get_data_set (GdauiBasicForm *form);
Get a pointer to the GdaSet object which
is modified by form
|
a GdauiBasicForm widget |
Returns : |
gboolean gdaui_basic_form_is_valid (GdauiBasicForm *form);
Tells if the form can be used as-is (if all the parameters do have some valid values)
|
a GdauiBasicForm widget |
Returns : |
TRUE if the form is valid |
gboolean gdaui_basic_form_has_been_changed (GdauiBasicForm *form);
Tells if the form has had at least on entry changed, or not
|
a GdauiBasicForm widget |
Returns : |
void gdaui_basic_form_reset (GdauiBasicForm *form);
Resets all the entries in the form to their original values
|
a GdauiBasicForm widget |
void gdaui_basic_form_set_current_as_orig
(GdauiBasicForm *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 gdaui_basic_form_has_been_changed()
will return FALSE (of course until any entry is changed).
|
a GdauiBasicForm widget |
void gdaui_basic_form_show_entry_actions (GdauiBasicForm *form, gboolean show_actions);
Show or hide the actions button available at the end of each data entry in the form
|
a GdauiBasicForm widget |
|
a boolean |
void gdaui_basic_form_entry_show (GdauiBasicForm *form, GdaHolder *param, gboolean show);
Shows or hides the GdauiDataEntry in form which corresponds to the
param parameter
|
a GdauiBasicForm widget |
|
a GdaHolder object |
|
void gdaui_basic_form_entry_grab_focus (GdauiBasicForm *form, GdaHolder *param);
Makes the data entry corresponding to param grab the focus for the window it's in
|
a GdauiBasicForm widget |
|
a GdaHolder object |
void gdaui_basic_form_entry_set_editable (GdauiBasicForm *form, GdaHolder *param, gboolean editable);
Sets the GdauiDataEntry in form which corresponds to the
param parameter editable or not. If param is NULL, then all the parameters
are concerned.
|
a GdauiBasicForm widget |
|
a GdaHolder object; or NULL
|
|
TRUE if corresponding data entry must be editable
|
void gdaui_basic_form_set_entries_auto_default
(GdauiBasicForm *form,
gboolean auto_default);
Sets weather all the GdauiDataEntry 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.
|
a GdauiBasicForm widget |
|
void gdaui_basic_form_set_entries_default
(GdauiBasicForm *form);
For each entry in the form, sets it to a default value if it is possible to do so.
|
a GdauiBasicForm widget |
GtkWidget * gdaui_basic_form_get_entry_widget (GdauiBasicForm *form, GdaHolder *param);
Get the GdauiDataEntry in form which corresponds to the param parameter.
|
a GdauiBasicForm widget |
|
a GdaHolder object |
Returns : |
the requested widget, or NULL if not found
|
GtkWidget * gdaui_basic_form_get_label_widget (GdauiBasicForm *form, GdaHolder *param);
Get the label in form which corresponds to the param parameter.
|
a GdauiBasicForm widget |
|
a GdaHolder object |
Returns : |
the requested widget, or NULL if not found
|
"entries-auto-default" property"entries-auto-default" gboolean : Read / Write
Default value: FALSE
"activated" signalvoid user_function (GdauiBasicForm *gdauibasicform, gpointer user_data) : Run First
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"param-changed" signalvoid user_function (GdauiBasicForm *form, GdaHolder *param, gboolean is_user_modif, gpointer user_data) : Run First
Emitted when a GdaHolder changes
|
GdauiBasicForm |
|
that changed |
|
TRUE if the modification has been initiated by a user modification |
|
user data set when the signal handler was connected. |