Tizen Native API
Edje Box Part

This group discusses functions that deal with parts of type box.

Remarks:
A box is a container type for parts, that means it can contain other parts.

Functions

void edje_box_layout_register (const char *name, Evas_Object_Box_Layout func, void *(*layout_data_get)(void *), void(*layout_data_free)(void *), void(*free_data)(void *), void *data)
 Registers a custom layout to be used in edje boxes.
Eina_Bool edje_object_part_box_append (Evas_Object *obj, const char *part, Evas_Object *child)
 Appends an object to the box.
Eina_Bool edje_object_part_box_prepend (Evas_Object *obj, const char *part, Evas_Object *child)
 Prepends an object to the box.
Eina_Bool edje_object_part_box_insert_before (Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference)
 Adds an object to the box.
Eina_Bool edje_object_part_box_insert_at (Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos)
 Inserts an object to the box.
Evas_Objectedje_object_part_box_remove (Evas_Object *obj, const char *part, Evas_Object *child)
 Removes an object from the box.
Evas_Objectedje_object_part_box_remove_at (Evas_Object *obj, const char *part, unsigned int pos)
 Removes an object from the box.
Eina_Bool edje_object_part_box_remove_all (Evas_Object *obj, const char *part, Eina_Bool clear)
 Removes all elements from the box.

Function Documentation

void edje_box_layout_register ( const char *  name,
Evas_Object_Box_Layout  func,
void *(*)(void *)  layout_data_get,
void(*)(void *)  layout_data_free,
void(*)(void *)  free_data,
void *  data 
)

Registers a custom layout to be used in edje boxes.

This function registers custom layouts that can be referred from themes by the registered name. The Evas_Object_Box_Layout functions receive two pointers for internal use, one being private data, and the other being the function to free that data when it's not longer needed. From Edje, this private data is retrieved by calling layout_data_get, and layout_data_free is the free function passed to func. layout_data_get is called with data as its parameter, and this one is freed by free_data whenever the layout is unregistered from Edje.

Since :
2.3.1
Parameters:
[in]nameThe name of the layout
[in]funcThe function defining the layout
[in]layout_data_getThis function gets the custom data pointer for func
[in]layout_data_freePassed to func to free its private data when needed
[in]free_dataFrees data
[in]dataA private pointer passed to layout_data_get
Eina_Bool edje_object_part_box_append ( Evas_Object obj,
const char *  part,
Evas_Object child 
)

Appends an object to the box.

This appends a child to the box indicated by the part.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]childThe object to append
Returns:
EINA_TRUE if it is successfully added,
otherwise EINA_FALSE if an error occurs
See also:
edje_object_part_box_prepend()
edje_object_part_box_insert_before()
edje_object_part_box_insert_at()
Eina_Bool edje_object_part_box_insert_at ( Evas_Object obj,
const char *  part,
Evas_Object child,
unsigned int  pos 
)

Inserts an object to the box.

This adds a child to the box indicated by the part, in the position given by pos.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]childThe object to insert
[in]posThe position at which to insert the child
Returns:
EINA_TRUE if it is successfully added,
otherwise EINA_FALSE if an error occurs
See also:
edje_object_part_box_append()
edje_object_part_box_prepend()
edje_object_part_box_insert_before()
Eina_Bool edje_object_part_box_insert_before ( Evas_Object obj,
const char *  part,
Evas_Object child,
const Evas_Object reference 
)

Adds an object to the box.

This inserts a child in the box given by the part, in the position marked by the reference.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]childThe object to insert
[in]referenceThe object to be used as a reference
Returns:
EINA_TRUE if it is successfully added,
otherwise EINA_FALSE if an error occurs
See also:
edje_object_part_box_append()
edje_object_part_box_prepend()
edje_object_part_box_insert_at()
Eina_Bool edje_object_part_box_prepend ( Evas_Object obj,
const char *  part,
Evas_Object child 
)

Prepends an object to the box.

This prepends a child to the box indicated by the part.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]childThe object to prepend
Returns:
EINA_TRUE if it is successfully added,
otherwise EINA_FALSE if an error occurs
See also:
edje_object_part_box_append()
edje_object_part_box_insert_before()
edje_object_part_box_insert_at()
Evas_Object* edje_object_part_box_remove ( Evas_Object obj,
const char *  part,
Evas_Object child 
)

Removes an object from the box.

This removes a child from the box indicated by the part.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]childThe object to remove
Returns:
A pointer to the removed object, otherwise NULL
See also:
edje_object_part_box_remove_at()
edje_object_part_box_remove_all()
Eina_Bool edje_object_part_box_remove_all ( Evas_Object obj,
const char *  part,
Eina_Bool  clear 
)

Removes all elements from the box.

This removes all the external objects from the box indicated by the part. The elements created from the theme are not removed.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]clearDeletes objects on removal
Returns:
1 if it is successfully cleared
otherwise, 0 if an error occurs
See also:
edje_object_part_box_remove()
edje_object_part_box_remove_at()
Evas_Object* edje_object_part_box_remove_at ( Evas_Object obj,
const char *  part,
unsigned int  pos 
)

Removes an object from the box.

This removes a child from the box indicated by the part, in the position given by pos.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]posThe position index of the object (starts counting from 0)
Returns:
A pointer to the object that is removed, otherwise NULL
See also:
edje_object_part_box_remove()
edje_object_part_box_remove_all()