PROP_0,
PROP_VALUE,
PROP_DEFAULT_VALUE,
- PROP_VISIBLE
+ PROP_VISIBLE,
+ PROP_EDITABLE
};
static void zak_form_element_class_init (ZakFormElementClass *class);
gchar *value;
gchar *default_value;
gboolean visible;
+ gboolean editable;
GPtrArray *pa_filters;
GPtrArray *pa_validators;
GPtrArray *pa_messages;
"",
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
- g_object_class_install_property (object_class, PROP_DEFAULT_VALUE,
+ g_object_class_install_property (object_class, PROP_VISIBLE,
g_param_spec_boolean ("visible",
"Visible",
"Visible",
TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+ g_object_class_install_property (object_class, PROP_EDITABLE,
+ g_param_spec_boolean ("editable",
+ "Editable",
+ "Editable",
+ TRUE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
}
static void
return priv->visible;
}
+/**
+ * zak_form_element_set_editable:
+ * @element:
+ * @editable:
+ *
+ */
+void
+zak_form_element_set_editable (ZakFormElement *element, gboolean editable)
+{
+ ZakFormElementPrivate *priv;
+
+ priv = zak_form_element_get_instance_private (element);
+
+ priv->editable = editable;
+}
+
+/**
+ * zak_form_element_get_editable:
+ * @element:
+ *
+ */
+gboolean
+zak_form_element_get_editable (ZakFormElement *element)
+{
+ ZakFormElementPrivate *priv;
+
+ priv = zak_form_element_get_instance_private (element);
+
+ return priv->editable;
+}
+
/**
* zak_form_element_clear:
* @element:
zak_form_element_set_default_value (zak_form_element, g_value_get_string (value));
break;
+ case PROP_VISIBLE:
+ zak_form_element_set_visible (zak_form_element, g_value_get_boolean (value));
+ break;
+
+ case PROP_EDITABLE:
+ zak_form_element_set_editable (zak_form_element, g_value_get_boolean (value));
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
g_value_set_string (value, zak_form_element_get_default_value (zak_form_element));
break;
+ case PROP_VISIBLE:
+ g_value_set_boolean (value, zak_form_element_get_visible (zak_form_element));
+ break;
+
+ case PROP_EDITABLE:
+ g_value_set_boolean (value, zak_form_element_get_editable (zak_form_element));
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
void zak_form_element_set_visible (ZakFormElement *element, gboolean visible);
gboolean zak_form_element_get_visible (ZakFormElement *element);
+void zak_form_element_set_editable (ZakFormElement *element, gboolean editable);
+gboolean zak_form_element_get_editable (ZakFormElement *element);
+
void zak_form_element_clear (ZakFormElement *element);
void zak_form_element_add_filter (ZakFormElement *element, ZakFormElementFilter *filter);