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

## Functions

#define | GWA_IS_TOPLEVEL()
#define | GWA_USE_PLACEHOLDERS()
#define | GWA_DEFAULT_WIDTH()
#define | GWA_DEFAULT_HEIGHT()
#define | GWA_GET_CLASS()
#define | GWA_GET_OCLASS()
#define | GLADE_VALID_CREATE_REASON()
void | (*GladeSetPropertyFunc) ()
void | (*GladeGetPropertyFunc) ()
gboolean | (*GladeVerifyPropertyFunc) ()
void | (*GladeChildSetPropertyFunc) ()
void | (*GladeChildGetPropertyFunc) ()
gboolean | (*GladeChildVerifyPropertyFunc) ()
GList * | (*GladeGetChildrenFunc) ()
void | (*GladeAddChildFunc) ()
void | (*GladeRemoveChildFunc) ()
void | (*GladeReplaceChildFunc) ()
void | (*GladePostCreateFunc) ()
GObject * | (*GladeGetInternalFunc) ()
void | (*GladeActionActivateFunc) ()
void | (*GladeChildActionActivateFunc) ()
void | (*GladeReadWidgetFunc) ()
void | (*GladeWriteWidgetFunc) ()
GladeEditorProperty * | (*GladeCreateEPropFunc) ()
gchar * | (*GladeStringFromValueFunc) ()
#define | glade_widget_adaptor_create_widget()
GladeEditorProperty * | glade_widget_adaptor_create_eprop ()
GladeWidgetAdaptor * | glade_widget_adaptor_from_pspec ()
GladeWidgetAdaptor * | glade_widget_adaptor_from_catalog ()
void | glade_widget_adaptor_register ()
GladeWidget * | glade_widget_adaptor_create_internal ()
GladeWidget * | glade_widget_adaptor_create_widget_real ()
GladeWidgetAdaptor * | glade_widget_adaptor_get_by_name ()
GladeWidgetAdaptor * | glade_widget_adaptor_get_by_type ()
GladePropertyClass * | glade_widget_adaptor_get_property_class ()
GladePropertyClass * | glade_widget_adaptor_get_pack_property_class ()
GParameter * | glade_widget_adaptor_default_params ()
void | glade_widget_adaptor_post_create ()
GObject * | glade_widget_adaptor_get_internal_child ()
void | glade_widget_adaptor_set_property ()
void | glade_widget_adaptor_get_property ()
gboolean | glade_widget_adaptor_verify_property ()
void | glade_widget_adaptor_add ()
void | glade_widget_adaptor_remove ()
GList * | glade_widget_adaptor_get_children ()
gboolean | glade_widget_adaptor_has_child ()
void | glade_widget_adaptor_child_set_property ()
void | glade_widget_adaptor_child_get_property ()
gboolean | glade_widget_adaptor_child_verify_property ()
void | glade_widget_adaptor_replace_child ()
void | glade_widget_adaptor_read_child ()
void | glade_widget_adaptor_read_widget ()
void | glade_widget_adaptor_write_child ()
void | glade_widget_adaptor_write_widget ()
gboolean | glade_widget_adaptor_query ()
const gchar * | glade_widget_adaptor_get_packing_default ()
gboolean | glade_widget_adaptor_is_container ()
gboolean | glade_widget_adaptor_action_add ()
gboolean | glade_widget_adaptor_pack_action_add ()
gboolean | glade_widget_adaptor_action_remove ()
gboolean | glade_widget_adaptor_pack_action_remove ()
GList * | glade_widget_adaptor_pack_actions_new ()
void | glade_widget_adaptor_action_activate ()
void | glade_widget_adaptor_child_action_activate ()
gchar * | glade_widget_adaptor_string_from_value ()

## Properties

gchar * | book | Read / Write / Construct Only
gchar * | catalog | Read / Write / Construct Only
gpointer | cursor | Read
gchar * | generic-name | Read / Write / Construct Only
gchar * | icon-name | Read / Write / Construct Only
gchar * | name | Read / Write / Construct Only
gchar * | special-child-type | Read / Write / Construct Only
gchar * | title | Read / Write
GType * | type | Read / Write / Construct Only

## Types and Values

enum | GladeCreateReason
#define | GLADE_TYPE_CREATE_REASON
| GladeWidgetAdaptor

## Object Hierarchy

        GObject
        ╰── GladeWidgetAdaptor

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

## Functions

### GWA_IS_TOPLEVEL()

    #define             GWA_IS_TOPLEVEL(obj)

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

#### Parameters

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

#### Parameters

obj | A GladeWidgetAdaptor |

### GWA_DEFAULT_WIDTH()

    #define             GWA_DEFAULT_WIDTH(obj)

#### Parameters

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)

#### Parameters

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

#### Parameters

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

#### Parameters

type | A GType. |

### GLADE_VALID_CREATE_REASON()

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

### 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

#### Parameters

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

#### Parameters

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.

#### Parameters

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

#### Parameters

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

#### Parameters

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.

#### Parameters

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.

#### Parameters

adaptor | A GladeWidgetAdaptor |
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` .

#### Parameters

adaptor | A GladeWidgetAdaptor |
parent | A GObject container |
child | A GObject child |

### GladeRemoveChildFunc ()

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

Called to remove `child` from `parent` .

#### Parameters

adaptor | A GladeWidgetAdaptor |
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.

#### Parameters

adaptor | A GladeWidgetAdaptor |
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.

#### Parameters

adaptor | A GladeWidgetAdaptor |
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` .

#### Parameters

adaptor | A GladeWidgetAdaptor |
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.

#### Parameters

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.

#### Parameters

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

#### Parameters

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

#### Parameters

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`

#### Parameters

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

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.

#### Parameters

adaptor | A GladeWidgetAdaptor |
klass | The GladePropertyClass |
value | The GValue to convert to a string |

#### Returns

A newly allocated string representation of `value`

### 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

#### Parameters

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`

#### Parameters

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

#### Parameters

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.

#### Parameters

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

#### Parameters

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.

#### Parameters

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

#### Parameters

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

#### Parameters

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`

#### Parameters

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

#### Parameters

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

#### Parameters

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`

#### Parameters

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.

#### Parameters

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

#### Parameters

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.

#### Parameters

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

#### Parameters

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

#### Parameters

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

#### Parameters

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

#### Parameters

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

#### Parameters

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

#### Parameters

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.

#### Parameters

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.

#### Parameters

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

#### Parameters

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.

#### Parameters

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

#### Parameters

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.

#### Parameters

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

### glade_widget_adaptor_query ()

    gboolean
    glade_widget_adaptor_query (GladeWidgetAdaptor *adaptor);

#### Parameters

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

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

#### Parameters

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.

#### Parameters

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

#### Parameters

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

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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

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.

#### Parameters

adaptor | A GladeWidgetAdaptor |
klass | The GladePropertyClass |
value | The GValue to convert to a string |

#### Returns

A newly allocated string representation of `value`

## Types and Values

### enum GladeCreateReason

These are the reasons your GladePostCreateFunc can be called.

#### Members

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

### GLADE_TYPE_CREATE_REASON

    #define GLADE_TYPE_CREATE_REASON (glade_create_reason_get_type ())

### GladeWidgetAdaptor

    typedef struct _GladeWidgetAdaptor GladeWidgetAdaptor;

## Property Details

### The `“book”` property

      “book”                     gchar *

DevHelp search namespace for this widget class.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“catalog”` property

      “catalog”                  gchar *

The name of the widget catalog this class was declared by.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“cursor”` property

      “cursor”                   gpointer

A cursor for inserting widgets in the UI.

Flags: Read

### The `“generic-name”` property

      “generic-name”             gchar *

Used to generate names of new widgets.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“icon-name”` property

      “icon-name”                gchar *

The icon name.

Flags: Read / Write / Construct Only

Default value: "widget-gtk-frame"

### The `“name”` property

      “name”                     gchar *

Name of the class.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“special-child-type”` property

      “special-child-type”       gchar *

Holds the name of the packing property to depict special children for this container class.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“title”` property

      “title”                    gchar *

Translated title for the class used in the glade UI.

Flags: Read / Write

Default value: NULL

### The `“type”` property

      “type”                     GType *

GType of the class.

Flags: Read / Write / Construct Only

Allowed values: void