- implement html and gtk
- properties:
- default (OK did it)
+ - is editable
+ - is visible
- to-load
- to-save
+ - original value
- each element must parse own definition from xml
- each element is bounded to a db field
- each element could have specifics properties/methods
- to be transformed from interface to abstract (OK did it)
-FIELD/DB
+FIELD/DB (LOADERS AND SAVERS)
- boolean, integer, float, string, datetime
+- load from xml
GROUP OF ELEMENTS ???
{
PROP_0,
PROP_VALUE,
- PROP_DEFAULT_VALUE
+ PROP_DEFAULT_VALUE,
+ PROP_VISIBLE
};
static void zak_form_element_class_init (ZakFormElementClass *class);
{
gchar *value;
gchar *default_value;
+ gboolean visible;
GPtrArray *pa_filters;
GPtrArray *pa_validators;
GPtrArray *pa_messages;
"Default value",
"",
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+ g_object_class_install_property (object_class, PROP_DEFAULT_VALUE,
+ g_param_spec_boolean ("visible",
+ "Visible",
+ "Visible",
+ TRUE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
}
static void
return g_strdup (priv->default_value);
}
+/**
+ * zak_form_element_set_visible:
+ * @element:
+ * @visible:
+ *
+ */
+void
+zak_form_element_set_visible (ZakFormElement *element, gboolean visible)
+{
+ ZakFormElementPrivate *priv;
+
+ priv = zak_form_element_get_instance_private (element);
+
+ priv->visible = visible;
+}
+
+/**
+ * zak_form_element_get_visible:
+ * @element:
+ *
+ */
+gboolean
+zak_form_element_get_visible (ZakFormElement *element)
+{
+ ZakFormElementPrivate *priv;
+
+ priv = zak_form_element_get_instance_private (element);
+
+ return priv->visible;
+}
+
/**
* zak_form_element_clear:
* @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_set_visible (ZakFormElement *element, gboolean visible);
+gboolean zak_form_element_get_visible (ZakFormElement *element);
+
void zak_form_element_clear (ZakFormElement *element);
void zak_form_element_add_filter (ZakFormElement *element, ZakFormElementFilter *filter);