Glade User Interface Designer Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
GladePropertyGladeProperty — An interface to properties on the GladeWidget. |
GladeProperty; GladeProperty * glade_property_new (GladePropertyClass *klass
,GladeWidget *widget
,GValue *value
); GladeProperty * glade_property_dup (GladeProperty *template_prop
,GladeWidget *widget
); void glade_property_reset (GladeProperty *property
); void glade_property_original_reset (GladeProperty *property
); gboolean glade_property_default (GladeProperty *property
); gboolean glade_property_original_default (GladeProperty *property
); gboolean glade_property_equals_value (GladeProperty *property
,const GValue *value
); gboolean glade_property_equals (GladeProperty *property
,...
); gboolean glade_property_set_value (GladeProperty *property
,const GValue *value
); gboolean glade_property_set_va_list (GladeProperty *property
,va_list vl
); gboolean glade_property_set (GladeProperty *property
,...
); void glade_property_get_value (GladeProperty *property
,GValue *value
); void glade_property_get_default (GladeProperty *property
,GValue *value
); void glade_property_get_va_list (GladeProperty *property
,va_list vl
); void glade_property_get (GladeProperty *property
,...
); void glade_property_add_object (GladeProperty *property
,GObject *object
); void glade_property_remove_object (GladeProperty *property
,GObject *object
); void glade_property_sync (GladeProperty *property
); void glade_property_load (GladeProperty *property
); void glade_property_read (GladeProperty *property
,GladeProject *project
,GladeXmlNode *node
); void glade_property_write (GladeProperty *property
,GladeXmlContext *context
,GladeXmlNode *node
); void glade_property_set_sensitive (GladeProperty *property
,gboolean sensitive
,const gchar *reason
); gboolean glade_property_get_sensitive (GladeProperty *property
); void glade_property_set_save_always (GladeProperty *property
,gboolean setting
); gboolean glade_property_get_save_always (GladeProperty *property
); void glade_property_set_enabled (GladeProperty *property
,gboolean enabled
); gboolean glade_property_get_enabled (GladeProperty *property
); void glade_property_i18n_set_comment (GladeProperty *property
,const gchar *str
); const gchar * glade_property_i18n_get_comment (GladeProperty *property
); void glade_property_i18n_set_translatable (GladeProperty *property
,gboolean translatable
); gboolean glade_property_i18n_get_translatable (GladeProperty *property
); void glade_property_i18n_set_has_context (GladeProperty *property
,gboolean has_context
); gboolean glade_property_i18n_get_has_context (GladeProperty *property
); void glade_property_push_superuser (void
); void glade_property_pop_superuser (void
); gboolean glade_property_superuser (void
);
"class" gpointer : Read / Write / Construct Only "enabled" gboolean : Read / Write "i18n-comment" gchar* : Read / Write "i18n-context" gchar* : Read / Write "i18n-has-context" gboolean : Read / Write "i18n-translatable" gboolean : Read / Write "sensitive" gboolean : Read / Write "state" gint : Read
Every object property of every GladeWidget in every GladeProject has a GladeProperty to interface with, GladeProperty provides a means to handle properties in the runtime environment.
A GladeProperty can be seen as an instance of a GladePropertyClass, the GladePropertyClass describes how a GladeProperty will function.
GladeProperty * glade_property_new (GladePropertyClass *klass
,GladeWidget *widget
,GValue *value
);
Creates a GladeProperty of type klass
for widget
with value
; if
value
is NULL
, then the introspected default value for that property
will be used.
|
A GladePropertyClass defining this property |
|
The GladeWidget this property is created for |
|
The initial GValue of the property or NULL
(the GladeProperty will assume ownership of value )
|
Returns : |
The newly created GladeProperty |
GladeProperty * glade_property_dup (GladeProperty *template_prop
,GladeWidget *widget
);
|
A GladeProperty |
|
A GladeWidget |
Returns : |
A newly duplicated property based on the new widget |
void glade_property_reset (GladeProperty *property
);
Resets this property to its default value
|
A GladeProperty |
void glade_property_original_reset (GladeProperty *property
);
Resets this property to its original default value
|
A GladeProperty |
gboolean glade_property_default (GladeProperty *property
);
|
A GladeProperty |
Returns : |
Whether this property is at its default value |
gboolean glade_property_original_default (GladeProperty *property
);
|
A GladeProperty |
Returns : |
Whether this property is at its original default value |
gboolean glade_property_equals_value (GladeProperty *property
,const GValue *value
);
|
a GladeProperty |
|
a GValue |
Returns : |
Whether this property is equal to the value provided |
gboolean glade_property_equals (GladeProperty *property
,...
);
|
a GladeProperty |
|
a provided property value |
Returns : |
Whether this property is equal to the value provided |
gboolean glade_property_set_value (GladeProperty *property
,const GValue *value
);
Sets the property's value
|
a GladeProperty |
|
a GValue |
Returns : |
Whether the property was successfully set. |
gboolean glade_property_set_va_list (GladeProperty *property
,va_list vl
);
Sets the property's value
|
a GladeProperty |
|
a va_list with value to set |
gboolean glade_property_set (GladeProperty *property
,...
);
Sets the property's value (in a convenient way)
|
a GladeProperty |
|
the value to set |
void glade_property_get_value (GladeProperty *property
,GValue *value
);
Retrieve the property value
|
a GladeProperty |
|
a GValue |
void glade_property_get_default (GladeProperty *property
,GValue *value
);
Retrieve the default property value
|
a GladeProperty |
|
a GValue |
void glade_property_get_va_list (GladeProperty *property
,va_list vl
);
Retrieve the property value
|
a GladeProperty |
|
a va_list |
void glade_property_get (GladeProperty *property
,...
);
Retrieve the property value
|
a GladeProperty |
|
An address to store the value |
void glade_property_add_object (GladeProperty *property
,GObject *object
);
Adds object
to the object list in property
.
Note: This function expects property
to be a GladeParamSpecObjects
or GParamSpecObject type property.
|
a GladeProperty |
|
The GObject to add |
void glade_property_remove_object (GladeProperty *property
,GObject *object
);
Removes object
from the object list in property
.
Note: This function expects property
to be a GladeParamSpecObjects
or GParamSpecObject type property.
|
a GladeProperty |
|
The GObject to add |
void glade_property_sync (GladeProperty *property
);
Synchronize the object with this property
|
a GladeProperty |
void glade_property_load (GladeProperty *property
);
Loads the value of property
from the coresponding object instance
|
a GladeProperty |
void glade_property_read (GladeProperty *property
,GladeProject *project
,GladeXmlNode *node
);
Read the value and any attributes for property
from node
, assumes
property
is being loaded for project
Note that object values will only be resolved after the project is completely loaded
|
a GladeProperty or NULL |
|
the GladeProject |
|
the GladeXmlNode to read, will either be a 'widget' node or a 'child' node for packing properties. |
void glade_property_write (GladeProperty *property
,GladeXmlContext *context
,GladeXmlNode *node
);
Write property
to node
|
a GladeProperty |
|
A GladeXmlContext |
|
A GladeXmlNode |
void glade_property_set_sensitive (GladeProperty *property
,gboolean sensitive
,const gchar *reason
);
void glade_property_set_save_always (GladeProperty *property
,gboolean setting
);
Sets whether this property should be special cased to always be saved regardless of its default value. (used for some special cases like properties that are assigned initial values in composite widgets or derived widget code).
|
A GladeProperty |
|
the value to set |
gboolean glade_property_get_save_always (GladeProperty *property
);
|
A GladeProperty |
Returns : |
whether this property is special cased to always be saved regardless of its default value. |
void glade_property_set_enabled (GladeProperty *property
,gboolean enabled
);
void glade_property_i18n_set_comment (GladeProperty *property
,const gchar *str
);
const gchar * glade_property_i18n_get_comment (GladeProperty *property
);
void glade_property_i18n_set_translatable (GladeProperty *property
,gboolean translatable
);
gboolean glade_property_i18n_get_translatable
(GladeProperty *property
);
void glade_property_i18n_set_has_context (GladeProperty *property
,gboolean has_context
);
gboolean glade_property_i18n_get_has_context (GladeProperty *property
);
"class"
property "class" gpointer : Read / Write / Construct Only
The GladePropertyClass for this property.
"enabled"
property "enabled" gboolean : Read / Write
If the property is optional, this is its enabled state.
Default value: TRUE
"i18n-comment"
property "i18n-comment" gchar* : Read / Write
Comment for translators.
Default value: NULL
"i18n-context"
property "i18n-context" gchar* : Read / Write
Context for translation.
Default value: NULL
"i18n-has-context"
property "i18n-has-context" gboolean : Read / Write
Whether the translatable string has a context prefix.
Default value: FALSE
"i18n-translatable"
property "i18n-translatable" gboolean : Read / Write
Whether this property is translatable.
Default value: TRUE
"sensitive"
property "sensitive" gboolean : Read / Write
This gives backends control to set property sensitivity.
Default value: TRUE
"tooltip-changed"
signalvoid user_function (GladeProperty *gladeproperty,
gchar *arg1,
gchar *arg2,
gchar *arg3,
gpointer user_data) : Run Last
"value-changed"
signalvoid user_function (GladeProperty *gladeproperty,
gpointer arg1,
gpointer arg2,
gpointer user_data) : Run Last