## GladeWidgetAdaptor GladeWidgetAdaptor — Adaptor base class to add runtime support for each widget class. |

## Synopsis

    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);

## Description

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.

## Details

### enum GladeCreateReason

    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.

`GLADE_CREATE_USER` | 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).
`GLADE_CREATE_COPY` | 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.
`GLADE_CREATE_LOAD` | Was created during the load process.
`GLADE_CREATE_REBUILD` | 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.
`GLADE_CREATE_REASONS` | Never used.

### GWA_IS_FIXED()

    #define             GWA_IS_FIXED(obj)

Checks whether this widget adaptor should be handled as a free-form container

`obj` : | A GladeWidgetAdaptor

### GWA_IS_TOPLEVEL()

    #define             GWA_IS_TOPLEVEL(obj)

Checks whether this widget class has been marked as a toplevel one.

`obj` : | A GladeWidgetAdaptor

### GWA_USE_PLACEHOLDERS()

    #define             GWA_USE_PLACEHOLDERS(obj)

Checks whether this widget class has been marked to use placeholders in child widget operations

`obj` : | A GladeWidgetAdaptor

### GWA_DEFAULT_WIDTH()

    #define             GWA_DEFAULT_WIDTH(obj)

`obj` : | A GladeWidgetAdaptor
Returns : | the default width to be used when this widget is toplevel in the GladeDesignLayout

### GWA_DEFAULT_HEIGHT()

    #define             GWA_DEFAULT_HEIGHT(obj)

`obj` : | A GladeWidgetAdaptor
Returns : | the default width to be used when this widget is toplevel in the GladeDesignLayout

### GWA_GET_CLASS()

    #define             GWA_GET_CLASS(type)

Shorthand for referencing glade adaptor classes from the plugin eg. GWA_GET_CLASS (GTK_TYPE_CONTAINER)->post_create (adaptor...

`type` : | A GType

### GWA_GET_OCLASS()

    #define GWA_GET_OCLASS(type) ((GObjectClass*)GWA_GET_CLASS(type))

Same as GWA_GET_CLASS but casted to GObjectClass

`type` : | A GType.

### GLADE_VALID_CREATE_REASON()

    #define GLADE_VALID_CREATE_REASON(reason) (reason >= 0 && reason < GLADE_CREATE_REASONS)

### GLADE_TYPE_CREATE_REASON

    #define GLADE_TYPE_CREATE_REASON (glade_create_reason_get_type())

### GladeSetPropertyFunc ()

    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

`adaptor` : | A GladeWidgetAdaptor
`object` : | The GObject
`property_name` : | The property identifier
`value` : | The GValue

### GladeGetPropertyFunc ()

    void                (*GladeGetPropertyFunc)             (GladeWidgetAdaptor *adaptor,
                                                             GObject *object,
                                                             const gchar *property_name,
                                                             GValue *value);

Gets `value` on `object` for a given GladePropertyClass

`adaptor` : | A GladeWidgetAdaptor
`object` : | The GObject
`property_name` : | The property identifier
`value` : | The GValue

### GladeVerifyPropertyFunc ()

    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.

`adaptor` : | A GladeWidgetAdaptor
`object` : | The GObject
`property_name` : | The property identifier
`value` : | The GValue
Returns : | whether or not its OK to set `value` on `object`

### GladeChildSetPropertyFunc ()

    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`.

`adaptor` : | A GladeWidgetAdaptor
`container` : | The GObject container
`child` : | The GObject child
`property_name` : | The property name
`value` : | The GValue

### GladeChildGetPropertyFunc ()

    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`.

`adaptor` : | A GladeWidgetAdaptor
`container` : | The GObject container
`child` : | The GObject child
`property_name` : | The property name
`value` : | The GValue

### GladeChildVerifyPropertyFunc ()

    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.

`adaptor` : | A GladeWidgetAdaptor
`container` : | The GObject container
`child` : | The GObject child
`property_name` : | The property name
`value` : | The GValue
Returns : | whether or not its OK to set `value` on `object`

### GladeGetChildrenFunc ()

    GList *             (*GladeGetChildrenFunc)             (GladeWidgetAdaptor *adaptor,
                                                             GObject *container);

A function called to get `containers` children.

`container` : | A GObject container
Returns : | A GList of GObject children.

### GladeAddChildFunc ()

    void                (*GladeAddChildFunc)                (GladeWidgetAdaptor *adaptor,
                                                             GObject *parent,
                                                             GObject *child);

Called to add `child` to `parent`.

`parent` : | A GObject container
`child` : | A GObject child

### GladeRemoveChildFunc ()

    void                (*GladeRemoveChildFunc)             (GladeWidgetAdaptor *adaptor,
                                                             GObject *parent,
                                                             GObject *child);

Called to remove `child` from `parent`.

`parent` : | A GObject container
`child` : | A GObject child

### GladeReplaceChildFunc ()

    void                (*GladeReplaceChildFunc)            (GladeWidgetAdaptor *adaptor,
                                                             GObject *container,
                                                             GObject *old_obj,
                                                             GObject *new_obj);

Called to swap placeholders with project objects in containers.

`container` : | A GObject container
`old_obj` : | The old GObject child
`new_obj` : | The new GObject child to take its place

### GladePostCreateFunc ()

    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.

`object` : | a GObject
`reason` : | a GladeCreateReason

### GladeGetInternalFunc ()

    GObject *           (*GladeGetInternalFunc)             (GladeWidgetAdaptor *adaptor,
                                                             GObject *parent,
                                                             const gchar *name);

Called to lookup `child` in composite object `parent` by `name`.

`parent` : | A GObject composite object
`name` : | A string identifier
Returns : | The specified internal widget.

### GladeActionActivateFunc ()

    void                (*GladeActionActivateFunc)          (GladeWidgetAdaptor *adaptor,
                                                             GObject *object,
                                                             const gchar *action_path);

This delagate function is used to catch actions from the core.

`adaptor` : | A GladeWidgetAdaptor
`object` : | The GObject
`action_path` : | The action path

### GladeChildActionActivateFunc ()

    void                (*GladeChildActionActivateFunc)     (GladeWidgetAdaptor *adaptor,
                                                             GObject *container,
                                                             GObject *object,
                                                             const gchar *action_path);

This delagate function is used to catch packing actions from the core.

`adaptor` : | A GladeWidgetAdaptor
`container` : | The GtkContainer
`object` : | The GObject
`action_path` : | The action path

### GladeReadWidgetFunc ()

    void                (*GladeReadWidgetFunc)              (GladeWidgetAdaptor *adaptor,
                                                             GladeWidget *widget,
                                                             GladeXmlNode *node);

This function is called to update `widget` from `node`.

`adaptor` : | A GladeWidgetAdaptor
`widget` : | The GladeWidget
`node` : | The GladeXmlNode

### GladeWriteWidgetFunc ()

    void                (*GladeWriteWidgetFunc)             (GladeWidgetAdaptor *adaptor,
                                                             GladeWidget *widget,
                                                             GladeXmlContext *context,
                                                             GladeXmlNode *node);

This function is called to fill in `node` from `widget`.

`adaptor` : | A GladeWidgetAdaptor
`widget` : | The GladeWidget
`node` : | The GladeXmlNode

### GladeCreateEPropFunc ()

    GladeEditorProperty * (*GladeCreateEPropFunc)           (GladeWidgetAdaptor *adaptor,
                                                             GladePropertyClass *klass,
                                                             gboolean use_command);

Creates a GladeEditorProperty to edit `klass`

`adaptor` : | A GladeWidgetAdaptor
`klass` : | The GladePropertyClass to be edited
`use_command` : | whether to use the GladeCommand interface to commit property changes
Returns : | A newly created GladeEditorProperty

### GladeStringFromValueFunc ()

    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.

`adaptor` : | A GladeWidgetAdaptor
`klass` : | The GladePropertyClass
`value` : | The GValue to convert to a string
`fmt` : | The GladeProjectFormat the string should conform to
Returns : | A newly allocated string representation of `value`

### GladeWidgetAdaptor

    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 for widget class */

    	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;

### glade_widget_adaptor_create_widget()

    #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

`adaptor` : | a GladeWidgetAdaptor
`query` : | whether to display query dialogs if applicable to the class
`...` : | a `NULL` terminated list of string/value pairs of GladeWidget properties

### glade_widget_adaptor_create_eprop ()

    GladeEditorProperty * glade_widget_adaptor_create_eprop (GladeWidgetAdaptor *adaptor,
                                                             GladePropertyClass *klass,
                                                             gboolean use_command);

Creates a GladeEditorProperty to edit `klass`

`adaptor` : | A GladeWidgetAdaptor
`klass` : | The GladePropertyClass to be edited
`use_command` : | whether to use the GladeCommand interface to commit property changes
Returns : | A newly created GladeEditorProperty

### glade_widget_adaptor_from_pclass()

    #define             glade_widget_adaptor_from_pclass(pclass)

### glade_widget_adaptor_from_pspec ()

    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`.

`adaptor` : | a GladeWidgetAdaptor
`pspec` : | a GParamSpec
Returns : | the closest GladeWidgetAdaptor in the ancestry to `adaptor` which is responsable for introducing `pspec`.

### glade_widget_adaptor_from_catalog ()

    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.

`catalog` : | A GladeCatalog
`class_node` : | the GladeXmlNode to load
`module` : | the plugin GModule.

### glade_widget_adaptor_register ()

    void                glade_widget_adaptor_register       (GladeWidgetAdaptor *adaptor);

Registers `adaptor` into the Glade core (every supported object type must have a registered adaptor).

`adaptor` : | A GladeWidgetAdaptor

### glade_widget_adaptor_create_internal ()

    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.

`parent` : | The parent GladeWidget, or `NULL` for children outside of the hierarchy.
`internal_object` : | the GObject
`internal_name` : | a string identifier for this internal widget.
`parent_name` : | the generic name of the parent used for fancy child names.
`anarchist` : | Whether or not this widget is a widget outside of the parent's hierarchy (like a popup window)
`reason` : | 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`

### glade_widget_adaptor_create_widget_real ()

    GladeWidget *       glade_widget_adaptor_create_widget_real
                                                            (gboolean query,
                                                             const gchar *first_property,
                                                             ...);

### glade_widget_adaptor_get_by_name ()

    GladeWidgetAdaptor * glade_widget_adaptor_get_by_name   (const gchar *name);

`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

### glade_widget_adaptor_get_by_type ()

    GladeWidgetAdaptor * glade_widget_adaptor_get_by_type   (GType type);

`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

### glade_widget_adaptor_get_property_class ()

    GladePropertyClass * glade_widget_adaptor_get_property_class
                                                            (GladeWidgetAdaptor *adaptor,
                                                             const gchar *name);

Retrieves the GladePropertyClass for `name` in `adaptor`

`adaptor` : | a GladeWidgetAdaptor
`name` : | a string
Returns : | A GladePropertyClass object

### glade_widget_adaptor_get_pack_property_class ()

    GladePropertyClass * glade_widget_adaptor_get_pack_property_class
                                                            (GladeWidgetAdaptor *adaptor,
                                                             const gchar *name);

Retrieves the GladePropertyClass for `name` in `adaptor`'s child properties

`adaptor` : | a GladeWidgetAdaptor
`name` : | a string
Returns : | A GladePropertyClass object

### glade_widget_adaptor_default_params ()

    GParameter *        glade_widget_adaptor_default_params (GladeWidgetAdaptor *adaptor,
                                                             gboolean construct,
                                                             guint *n_params);

### glade_widget_adaptor_post_create ()

    void                glade_widget_adaptor_post_create    (GladeWidgetAdaptor *adaptor,
                                                             GObject *object,
                                                             GladeCreateReason reason);

An adaptor function to be called after the object is created

`adaptor` : | A GladeWidgetAdaptor
`object` : | The GObject
`reason` : | The GladeCreateReason that `object` was created for

### glade_widget_adaptor_get_internal_child ()

    GObject *           glade_widget_adaptor_get_internal_child
                                                            (GladeWidgetAdaptor *adaptor,
                                                             GObject *object,
                                                             const gchar *internal_name);

Retrieves the internal object `internal_name` from `object`

`adaptor` : | A GladeWidgetAdaptor
`object` : | The GObject
`internal_name` : | The string identifier of the internal object
Returns : | The internal GObject

### glade_widget_adaptor_set_property ()

    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.

`adaptor` : | A GladeWidgetAdaptor
`object` : | The GObject
`property_name` : | The property identifier
`value` : | The GValue

### glade_widget_adaptor_get_property ()

    void                glade_widget_adaptor_get_property   (GladeWidgetAdaptor *adaptor,
                                                             GObject *object,
                                                             const gchar *property_name,
                                                             GValue *value);

Gets `value` of `property_name` on `object`.

`adaptor` : | A GladeWidgetAdaptor
`object` : | The GObject
`property_name` : | The property identifier
`value` : | The GValue

### glade_widget_adaptor_verify_property ()

    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.

`adaptor` : | A GladeWidgetAdaptor
`object` : | The GObject
`property_name` : | The property identifier
`value` : | 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.

### glade_widget_adaptor_add ()

    void                glade_widget_adaptor_add            (GladeWidgetAdaptor *adaptor,
                                                             GObject *container,
                                                             GObject *child);

Adds `child` to `container`.

`adaptor` : | A GladeWidgetAdaptor
`container` : | The GObject container
`child` : | The GObject child

### glade_widget_adaptor_remove ()

    void                glade_widget_adaptor_remove         (GladeWidgetAdaptor *adaptor,
                                                             GObject *container,
                                                             GObject *child);

Removes `child` from `container`.

`adaptor` : | A GladeWidgetAdaptor
`container` : | The GObject container
`child` : | The GObject child

### glade_widget_adaptor_get_children ()

    GList *             glade_widget_adaptor_get_children   (GladeWidgetAdaptor *adaptor,
                                                             GObject *container);

Lists the children of `container`.

`adaptor` : | A GladeWidgetAdaptor
`container` : | The GObject container
Returns : | A GList of children

### glade_widget_adaptor_has_child ()

    gboolean            glade_widget_adaptor_has_child      (GladeWidgetAdaptor *adaptor,
                                                             GObject *container,
                                                             GObject *child);

`adaptor` : | A GladeWidgetAdaptor
`container` : | The GObject container
`child` : | The GObject child
Returns : | whether `child` is infact inside `container`.

### glade_widget_adaptor_child_set_property ()

    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`.

`adaptor` : | A GladeWidgetAdaptor
`container` : | The GObject container
`child` : | The GObject child
`property_name` : | The id of the property
`value` : | The `GValue`

### glade_widget_adaptor_child_get_property ()

    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`.

`adaptor` : | A GladeWidgetAdaptor
`container` : | The GObject container
`child` : | The GObject child
`property_name` : | The id of the property
`value` : | The `GValue`

### glade_widget_adaptor_child_verify_property ()

    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.

`adaptor` : | A GladeWidgetAdaptor
`container` : | The GObject container
`child` : | The GObject child
`property_name` : | The id of the property
`value` : | 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.

### glade_widget_adaptor_replace_child ()

    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.

`adaptor` : | A GladeWidgetAdaptor
`container` : | The GObject container
`old_obj` : | The old GObject child
`new_obj` : | The new GObject child

### glade_widget_adaptor_read_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()`)

`adaptor` : | A GladeWidgetAdaptor
`widget` : | The GladeWidget
`node` : | The GladeXmlNode

### glade_widget_adaptor_read_widget ()

    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.

`adaptor` : | A GladeWidgetAdaptor
`widget` : | The GladeWidget
`node` : | The GladeXmlNode

### glade_widget_adaptor_write_child ()

    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()`)

`adaptor` : | A GladeWidgetAdaptor
`widget` : | The GladeWidget
`context` : | The GladeXmlContext
`node` : | The GladeXmlNode

### glade_widget_adaptor_write_widget ()

    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.

`adaptor` : | A GladeWidgetAdaptor
`widget` : | The GladeWidget
`context` : | The GladeXmlContext
`node` : | The GladeXmlNode

### glade_widget_adaptor_query ()

    gboolean            glade_widget_adaptor_query          (GladeWidgetAdaptor *adaptor);

`adaptor` : | A GladeWidgetAdaptor
Returns : | whether the user needs to be queried for certain properties upon creation of this class.

### glade_widget_adaptor_get_packing_default ()

    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`

`child_adaptor` : | A GladeWidgetAdaptor
`container_adaptor` : | The GladeWidgetAdaptor for the parent object
`id` : | The string property identifier
Returns : | a string representing the default value for `property_id`

### glade_widget_adaptor_is_container ()

    gboolean            glade_widget_adaptor_is_container   (GladeWidgetAdaptor *adaptor);

Checks whether or not this adaptor has support to interface with child objects.

`adaptor` : | A GladeWidgetAdaptor
Returns : | whether or not `adaptor` is a container

### glade_widget_adaptor_action_add ()

    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

`adaptor` : | A GladeWidgetAdaptor
`action_path` : | The identifier of this action in the action tree
`label` : | A translated label to show in the UI for this action
`stock` : | If set, this stock item will be shown in the UI along side the label.
`important` : | if this action is important.
Returns : | whether or not the action was added/updated.

### glade_widget_adaptor_pack_action_add ()

    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

`adaptor` : | A GladeWidgetAdaptor
`action_path` : | The identifier of this action in the action tree
`label` : | A translated label to show in the UI for this action
`stock` : | If set, this stock item will be shown in the UI along side the label.
`important` : | if this action is important.
Returns : | whether or not the action was added/updated.

### glade_widget_adaptor_action_remove ()

    gboolean            glade_widget_adaptor_action_remove  (GladeWidgetAdaptor *adaptor,
                                                             const gchar *action_path);

Remove an `adaptor`'s action.

`adaptor` : | A GladeWidgetAdaptor
`action_path` : | The identifier of this action in the action tree
Returns : | whether or not the action was removed.

### glade_widget_adaptor_pack_action_remove ()

    gboolean            glade_widget_adaptor_pack_action_remove
                                                            (GladeWidgetAdaptor *adaptor,
                                                             const gchar *action_path);

Remove an `adaptor`'s packing action.

`adaptor` : | A GladeWidgetAdaptor
`action_path` : | The identifier of this action in the action tree
Returns : | whether or not the action was removed.

### glade_widget_adaptor_pack_actions_new ()

    GList *             glade_widget_adaptor_pack_actions_new
                                                            (GladeWidgetAdaptor *adaptor);

Create a list of packing actions.

`adaptor` : | A GladeWidgetAdaptor
Returns : | a new list of GladeWidgetAction.

### glade_widget_adaptor_action_activate ()

    void                glade_widget_adaptor_action_activate
                                                            (GladeWidgetAdaptor *adaptor,
                                                             GObject *object,
                                                             const gchar *action_path);

An adaptor function to be called on widget actions.

`adaptor` : | A GladeWidgetAdaptor
`object` : | The GObject
`action_path` : | The action identifier in the action tree

### glade_widget_adaptor_child_action_activate ()

    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.

`adaptor` : | A GladeWidgetAdaptor
`object` : | The GObject
`action_path` : | The action identifier in the action tree

### glade_widget_adaptor_string_from_value ()

    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.

`adaptor` : | A GladeWidgetAdaptor
`klass` : | The GladePropertyClass
`value` : | The GValue to convert to a string
`fmt` : | The GladeProjectFormat the string should conform to
Returns : | A newly allocated string representation of `value`