return ret;
}
+/**
+ * zak_form_form_clear:
+ * @zakform: a #ZakFormForm object.
+ *
+ */
+void
+zak_form_form_clear (ZakFormForm *zakform)
+{
+ guint i;
+
+ ZakFormFormPrivate *priv;
+
+ g_return_if_fail (ZAK_FORM_IS_FORM (zakform));
+
+ priv = zak_form_form_get_instance_private (zakform);
+
+ for (i = 0; i < priv->ar_elements->len; i++)
+ {
+ ZakFormElement *element = (ZakFormElement *)g_ptr_array_index (priv->ar_elements, i);
+
+ zak_form_element_clear (element);
+ }
+}
+
/**
* zak_form_form_is_valid:
* @zakform:
gboolean zak_form_form_add_element (ZakFormForm *zakform, ZakFormElement *element);
+void zak_form_form_clear (ZakFormForm *zakform);
+
gboolean zak_form_form_is_valid (ZakFormForm *zakform);
return g_strdup (priv->default_value);
}
+/**
+ * zak_form_element_clear:
+ * @element:
+ *
+ */
+void
+zak_form_element_clear (ZakFormElement *element)
+{
+ ZakFormElementPrivate *priv;
+
+ priv = zak_form_element_get_instance_private (element);
+
+ zak_form_element_set_value (element, priv->default_value);
+}
+
/**
* zak_form_element_add_validator:
* @element:
void zak_form_element_set_default_value (ZakFormElement *element, const gchar *value);
gchar *zak_form_element_get_default_value (ZakFormElement *element);
+void zak_form_element_clear (ZakFormElement *element);
+
void zak_form_element_add_filter (ZakFormElement *element, ZakFormElementIFilter *filter);
void zak_form_element_filter (ZakFormElement *element);