Glade User Interface Designer Reference Manual | ||||
---|---|---|---|---|
Top | Description |
GladeWidgetAdaptorGladeWidgetAdaptor — Adaptor base class to add runtime support for each widget class. |
enum GladeCreateReason; #define GWA_IS_FIXED (obj) #define GWA_IS_TOPLEVEL (obj) #define GWA_USE_PLACEHOLDERS (obj) #define GWA_DEFAULT_WIDTH (obj) #define GWA_DEFAULT_HEIGHT (obj) #define GWA_GET_CLASS (type) #define GWA_GET_OCLASS (type) #define GLADE_VALID_CREATE_REASON (reason) #define GLADE_TYPE_CREATE_REASON void (*GladeSetPropertyFunc) (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *property_name
,const GValue *value
); void (*GladeGetPropertyFunc) (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *property_name
,GValue *value
); gboolean (*GladeVerifyPropertyFunc) (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *property_name
,const GValue *value
); void (*GladeChildSetPropertyFunc) (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
,const gchar *property_name
,const GValue *value
); void (*GladeChildGetPropertyFunc) (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
,const gchar *property_name
,GValue *value
); gboolean (*GladeChildVerifyPropertyFunc) (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
,const gchar *property_name
,const GValue *value
); GList * (*GladeGetChildrenFunc) (GladeWidgetAdaptor *adaptor
,GObject *container
); void (*GladeAddChildFunc) (GladeWidgetAdaptor *adaptor
,GObject *parent
,GObject *child
); void (*GladeRemoveChildFunc) (GladeWidgetAdaptor *adaptor
,GObject *parent
,GObject *child
); void (*GladeReplaceChildFunc) (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *old_obj
,GObject *new_obj
); void (*GladePostCreateFunc) (GladeWidgetAdaptor *adaptor
,GObject *object
,GladeCreateReason reason
); GObject * (*GladeGetInternalFunc) (GladeWidgetAdaptor *adaptor
,GObject *parent
,const gchar *name
); void (*GladeActionActivateFunc) (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *action_path
); void (*GladeChildActionActivateFunc) (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *object
,const gchar *action_path
); void (*GladeReadWidgetFunc) (GladeWidgetAdaptor *adaptor
,GladeWidget *widget
,GladeXmlNode *node
); void (*GladeWriteWidgetFunc) (GladeWidgetAdaptor *adaptor
,GladeWidget *widget
,GladeXmlContext *context
,GladeXmlNode *node
); GladeEditorProperty * (*GladeCreateEPropFunc) (GladeWidgetAdaptor *adaptor
,GladePropertyClass *klass
,gboolean use_command
); gchar * (*GladeStringFromValueFunc) (GladeWidgetAdaptor *adaptor
,GladePropertyClass *klass
,const GValue *value
,GladeProjectFormat fmt
); GladeWidgetAdaptor; #define glade_widget_adaptor_create_widget (adaptor, query, ...) GladeEditorProperty * glade_widget_adaptor_create_eprop (GladeWidgetAdaptor *adaptor
,GladePropertyClass *klass
,gboolean use_command
); #define glade_widget_adaptor_from_pclass (pclass) GladeWidgetAdaptor * glade_widget_adaptor_from_pspec (GladeWidgetAdaptor *adaptor
,GParamSpec *spec
); GladeWidgetAdaptor * glade_widget_adaptor_from_catalog (GladeCatalog *catalog
,GladeXmlNode *class_node
,GModule *module
); void glade_widget_adaptor_register (GladeWidgetAdaptor *adaptor
); GladeWidget * glade_widget_adaptor_create_internal (GladeWidget *parent
,GObject *internal_object
,const gchar *internal_name
,const gchar *parent_name
,gboolean anarchist
,GladeCreateReason reason
); GladeWidget * glade_widget_adaptor_create_widget_real (gboolean query
,const gchar *first_property
,...
); GladeWidgetAdaptor * glade_widget_adaptor_get_by_name (const gchar *name
); GladeWidgetAdaptor * glade_widget_adaptor_get_by_type (GType type
); GladePropertyClass * glade_widget_adaptor_get_property_class (GladeWidgetAdaptor *adaptor
,const gchar *name
); GladePropertyClass * glade_widget_adaptor_get_pack_property_class (GladeWidgetAdaptor *adaptor
,const gchar *name
); GParameter * glade_widget_adaptor_default_params (GladeWidgetAdaptor *adaptor
,gboolean construct
,guint *n_params
); void glade_widget_adaptor_post_create (GladeWidgetAdaptor *adaptor
,GObject *object
,GladeCreateReason reason
); GObject * glade_widget_adaptor_get_internal_child (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *internal_name
); void glade_widget_adaptor_set_property (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *property_name
,const GValue *value
); void glade_widget_adaptor_get_property (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *property_name
,GValue *value
); gboolean glade_widget_adaptor_verify_property (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *property_name
,const GValue *value
); void glade_widget_adaptor_add (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
); void glade_widget_adaptor_remove (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
); GList * glade_widget_adaptor_get_children (GladeWidgetAdaptor *adaptor
,GObject *container
); gboolean glade_widget_adaptor_has_child (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
); void glade_widget_adaptor_child_set_property (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
,const gchar *property_name
,const GValue *value
); void glade_widget_adaptor_child_get_property (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
,const gchar *property_name
,GValue *value
); gboolean glade_widget_adaptor_child_verify_property (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
,const gchar *property_name
,const GValue *value
); void glade_widget_adaptor_replace_child (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *old_obj
,GObject *new_obj
); void glade_widget_adaptor_read_child (GladeWidgetAdaptor *adaptor
,GladeWidget *widget
,GladeXmlNode *node
); void glade_widget_adaptor_read_widget (GladeWidgetAdaptor *adaptor
,GladeWidget *widget
,GladeXmlNode *node
); void glade_widget_adaptor_write_child (GladeWidgetAdaptor *adaptor
,GladeWidget *widget
,GladeXmlContext *context
,GladeXmlNode *node
); void glade_widget_adaptor_write_widget (GladeWidgetAdaptor *adaptor
,GladeWidget *widget
,GladeXmlContext *context
,GladeXmlNode *node
); gboolean glade_widget_adaptor_query (GladeWidgetAdaptor *adaptor
); gchar * glade_widget_adaptor_get_packing_default (GladeWidgetAdaptor *child_adaptor
,GladeWidgetAdaptor *container_adaptor
,const gchar *id
); gboolean glade_widget_adaptor_is_container (GladeWidgetAdaptor *adaptor
); gboolean glade_widget_adaptor_action_add (GladeWidgetAdaptor *adaptor
,const gchar *action_path
,const gchar *label
,const gchar *stock
,gboolean important
); gboolean glade_widget_adaptor_pack_action_add (GladeWidgetAdaptor *adaptor
,const gchar *action_path
,const gchar *label
,const gchar *stock
,gboolean important
); gboolean glade_widget_adaptor_action_remove (GladeWidgetAdaptor *adaptor
,const gchar *action_path
); gboolean glade_widget_adaptor_pack_action_remove (GladeWidgetAdaptor *adaptor
,const gchar *action_path
); GList * glade_widget_adaptor_pack_actions_new (GladeWidgetAdaptor *adaptor
); void glade_widget_adaptor_action_activate (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *action_path
); void glade_widget_adaptor_child_action_activate (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *object
,const gchar *action_path
); gchar * glade_widget_adaptor_string_from_value (GladeWidgetAdaptor *adaptor
,GladePropertyClass *klass
,const GValue *value
,GladeProjectFormat fmt
);
The GladeWidgetAdaptor object is a proxy for widget class support in Glade. it is automatically generated from the xml and allows you to override its methods in the plugin library for fine grained support on how you load/save widgets and handle thier properties in the runtime and more.
typedef enum { GLADE_CREATE_USER = 0, GLADE_CREATE_COPY, GLADE_CREATE_LOAD, GLADE_CREATE_REBUILD, GLADE_CREATE_REASONS } GladeCreateReason;
These are the reasons your GladePostCreateFunc can be called.
Was created at the user's request (this is a good time to set any properties or add children to the project; like GtkFrame's label for example). | |
Was created as a result of the copy/paste mechanism, at this point you can count on glade to follow up with properties and children on its own. | |
Was created during the load process. | |
Was created as a replacement for another project object; this only happens when the user is changing a property that is marked by the type system as G_PARAM_SPEC_CONSTRUCT_ONLY. | |
Never used. |
#define GWA_IS_FIXED(obj)
Checks whether this widget adaptor should be handled as a free-form container
|
A GladeWidgetAdaptor |
#define GWA_IS_TOPLEVEL(obj)
Checks whether this widget class has been marked as a toplevel one.
|
A GladeWidgetAdaptor |
#define GWA_USE_PLACEHOLDERS(obj)
Checks whether this widget class has been marked to use placeholders in child widget operations
|
A GladeWidgetAdaptor |
#define GWA_DEFAULT_WIDTH(obj)
|
A GladeWidgetAdaptor |
Returns : |
the default width to be used when this widget is toplevel in the GladeDesignLayout |
#define GWA_DEFAULT_HEIGHT(obj)
|
A GladeWidgetAdaptor |
Returns : |
the default width to be used when this widget is toplevel in the GladeDesignLayout |
#define GWA_GET_CLASS(type)
Shorthand for referencing glade adaptor classes from the plugin eg. GWA_GET_CLASS (GTK_TYPE_CONTAINER)->post_create (adaptor...
|
A GType |
#define GWA_GET_OCLASS(type) ((GObjectClass*)GWA_GET_CLASS(type))
Same as GWA_GET_CLASS but casted to GObjectClass
|
A GType. |
#define GLADE_VALID_CREATE_REASON(reason) (reason >= 0 && reason < GLADE_CREATE_REASONS)
void (*GladeSetPropertyFunc) (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *property_name
,const GValue *value
);
This delagate function is used to apply the property value on the runtime object.
Sets value
on object
for a given GladePropertyClass
|
A GladeWidgetAdaptor |
|
The GObject |
|
The property identifier |
|
The GValue |
void (*GladeGetPropertyFunc) (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *property_name
,GValue *value
);
Gets value
on object
for a given GladePropertyClass
|
A GladeWidgetAdaptor |
|
The GObject |
|
The property identifier |
|
The GValue |
gboolean (*GladeVerifyPropertyFunc) (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *property_name
,const GValue *value
);
This delagate function is always called whenever setting any properties with the exception of load time, and copy/paste time (basicly the two places where we recreate a hierarchy that we already know "works") its basicly an optional backend provided boundry checker for properties.
|
A GladeWidgetAdaptor |
|
The GObject |
|
The property identifier |
|
The GValue |
Returns : |
whether or not its OK to set value on object
|
void (*GladeChildSetPropertyFunc) (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
,const gchar *property_name
,const GValue *value
);
Called to set the packing property property_name
to value
on the child
object of container
.
|
A GladeWidgetAdaptor |
|
The GObject container |
|
The GObject child |
|
The property name |
|
The GValue |
void (*GladeChildGetPropertyFunc) (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
,const gchar *property_name
,GValue *value
);
Called to get the packing property property_name
on the child
object of container
into value
.
|
A GladeWidgetAdaptor |
|
The GObject container |
|
The GObject child |
|
The property name |
|
The GValue |
gboolean (*GladeChildVerifyPropertyFunc) (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
,const gchar *property_name
,const GValue *value
);
This delagate function is always called whenever setting any properties with the exception of load time, and copy/paste time (basicly the two places where we recreate a hierarchy that we already know "works") its basicly an optional backend provided boundry checker for properties.
|
A GladeWidgetAdaptor |
|
The GObject container |
|
The GObject child |
|
The property name |
|
The GValue |
Returns : |
whether or not its OK to set value on object
|
GList * (*GladeGetChildrenFunc) (GladeWidgetAdaptor *adaptor
,GObject *container
);
A function called to get containers
children.
|
A GObject container |
Returns : |
A GList of GObject children. |
void (*GladeAddChildFunc) (GladeWidgetAdaptor *adaptor
,GObject *parent
,GObject *child
);
Called to add child
to parent
.
|
A GObject container |
|
A GObject child |
void (*GladeRemoveChildFunc) (GladeWidgetAdaptor *adaptor
,GObject *parent
,GObject *child
);
Called to remove child
from parent
.
|
A GObject container |
|
A GObject child |
void (*GladeReplaceChildFunc) (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *old_obj
,GObject *new_obj
);
Called to swap placeholders with project objects in containers.
|
A GObject container |
|
The old GObject child |
|
The new GObject child to take its place |
void (*GladePostCreateFunc) (GladeWidgetAdaptor *adaptor
,GObject *object
,GladeCreateReason reason
);
This function is called exactly once for any project object instance and can be for any GladeCreateReason.
|
a GObject |
|
a GladeCreateReason |
GObject * (*GladeGetInternalFunc) (GladeWidgetAdaptor *adaptor
,GObject *parent
,const gchar *name
);
Called to lookup child
in composite object parent
by name
.
|
A GObject composite object |
|
A string identifier |
Returns : |
The specified internal widget. |
void (*GladeActionActivateFunc) (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *action_path
);
This delagate function is used to catch actions from the core.
|
A GladeWidgetAdaptor |
|
The GObject |
|
The action path |
void (*GladeChildActionActivateFunc) (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *object
,const gchar *action_path
);
This delagate function is used to catch packing actions from the core.
|
A GladeWidgetAdaptor |
|
The GtkContainer |
|
The GObject |
|
The action path |
void (*GladeReadWidgetFunc) (GladeWidgetAdaptor *adaptor
,GladeWidget *widget
,GladeXmlNode *node
);
This function is called to update widget
from node
.
|
A GladeWidgetAdaptor |
|
The GladeWidget |
|
The GladeXmlNode |
void (*GladeWriteWidgetFunc) (GladeWidgetAdaptor *adaptor
,GladeWidget *widget
,GladeXmlContext *context
,GladeXmlNode *node
);
This function is called to fill in node
from widget
.
|
A GladeWidgetAdaptor |
|
The GladeWidget |
|
The GladeXmlNode |
GladeEditorProperty * (*GladeCreateEPropFunc) (GladeWidgetAdaptor *adaptor
,GladePropertyClass *klass
,gboolean use_command
);
Creates a GladeEditorProperty to edit klass
|
A GladeWidgetAdaptor |
|
The GladePropertyClass to be edited |
|
whether to use the GladeCommand interface to commit property changes |
Returns : |
A newly created GladeEditorProperty |
gchar * (*GladeStringFromValueFunc) (GladeWidgetAdaptor *adaptor
,GladePropertyClass *klass
,const GValue *value
,GladeProjectFormat fmt
);
For normal properties this is used to serialize property values, for custom properties (only when new pspecs are introduced) its needed for value comparisons in boxed pspecs and also to update the UI for undo/redo items etc.
|
A GladeWidgetAdaptor |
|
The GladePropertyClass |
|
The GValue to convert to a string |
|
The GladeProjectFormat the string should conform to |
Returns : |
A newly allocated string representation of value
|
typedef struct { GObject parent_instance; GType type; /* GType of the widget */ gchar *name; /* Name of the widget, for example GtkButton */ gchar *generic_name; /* Used to generate names of new widgets, for * example "button" so that we generate button1, * button2, buttonX .. */ gchar *icon_name; /* icon name to use for widget class */ gchar *missing_icon; /* the name of the missing icon if it was not found */ gchar *title; /* Translated class name used in the UI */ GList *properties; /* List of GladePropertyClass objects. * [see glade-property.h] this list contains * properties about the widget that we are going * to modify. Like "title", "label", "rows" . * Each property creates an input in the propety * editor. */ GList *packing_props; /* List of GladePropertyClass objects that describe * properties for child objects packing definition - * note there may be more than one type of child supported * by a widget and thus they may have different sets * of properties for each type - this association is * managed on the GladePropertyClass proper. */ GList *signals; /* List of GladeSignalClass objects */ GList *child_packings; /* Default packing property values */ GList *actions; /* A list of GWActionClass */ GList *packing_actions;/* A list of GWActionClass for child objects */ GladeWidgetAdaptorPrivate *priv; } GladeWidgetAdaptor;
#define glade_widget_adaptor_create_widget(adaptor, query, ...)
This factory function returns a new GladeWidget of the correct type/class with the properties defined in @... and queries the user if nescisary.
The resulting object will have all default properties applied to it including the overrides specified in the catalog, unless the catalog has specified 'ignore' for that property.
Note that the widget class must be fed twice; once as the leading arg... and also as the property for the GladeWidget
this macro returns the newly created GladeWidget
|
a GladeWidgetAdaptor |
|
whether to display query dialogs if applicable to the class |
|
a NULL terminated list of string/value pairs of GladeWidget
properties
|
GladeEditorProperty * glade_widget_adaptor_create_eprop (GladeWidgetAdaptor *adaptor
,GladePropertyClass *klass
,gboolean use_command
);
Creates a GladeEditorProperty to edit klass
|
A GladeWidgetAdaptor |
|
The GladePropertyClass to be edited |
|
whether to use the GladeCommand interface to commit property changes |
Returns : |
A newly created GladeEditorProperty |
GladeWidgetAdaptor * glade_widget_adaptor_from_pspec (GladeWidgetAdaptor *adaptor
,GParamSpec *spec
);
Assumes pspec
is a property in an object class wrapped by adaptor
,
this function will search for the specific parent adaptor class which
originally introduced pspec
.
|
a GladeWidgetAdaptor |
|
a GParamSpec |
Returns : |
the closest GladeWidgetAdaptor in the ancestry to adaptor
which is responsable for introducing pspec .
|
GladeWidgetAdaptor * glade_widget_adaptor_from_catalog (GladeCatalog *catalog
,GladeXmlNode *class_node
,GModule *module
);
Dynamicly creates a subclass of GladeWidgetAdaptor and subclasses the closest parent adaptor (parent class adapters must be creates/registerd prior to child classes, otherwise inheritance wont work) and parses in the relevent catalog info.
|
A GladeCatalog |
|
the GladeXmlNode to load |
|
the plugin GModule. |
void glade_widget_adaptor_register (GladeWidgetAdaptor *adaptor
);
Registers adaptor
into the Glade core (every supported
object type must have a registered adaptor).
|
A GladeWidgetAdaptor |
GladeWidget * glade_widget_adaptor_create_internal (GladeWidget *parent
,GObject *internal_object
,const gchar *internal_name
,const gchar *parent_name
,gboolean anarchist
,GladeCreateReason reason
);
A convenienve function to create a GladeWidget of the prescribed type for internal widgets.
|
The parent GladeWidget, or NULL for children
outside of the hierarchy.
|
|
the GObject |
|
a string identifier for this internal widget. |
|
the generic name of the parent used for fancy child names. |
|
Whether or not this widget is a widget outside of the parent's hierarchy (like a popup window) |
|
The GladeCreateReason for which this internal widget was created (usually just pass the reason from the post_create function; note also this is used only by the plugin code so pass something usefull here). |
Returns : |
a freshly created GladeWidget wrapper object for the
internal_object of name internal_name
|
GladeWidget * glade_widget_adaptor_create_widget_real (gboolean query
,const gchar *first_property
,...
);
GladeWidgetAdaptor * glade_widget_adaptor_get_by_name (const gchar *name
);
|
name of the widget class (for instance: GtkButton) |
Returns : |
an existing GladeWidgetAdaptor with the name equaling name ,
or NULL if such a class doesn't exist
|
GladeWidgetAdaptor * glade_widget_adaptor_get_by_type (GType type
);
|
the GType of an object class |
Returns : |
an existing GladeWidgetAdaptor with the type equaling type ,
or NULL if such a class doesn't exist
|
GladePropertyClass * glade_widget_adaptor_get_property_class (GladeWidgetAdaptor *adaptor
,const gchar *name
);
Retrieves the GladePropertyClass for name
in adaptor
|
a GladeWidgetAdaptor |
|
a string |
Returns : |
A GladePropertyClass object |
GladePropertyClass * glade_widget_adaptor_get_pack_property_class (GladeWidgetAdaptor *adaptor
,const gchar *name
);
Retrieves the GladePropertyClass for name
in
adaptor
's child properties
|
a GladeWidgetAdaptor |
|
a string |
Returns : |
A GladePropertyClass object |
GParameter * glade_widget_adaptor_default_params (GladeWidgetAdaptor *adaptor
,gboolean construct
,guint *n_params
);
void glade_widget_adaptor_post_create (GladeWidgetAdaptor *adaptor
,GObject *object
,GladeCreateReason reason
);
An adaptor function to be called after the object is created
|
A GladeWidgetAdaptor |
|
The GObject |
|
The GladeCreateReason that object was created for
|
GObject * glade_widget_adaptor_get_internal_child (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *internal_name
);
Retrieves the internal object internal_name
from object
|
A GladeWidgetAdaptor |
|
The GObject |
|
The string identifier of the internal object |
Returns : |
The internal GObject |
void glade_widget_adaptor_set_property (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *property_name
,const GValue *value
);
This delagate function is used to apply the property value on the runtime object.
|
A GladeWidgetAdaptor |
|
The GObject |
|
The property identifier |
|
The GValue |
void glade_widget_adaptor_get_property (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *property_name
,GValue *value
);
Gets value
of property_name
on object
.
|
A GladeWidgetAdaptor |
|
The GObject |
|
The property identifier |
|
The GValue |
gboolean glade_widget_adaptor_verify_property (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *property_name
,const GValue *value
);
This delagate function is always called whenever setting any properties with the exception of load time, and copy/paste time (basicly the two places where we recreate a hierarchy that we already know "works") its basicly an optional backend provided boundry checker for properties.
|
A GladeWidgetAdaptor |
|
The GObject |
|
The property identifier |
|
The GValue |
Returns : |
whether or not its OK to set value on object , this function
will silently return TRUE if the class did not provide a verify function.
|
void glade_widget_adaptor_add (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
);
Adds child
to container
.
|
A GladeWidgetAdaptor |
|
The GObject container |
|
The GObject child |
void glade_widget_adaptor_remove (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
);
Removes child
from container
.
|
A GladeWidgetAdaptor |
|
The GObject container |
|
The GObject child |
GList * glade_widget_adaptor_get_children (GladeWidgetAdaptor *adaptor
,GObject *container
);
Lists the children of container
.
|
A GladeWidgetAdaptor |
|
The GObject container |
Returns : |
A GList of children |
gboolean glade_widget_adaptor_has_child (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
);
|
A GladeWidgetAdaptor |
|
The GObject container |
|
The GObject child |
Returns : |
whether child is infact inside container .
|
void glade_widget_adaptor_child_set_property (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
,const gchar *property_name
,const GValue *value
);
Sets child
's packing property identified by property_name
to value
.
|
A GladeWidgetAdaptor |
|
The GObject container |
|
The GObject child |
|
The id of the property |
|
The GValue
|
void glade_widget_adaptor_child_get_property (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
,const gchar *property_name
,GValue *value
);
Gets child
's packing property identified by property_name
.
|
A GladeWidgetAdaptor |
|
The GObject container |
|
The GObject child |
|
The id of the property |
|
The GValue
|
gboolean glade_widget_adaptor_child_verify_property (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *child
,const gchar *property_name
,const GValue *value
);
This delagate function is always called whenever setting any properties with the exception of load time, and copy/paste time (basicly the two places where we recreate a hierarchy that we already know "works") its basicly an optional backend provided boundry checker for properties.
|
A GladeWidgetAdaptor |
|
The GObject container |
|
The GObject child |
|
The id of the property |
|
The GValue
|
Returns : |
whether or not its OK to set value on object , this function
will silently return TRUE if the class did not provide a verify function.
|
void glade_widget_adaptor_replace_child (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *old_obj
,GObject *new_obj
);
Replaces old_obj
with new_obj
in container
while positioning
new_obj
where old_obj
was and assigning it appropriate packing
property values.
|
A GladeWidgetAdaptor |
|
The GObject container |
|
The old GObject child |
|
The new GObject child |
void glade_widget_adaptor_read_child (GladeWidgetAdaptor *adaptor
,GladeWidget *widget
,GladeXmlNode *node
);
This function is called to update load a child widget
from node
when loading xml files (will recurse into
glade_widget_read()
)
|
A GladeWidgetAdaptor |
|
The GladeWidget |
|
The GladeXmlNode |
void glade_widget_adaptor_read_widget (GladeWidgetAdaptor *adaptor
,GladeWidget *widget
,GladeXmlNode *node
);
This function is called to update widget
from node
when loading xml files.
|
A GladeWidgetAdaptor |
|
The GladeWidget |
|
The GladeXmlNode |
void glade_widget_adaptor_write_child (GladeWidgetAdaptor *adaptor
,GladeWidget *widget
,GladeXmlContext *context
,GladeXmlNode *node
);
This function is called to write the child widget
to node
when writing xml files (takes care of packing and recurses
into glade_widget_write()
)
|
A GladeWidgetAdaptor |
|
The GladeWidget |
|
The GladeXmlContext |
|
The GladeXmlNode |
void glade_widget_adaptor_write_widget (GladeWidgetAdaptor *adaptor
,GladeWidget *widget
,GladeXmlContext *context
,GladeXmlNode *node
);
This function is called to write widget
to node
when writing xml files.
|
A GladeWidgetAdaptor |
|
The GladeWidget |
|
The GladeXmlContext |
|
The GladeXmlNode |
gboolean glade_widget_adaptor_query (GladeWidgetAdaptor *adaptor
);
|
A GladeWidgetAdaptor |
Returns : |
whether the user needs to be queried for certain properties upon creation of this class. |
gchar * glade_widget_adaptor_get_packing_default (GladeWidgetAdaptor *child_adaptor
,GladeWidgetAdaptor *container_adaptor
,const gchar *id
);
Gets the default value for property_id
on a widget governed by
child_adaptor
when parented in a widget governed by parent_adaptor
|
A GladeWidgetAdaptor |
|
The GladeWidgetAdaptor for the parent object |
|
The string property identifier |
Returns : |
a string representing the default value for property_id
|
gboolean glade_widget_adaptor_is_container (GladeWidgetAdaptor *adaptor
);
Checks whether or not this adaptor has support to interface with child objects.
|
A GladeWidgetAdaptor |
Returns : |
whether or not adaptor is a container
|
gboolean glade_widget_adaptor_action_add (GladeWidgetAdaptor *adaptor
,const gchar *action_path
,const gchar *label
,const gchar *stock
,gboolean important
);
Add an action to adaptor
.
If the action is present then it overrides label and stock
|
A GladeWidgetAdaptor |
|
The identifier of this action in the action tree |
|
A translated label to show in the UI for this action |
|
If set, this stock item will be shown in the UI along side the label. |
|
if this action is important. |
Returns : |
whether or not the action was added/updated. |
gboolean glade_widget_adaptor_pack_action_add (GladeWidgetAdaptor *adaptor
,const gchar *action_path
,const gchar *label
,const gchar *stock
,gboolean important
);
Add a packing action to adaptor
.
If the action is present then it overrides label and stock
|
A GladeWidgetAdaptor |
|
The identifier of this action in the action tree |
|
A translated label to show in the UI for this action |
|
If set, this stock item will be shown in the UI along side the label. |
|
if this action is important. |
Returns : |
whether or not the action was added/updated. |
gboolean glade_widget_adaptor_action_remove (GladeWidgetAdaptor *adaptor
,const gchar *action_path
);
Remove an adaptor
's action.
|
A GladeWidgetAdaptor |
|
The identifier of this action in the action tree |
Returns : |
whether or not the action was removed. |
gboolean glade_widget_adaptor_pack_action_remove (GladeWidgetAdaptor *adaptor
,const gchar *action_path
);
Remove an adaptor
's packing action.
|
A GladeWidgetAdaptor |
|
The identifier of this action in the action tree |
Returns : |
whether or not the action was removed. |
GList * glade_widget_adaptor_pack_actions_new
(GladeWidgetAdaptor *adaptor
);
Create a list of packing actions.
|
A GladeWidgetAdaptor |
Returns : |
a new list of GladeWidgetAction. |
void glade_widget_adaptor_action_activate (GladeWidgetAdaptor *adaptor
,GObject *object
,const gchar *action_path
);
An adaptor function to be called on widget actions.
|
A GladeWidgetAdaptor |
|
The GObject |
|
The action identifier in the action tree |
void glade_widget_adaptor_child_action_activate (GladeWidgetAdaptor *adaptor
,GObject *container
,GObject *object
,const gchar *action_path
);
An adaptor function to be called on widget actions.
|
A GladeWidgetAdaptor |
|
The GObject |
|
The action identifier in the action tree |
gchar * glade_widget_adaptor_string_from_value (GladeWidgetAdaptor *adaptor
,GladePropertyClass *klass
,const GValue *value
,GladeProjectFormat fmt
);
For normal properties this is used to serialize property values, for custom properties its still needed to update the UI for undo/redo items etc.
|
A GladeWidgetAdaptor |
|
The GladePropertyClass |
|
The GValue to convert to a string |
|
The GladeProjectFormat the string should conform to |
Returns : |
A newly allocated string representation of value
|