* @value:
*
*/
-void
+gboolean
zak_form_element_set_value (ZakFormElement *element, const gchar *value)
{
ZakFormElementPrivate *priv;
+ gboolean ret;
+
+ ret = TRUE;
+
priv = zak_form_element_get_instance_private (element);
if (priv->value != NULL)
}
priv->value = g_strdup (value);
+
+ if (ZAK_FORM_ELEMENT_GET_CLASS (element)->set_value != NULL)
+ {
+ ret = ZAK_FORM_ELEMENT_GET_CLASS (element)->set_value (element, priv->value);
+ }
+
+ return ret;
}
/**
{
ZakFormElementPrivate *priv;
+ gchar *ret;
+
priv = zak_form_element_get_instance_private (element);
- return g_strdup (priv->value);
+ if (ZAK_FORM_ELEMENT_GET_CLASS (element)->get_value != NULL)
+ {
+ ret = ZAK_FORM_ELEMENT_GET_CLASS (element)->get_value (element);
+ }
+ else
+ {
+ ret = g_strdup (priv->value);
+ }
+
+ return ret;
}
/**
* @value:
*
*/
-void
+gboolean
zak_form_element_set_default_value (ZakFormElement *element, const gchar *value)
{
ZakFormElementPrivate *priv;
+ gboolean ret;
+
+ ret = TRUE;
+
priv = zak_form_element_get_instance_private (element);
if (priv->default_value != NULL)
}
priv->default_value = g_strdup (value);
+
+ return ret;
}
/**
* @value:
*
*/
-void
+gboolean
zak_form_element_set_original_value (ZakFormElement *element, const gchar *value)
{
ZakFormElementPrivate *priv;
+ gboolean ret;
+
+ ret = TRUE;
+
priv = zak_form_element_get_instance_private (element);
if (priv->original_value != NULL)
}
priv->original_value = g_strdup (value);
+
+ return ret;
}
/**
priv = zak_form_element_get_instance_private (element);
priv->visible = visible;
+
+ if (ZAK_FORM_ELEMENT_GET_CLASS (element)->set_visible != NULL)
+ {
+ ZAK_FORM_ELEMENT_GET_CLASS (element)->set_visible (element, priv->visible);
+ }
}
/**
{
ZakFormElementPrivate *priv;
+ gboolean ret;
+
priv = zak_form_element_get_instance_private (element);
- return priv->visible;
+ if (ZAK_FORM_ELEMENT_GET_CLASS (element)->get_visible != NULL)
+ {
+ ret = ZAK_FORM_ELEMENT_GET_CLASS (element)->get_visible (element);
+ }
+ else
+ {
+ ret = priv->visible;
+ }
+
+ return ret;
}
/**
priv = zak_form_element_get_instance_private (element);
priv->editable = editable;
+
+ if (ZAK_FORM_ELEMENT_GET_CLASS (element)->set_editable != NULL)
+ {
+ ZAK_FORM_ELEMENT_GET_CLASS (element)->set_editable (element, priv->editable);
+ }
}
/**
{
ZakFormElementPrivate *priv;
+ gboolean ret;
+
priv = zak_form_element_get_instance_private (element);
- return priv->editable;
+ if (ZAK_FORM_ELEMENT_GET_CLASS (element)->get_editable != NULL)
+ {
+ ret = ZAK_FORM_ELEMENT_GET_CLASS (element)->get_editable (element);
+ }
+ else
+ {
+ ret = priv->editable;
+ }
+
+ return ret;
}
/**
{
GObjectClass parent_class;
+ gboolean (*set_value) (ZakFormElement *element, const gchar *value);
+ gchar *(*get_value) (ZakFormElement *element);
+
+ void (*set_visible) (ZakFormElement *element, gboolean visible);
+ gboolean (*get_visible) (ZakFormElement *element);
+
+ void (*set_editable) (ZakFormElement *element, gboolean editable);
+ gboolean (*get_editable) (ZakFormElement *element);
+
GPtrArray *(*get_messages) (ZakFormElement *element);
};
-void zak_form_element_set_value (ZakFormElement *element, const gchar *value);
+gboolean zak_form_element_set_value (ZakFormElement *element, const gchar *value);
gchar *zak_form_element_get_value (ZakFormElement *element);
-void zak_form_element_set_default_value (ZakFormElement *element, const gchar *value);
+gboolean 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_original_value (ZakFormElement *element, const gchar *value);
+gboolean zak_form_element_set_original_value (ZakFormElement *element, const gchar *value);
gchar *zak_form_element_get_original_value (ZakFormElement *element);
void zak_form_element_set_as_original_value (ZakFormElement *element);
gboolean zak_form_element_is_changed (ZakFormElement *element);