EekElement

## EekElement EekElement — Base class of a keyboard element |

## Synopsis

                        EekElement;
    struct              EekElementClass;
    void                eek_element_get_absolute_position   (EekElement *element,
                                                             gdouble *x,
                                                             gdouble *y);
    void                eek_element_get_bounds              (EekElement *element,
                                                             EekBounds *bounds);
    gint                eek_element_get_group               (EekElement *element);
    gint                eek_element_get_level               (EekElement *element);
    const gchar *       eek_element_get_name                (EekElement *element);
    EekElement *        eek_element_get_parent              (EekElement *element);
    void                eek_element_get_symbol_index        (EekElement *element,
                                                             gint *group,
                                                             gint *level);
    void                eek_element_set_bounds              (EekElement *element,
                                                             EekBounds *bounds);
    void                eek_element_set_group               (EekElement *element,
                                                             gint group);
    void                eek_element_set_level               (EekElement *element,
                                                             gint level);
    void                eek_element_set_name                (EekElement *element,
                                                             const gchar *name);
    void                eek_element_set_parent              (EekElement *element,
                                                             EekElement *parent);
    void                eek_element_set_position            (EekElement *element,
                                                             gdouble x,
                                                             gdouble y);
    void                eek_element_set_size                (EekElement *element,
                                                             gdouble width,
                                                             gdouble height);
    void                eek_element_set_symbol_index        (EekElement *element,
                                                             gint group,
                                                             gint level);

## Object Hierarchy

      GObject
       +----EekElement
             +----EekContainer
             +----EekKey

## Properties

      "bounds"                   EekBounds*            : Read / Write
      "group"                    gint                  : Read / Write
      "level"                    gint                  : Read / Write
      "name"                     gchar*                : Read / Write

## Signals

      "symbol-index-changed"                           : Run Last

## Description

The EekElementClass class represents a keyboard element, which shall be used to implement EekKeyboard, EekSection, or EekKey.

## Details

### EekElement

    typedef struct _EekElement EekElement;

### struct EekElementClass

    struct EekElementClass {
    };

### eek_element_get_absolute_position ()

    void                eek_element_get_absolute_position   (EekElement *element,
                                                             gdouble *x,
                                                             gdouble *y);

Compute the absolute position of `element`.

`element` : | an EekElement
`x` : | pointer where the X coordinate of `element` will be stored
`y` : | pointer where the Y coordinate of `element` will be stored

### eek_element_get_bounds ()

    void                eek_element_get_bounds              (EekElement *element,
                                                             EekBounds *bounds);

Get the bounding box of `element`. Note that if `element` has parent, position of `bounds` are relative to the parent. To obtain the absolute position, use `eek_element_get_absolute_position()`.

`element` : | an EekElement
`bounds` : | pointer where bounding box of `element` will be stored. [out]

### eek_element_get_group ()

    gint                eek_element_get_group               (EekElement *element);

Return the group value of the default symbol index of `element`. If the value is not set, -1 will be returned.

See also: `eek_element_get_symbol_index()`

`element` : | an EekElement

### eek_element_get_level ()

    gint                eek_element_get_level               (EekElement *element);

Return the level value of the default symbol index of `element`. If the value is not set, -1 will be returned.

See also: `eek_element_get_symbol_index()`

`element` : | an EekElement

### eek_element_get_name ()

    const gchar *       eek_element_get_name                (EekElement *element);

Get the name of `element`.

`element` : | an EekElement
Returns : | the name of `element` or NULL when the name is not set

### eek_element_get_parent ()

    EekElement *        eek_element_get_parent              (EekElement *element);

Get the parent of `element`.

`element` : | an EekElement
Returns : | an EekElement if the parent is set

### eek_element_get_symbol_index ()

    void                eek_element_get_symbol_index        (EekElement *element,
                                                             gint *group,
                                                             gint *level);

Get the default index of the symbol matrices of `element`. If the index is not set, -1 will be returned.

`element` : | an EekElement
`group` : | a pointer where the group value of the symbol index will be stored
`level` : | a pointer where the level value of the symbol index will be stored

### eek_element_set_bounds ()

    void                eek_element_set_bounds              (EekElement *element,
                                                             EekBounds *bounds);

Set the bounding box of `element` to `bounds`. Note that if `element` has parent, X and Y positions of `bounds` are relative to the parent position.

`element` : | an EekElement
`bounds` : | bounding box of `element`

### eek_element_set_group ()

    void                eek_element_set_group               (EekElement *element,
                                                             gint group);

Set the group value of the default symbol index of `element`. To unset, pass -1 as `group`.

See also: `eek_element_set_symbol_index()`

`element` : | an EekElement
`group` : | group index of `element`

### eek_element_set_level ()

    void                eek_element_set_level               (EekElement *element,
                                                             gint level);

Set the level value of the default symbol index of `element`. To unset, pass -1 as `level`.

See also: `eek_element_set_symbol_index()`

`element` : | an EekElement
`level` : | level index of `element`

### eek_element_set_name ()

    void                eek_element_set_name                (EekElement *element,
                                                             const gchar *name);

Set the name of `element` to `name`.

`element` : | an EekElement
`name` : | name of `element`

### eek_element_set_parent ()

    void                eek_element_set_parent              (EekElement *element,
                                                             EekElement *parent);

Set the parent of `element` to `parent`.

`element` : | an EekElement
`parent` : | an EekElement or `NULL`. [allow-none]

### eek_element_set_position ()

    void                eek_element_set_position            (EekElement *element,
                                                             gdouble x,
                                                             gdouble y);

Set the relative position of `element`.

`element` : | an EekElement
`x` : | X coordinate of top left corner
`y` : | Y coordinate of top left corner

### eek_element_set_size ()

    void                eek_element_set_size                (EekElement *element,
                                                             gdouble width,
                                                             gdouble height);

Set the size of `element`.

`element` : | an EekElement
`width` : | width of `element`
`height` : | height of `element`

### eek_element_set_symbol_index ()

    void                eek_element_set_symbol_index        (EekElement *element,
                                                             gint group,
                                                             gint level);

Set the default index of the symbol matrices of `element`. The setting affects the child, if child does not have the index set, as well as this element. To unset, pass -1 as group/level.

`element` : | an EekElement
`group` : | row index of the symbol matrix
`level` : | column index of the symbol matrix

## Property Details

### The `"bounds"` property

      "bounds"                   EekBounds*            : Read / Write

The bounding box of EekElement.

### The `"group"` property

      "group"                    gint                  : Read / Write

The group value of the symbol index of EekElement.

Allowed values: >= G_MAXULONG

Default value: -1

### The `"level"` property

      "level"                    gint                  : Read / Write

The level value of the symbol index of EekElement.

Allowed values: >= G_MAXULONG

Default value: -1

### The `"name"` property

      "name"                     gchar*                : Read / Write

The name of EekElement.

Default value: NULL

## Signal Details

### The `"symbol-index-changed"` signal

    void                user_function                      (EekElement *element,
                                                            gint        group,
                                                            gint        level,
                                                            gpointer    user_data)      : Run Last

The ::symbol-index-changed signal is emitted each time the global configuration of group/level index changes.

`element` : | an EekElement
`group` : | row index of the symbol matrix of keys on `element`
`level` : | column index of the symbol matrix of keys on `element`
`user_data` : | user data set when the signal handler was connected.