## GladeProperty

GladeProperty — An interface to properties on the GladeWidget.

## Functions

GladeProperty * | glade_property_new ()
GladeProperty * | glade_property_dup ()
void | glade_property_reset ()
void | glade_property_original_reset ()
gboolean | glade_property_default ()
gboolean | glade_property_original_default ()
gboolean | glade_property_equals_value ()
gboolean | glade_property_equals ()
gboolean | glade_property_set_value ()
gboolean | glade_property_set_va_list ()
gboolean | glade_property_set ()
void | glade_property_get_value ()
void | glade_property_get_default ()
void | glade_property_get_va_list ()
void | glade_property_get ()
void | glade_property_add_object ()
void | glade_property_remove_object ()
void | glade_property_sync ()
void | glade_property_load ()
void | glade_property_read ()
void | glade_property_write ()
void | glade_property_set_sensitive ()
gboolean | glade_property_get_sensitive ()
void | glade_property_set_save_always ()
gboolean | glade_property_get_save_always ()
void | glade_property_set_enabled ()
gboolean | glade_property_get_enabled ()
void | glade_property_i18n_set_comment ()
const gchar * | glade_property_i18n_get_comment ()
void | glade_property_i18n_set_translatable ()
gboolean | glade_property_i18n_get_translatable ()
void | glade_property_push_superuser ()
void | glade_property_pop_superuser ()
gboolean | glade_property_superuser ()
gchar * | glade_property_make_string ()
void | glade_property_set_support_warning ()
void | glade_property_set_widget ()
GladePropertyDef * | glade_property_get_def ()
GladePropertyState | glade_property_get_state ()
const gchar * | glade_property_get_support_warning ()
GladeWidget * | glade_property_get_widget ()
const gchar * | glade_property_i18n_get_context ()
void | glade_property_i18n_set_context ()
GValue * | glade_property_inline_value ()
const gchar * | glade_propert_get_insensitive_tooltip ()
gboolean | glade_property_warn_usage ()

## Properties

gpointer | class | Read / Write / Construct Only
gboolean | enabled | Read / Write
gchar * | i18n-comment | Read / Write
gchar * | i18n-context | Read / Write
gboolean | i18n-translatable | Read / Write
gint | precision | Read / Write
gboolean | sensitive | Read / Write
gint | state | Read

## Signals

void | tooltip-changed | Run Last
void | value-changed | Run Last

## Types and Values

| GladeProperty
enum | GladePropertyState

## Object Hierarchy

        GObject
        ╰── GladeProperty

## Description

Every object property of every GladeWidget in every GladeProject has a GladeProperty to interface with, GladeProperty provides a means to handle properties in the runtime environment.

A GladeProperty can be seen as an instance of a GladePropertyDef, the GladePropertyDef describes how a GladeProperty will function.

## Functions

### glade_property_new ()

    GladeProperty *
    glade_property_new (GladePropertyDef *def,
                        GladeWidget *widget,
                        GValue *value);

Creates a GladeProperty of type `klass` for `widget` with `value` ; if `value` is `NULL`, then the introspected default value for that property will be used.

#### Parameters

def | A GladePropertyDef defining this property |
widget | The GladeWidget this property is created for |
value | The initial GValue of the property or `NULL` (the GladeProperty will assume ownership of `value` ) |

#### Returns

The newly created GladeProperty

### glade_property_dup ()

    GladeProperty *
    glade_property_dup (GladeProperty *template_prop,
                        GladeWidget *widget);

#### Parameters

template_prop | A GladeProperty |
widget | A GladeWidget |

#### Returns

A newly duplicated property based on the new widget.

[transfer full]

### glade_property_reset ()

    void
    glade_property_reset (GladeProperty *property);

Resets this property to its default value

#### Parameters

property | A GladeProperty |

### glade_property_original_reset ()

    void
    glade_property_original_reset (GladeProperty *property);

Resets this property to its original default value

#### Parameters

property | A GladeProperty |

### glade_property_default ()

    gboolean
    glade_property_default (GladeProperty *property);

#### Parameters

property | A GladeProperty |

#### Returns

Whether this property is at its default value

### glade_property_original_default ()

    gboolean
    glade_property_original_default (GladeProperty *property);

#### Parameters

property | A GladeProperty |

#### Returns

Whether this property is at its original default value

### glade_property_equals_value ()

    gboolean
    glade_property_equals_value (GladeProperty *property,
                                 const GValue *value);

#### Parameters

property | a GladeProperty |
value | a GValue |

#### Returns

Whether this property is equal to the value provided

### glade_property_equals ()

    gboolean
    glade_property_equals (GladeProperty *property,
                           ...);

#### Parameters

property | a GladeProperty |
... | a provided property value |

#### Returns

Whether this property is equal to the value provided

### glade_property_set_value ()

    gboolean
    glade_property_set_value (GladeProperty *property,
                              const GValue *value);

Sets the property's value

#### Parameters

property | a GladeProperty |
value | a GValue |

#### Returns

Whether the property was successfully set.

### glade_property_set_va_list ()

    gboolean
    glade_property_set_va_list (GladeProperty *property,
                                va_list vl);

Sets the property's value

#### Parameters

property | a GladeProperty |
vl | a va_list with value to set |

### glade_property_set ()

    gboolean
    glade_property_set (GladeProperty *property,
                        ...);

Sets the property's value (in a convenient way)

#### Parameters

property | a GladeProperty |
... | the value to set |

### glade_property_get_value ()

    void
    glade_property_get_value (GladeProperty *property,
                              GValue *value);

Retrieve the property value

#### Parameters

property | a GladeProperty |
value | a GValue |

### glade_property_get_default ()

    void
    glade_property_get_default (GladeProperty *property,
                                GValue *value);

Retrieve the default property value

#### Parameters

property | a GladeProperty |
value | a GValue |

### glade_property_get_va_list ()

    void
    glade_property_get_va_list (GladeProperty *property,
                                va_list vl);

Retrieve the property value

#### Parameters

property | a GladeProperty |
vl | a va_list |

### glade_property_get ()

    void
    glade_property_get (GladeProperty *property,
                        ...);

Retrieve the property value

#### Parameters

property | a GladeProperty |
... | An address to store the value |

### glade_property_add_object ()

    void
    glade_property_add_object (GladeProperty *property,
                               GObject *object);

Adds `object` to the object list in `property` .

Note: This function expects `property` to be a GladeParamSpecObjects or GParamSpecObject type property.

#### Parameters

property | a GladeProperty |
object | The GObject to add |

### glade_property_remove_object ()

    void
    glade_property_remove_object (GladeProperty *property,
                                  GObject *object);

Removes `object` from the object list in `property` .

Note: This function expects `property` to be a GladeParamSpecObjects or GParamSpecObject type property.

#### Parameters

property | a GladeProperty |
object | The GObject to add |

### glade_property_sync ()

    void
    glade_property_sync (GladeProperty *property);

Synchronize the object with this property

#### Parameters

property | a GladeProperty |

### glade_property_load ()

    void
    glade_property_load (GladeProperty *property);

Loads the value of `property` from the corresponding object instance

#### Parameters

property | a GladeProperty |

### glade_property_read ()

    void
    glade_property_read (GladeProperty *property,
                         GladeProject *project,
                         GladeXmlNode *node);

Read the value and any attributes for `property` from `node` , assumes `property` is being loaded for `project`

Note that object values will only be resolved after the project is completely loaded

#### Parameters

property | a GladeProperty or NULL |
project | the GladeProject |
node | the GladeXmlNode to read, will either be a 'widget' node or a 'child' node for packing properties. |

### glade_property_write ()

    void
    glade_property_write (GladeProperty *property,
                          GladeXmlContext *context,
                          GladeXmlNode *node);

Write `property` to `node`

#### Parameters

property | a GladeProperty |
context | A GladeXmlContext |
node | A GladeXmlNode |

### glade_property_set_sensitive ()

    void
    glade_property_set_sensitive (GladeProperty *property,
                                  gboolean sensitive,
                                  const gchar *reason);

### glade_property_get_sensitive ()

    gboolean
    glade_property_get_sensitive (GladeProperty *property);

### glade_property_set_save_always ()

    void
    glade_property_set_save_always (GladeProperty *property,
                                    gboolean setting);

Sets whether this property should be special cased to always be saved regardless of its default value. (used for some special cases like properties that are assigned initial values in composite widgets or derived widget code).

#### Parameters

property | A GladeProperty |
setting | the value to set |

### glade_property_get_save_always ()

    gboolean
    glade_property_get_save_always (GladeProperty *property);

#### Parameters

property | A GladeProperty |

#### Returns

whether this property is special cased to always be saved regardless of its default value.

### glade_property_set_enabled ()

    void
    glade_property_set_enabled (GladeProperty *property,
                                gboolean enabled);

### glade_property_get_enabled ()

    gboolean
    glade_property_get_enabled (GladeProperty *property);

### glade_property_i18n_set_comment ()

    void
    glade_property_i18n_set_comment (GladeProperty *property,
                                     const gchar *str);

### glade_property_i18n_get_comment ()

    const gchar *
    glade_property_i18n_get_comment (GladeProperty *property);

### glade_property_i18n_set_translatable ()

    void
    glade_property_i18n_set_translatable (GladeProperty *property,
                                          gboolean translatable);

### glade_property_i18n_get_translatable ()

    gboolean
    glade_property_i18n_get_translatable (GladeProperty *property);

### glade_property_push_superuser ()

    void
    glade_property_push_superuser (void);

### glade_property_pop_superuser ()

    void
    glade_property_pop_superuser (void);

### glade_property_superuser ()

    gboolean
    glade_property_superuser (void);

### glade_property_make_string ()

    gchar *
    glade_property_make_string (GladeProperty *property);

### glade_property_set_support_warning ()

    void
    glade_property_set_support_warning (GladeProperty *property,
                                        gboolean disable,
                                        const gchar *reason);

### glade_property_set_widget ()

    void
    glade_property_set_widget (GladeProperty *property,
                               GladeWidget *widget);

#### Parameters

property | A GladeProperty |
widget | a GladeWidget. | [transfer full]

### glade_property_get_def ()

    GladePropertyDef *
    glade_property_get_def (GladeProperty *property);

Get the GladePropertyDef this property was created for.

#### Parameters

property | a GladeProperty |

#### Returns

a GladePropertyDef.

[transfer none]

### glade_property_get_state ()

    GladePropertyState
    glade_property_get_state (GladeProperty *property);

### glade_property_get_support_warning ()

    const gchar *
    glade_property_get_support_warning (GladeProperty *property);

### glade_property_get_widget ()

    GladeWidget *
    glade_property_get_widget (GladeProperty *property);

#### Parameters

property | A GladeProperty |

#### Returns

a GladeWidget.

[transfer none]

### glade_property_i18n_get_context ()

    const gchar *
    glade_property_i18n_get_context (GladeProperty *property);

### glade_property_i18n_set_context ()

    void
    glade_property_i18n_set_context (GladeProperty *property,
                                     const gchar *str);

### glade_property_inline_value ()

    GValue *
    glade_property_inline_value (GladeProperty *property);

### glade_propert_get_insensitive_tooltip ()

    const gchar *
    glade_propert_get_insensitive_tooltip (GladeProperty *property);

### glade_property_warn_usage ()

    gboolean
    glade_property_warn_usage (GladeProperty *property);

## Types and Values

### GladeProperty

    typedef struct _GladeProperty GladeProperty;

### enum GladePropertyState

#### Members

GLADE_STATE_NORMAL |  |
GLADE_STATE_CHANGED |  |
GLADE_STATE_UNSUPPORTED |  |
GLADE_STATE_SUPPORT_DISABLED |  |

## Property Details

### The `“class”` property

      “class”                    gpointer

The GladePropertyDef for this property.

Owner: GladeProperty

Flags: Read / Write / Construct Only

### The `“enabled”` property

      “enabled”                  gboolean

If the property is optional, this is its enabled state.

Owner: GladeProperty

Flags: Read / Write

Default value: TRUE

### The `“i18n-comment”` property

      “i18n-comment”             gchar *

Comment for translators.

Owner: GladeProperty

Flags: Read / Write

Default value: NULL

### The `“i18n-context”` property

      “i18n-context”             gchar *

Context for translation.

Owner: GladeProperty

Flags: Read / Write

Default value: NULL

### The `“i18n-translatable”` property

      “i18n-translatable”        gboolean

Whether this property is translatable.

Owner: GladeProperty

Flags: Read / Write

Default value: TRUE

### The `“precision”` property

      “precision”                gint

Where applicable, precision to use on editors.

Owner: GladeProperty

Flags: Read / Write

Allowed values: >= 0

Default value: 2

### The `“sensitive”` property

      “sensitive”                gboolean

This gives backends control to set property sensitivity.

Owner: GladeProperty

Flags: Read / Write

Default value: TRUE

### The `“state”` property

      “state”                    gint

Priority information for the property editor to act on.

Owner: GladeProperty

Flags: Read

Allowed values: >= 0

Default value: 0

## Signal Details

### The `“tooltip-changed”` signal

    void
    user_function (GladeProperty *gladeproperty,
                   gchar         *arg1,
                   gchar         *arg2,
                   gchar         *arg3,
                   gpointer       user_data)

Flags: Run Last

### The `“value-changed”` signal

    void
    user_function (GladeProperty *gladeproperty,
                   gpointer       arg1,
                   gpointer       arg2,
                   gpointer       user_data)

Flags: Run Last