Top |
GladePropertyGladeProperty — An interface to properties on the GladeWidget. |
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 GladePropertyDef, the GladePropertyDef describes how a GladeProperty will function.
GladeProperty * glade_property_new (GladePropertyDef *def
,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.
def |
A GladePropertyDef defining this property |
|
widget |
The GladeWidget this property is created for |
|
value |
The initial GValue of the property or |
GladeProperty * glade_property_dup (GladeProperty *template_prop
,GladeWidget *widget
);
void
glade_property_reset (GladeProperty *property
);
Resets this property to its default value
void
glade_property_original_reset (GladeProperty *property
);
Resets this property to its original default value
gboolean
glade_property_original_default (GladeProperty *property
);
gboolean glade_property_equals_value (GladeProperty *property
,const GValue *value
);
gboolean glade_property_set_value (GladeProperty *property
,const GValue *value
);
Sets the property's value
gboolean glade_property_set_va_list (GladeProperty *property
,va_list vl
);
Sets the property's value
gboolean glade_property_set (GladeProperty *property
,...
);
Sets the property's value (in a convenient way)
void glade_property_get_value (GladeProperty *property
,GValue *value
);
Retrieve the property value
void glade_property_get_default (GladeProperty *property
,GValue *value
);
Retrieve the default property value
void glade_property_get_va_list (GladeProperty *property
,va_list vl
);
Retrieve the property value
void glade_property_get (GladeProperty *property
,...
);
Retrieve the property 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.
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.
void
glade_property_sync (GladeProperty *property
);
Synchronize the object with this property
void
glade_property_load (GladeProperty *property
);
Loads the value of property
from the corresponding object instance
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
property |
a GladeProperty or NULL |
|
project |
the GladeProject |
|
node |
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
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).
gboolean
glade_property_get_save_always (GladeProperty *property
);
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_set_support_warning (GladeProperty *property
,gboolean disable
,const gchar *reason
);
void glade_property_set_widget (GladeProperty *property
,GladeWidget *widget
);
GladePropertyDef *
glade_property_get_def (GladeProperty *property
);
Get the GladePropertyDef this property was created for.
const gchar *
glade_property_get_support_warning (GladeProperty *property
);
const gchar *
glade_property_i18n_get_context (GladeProperty *property
);
void glade_property_i18n_set_context (GladeProperty *property
,const gchar *str
);
const gchar *
glade_propert_get_insensitive_tooltip (GladeProperty *property
);