EekElement

EekElement — Base class of a keyboard element

Synopsis

                    EekElementClass;
                    EekElementPrivate;
                    EekElement;
void                eek_element_set_parent              (EekElement *element,
                                                         EekElement *parent);
EekElement *        eek_element_get_parent              (EekElement *element);
void                eek_element_set_name                (EekElement *element,
                                                         const gchar *name);
const gchar *       eek_element_get_name                (EekElement *element);
void                eek_element_set_bounds              (EekElement *element,
                                                         EekBounds *bounds);
void                eek_element_get_bounds              (EekElement *element,
                                                         EekBounds *bounds);
void                eek_element_get_absolute_position   (EekElement *element,
                                                         gdouble *x,
                                                         gdouble *y);

Description

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

Details

EekElementClass

typedef struct {
} EekElementClass;

EekElementPrivate

typedef struct _EekElementPrivate EekElementPrivate;

EekElement

typedef struct {
} EekElement;

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

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

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