Tizen Native API
6.5
|
A relative container calculates the size and position of all the children based on their relationship to each other.
By default, corner of child are same to its parent corner, meaning default values of the edge are:
elm_relative_container_relation_left_set(layout, child, layout, 0.0); elm_relative_container_relation_top_set(layout, child, layout, 0.0); elm_relative_container_relation_right_set(layout, child, layout, 1.0); elm_relative_container_relation_bottom_set(layout, child, layout, 1.0);
The following are examples of how to use a relative_container:
Functions | |
Evas_Object * | elm_relative_container_add (Evas_Object *parent) |
Add a new relative_container to the parent. | |
void | elm_relative_container_relation_left_set (Evas_Object *obj, Evas_Object *child, Evas_Object *base, double relative_position) |
Specifies the left side edge of the child object relative to the base object. When relative_position is 0 the left edges of the two objects are aligned. When relative_position is 1 the left edge of the child object is aligned to the right edge of the base object. | |
void | elm_relative_container_relation_left_get (const Evas_Object *obj, Evas_Object *child, Evas_Object **base, double *relative_position) |
Get the left side edge of the child object relative to the base object. | |
void | elm_relative_container_relation_right_set (Evas_Object *obj, Evas_Object *child, Evas_Object *base, double relative_position) |
Specifies the right side edge of the child object relative to the base object. When relative_position is 0 the right edge of the child object is aligned to the left edge of the base object. When relative_position is 1 the right edges of the two objects are aligned. | |
void | elm_relative_container_relation_right_get (const Evas_Object *obj, Evas_Object *child, Evas_Object **base, double *relative_position) |
Get the right side edge of the child object relative to the base object. | |
void | elm_relative_container_relation_top_set (Evas_Object *obj, Evas_Object *child, Evas_Object *base, double relative_position) |
Specifies the top side edge of the child object relative to the base object. When relative_position is 0 the top edges of the two objects are aligned. When relative_position is 1 the top edge of the child object is aligned to the bottom edge of the base object. | |
void | elm_relative_container_relation_top_get (const Evas_Object *obj, Evas_Object *child, Evas_Object **base, double *relative_position) |
Get the top side edge of the child object relative to the base object. | |
void | elm_relative_container_relation_bottom_set (Evas_Object *obj, Evas_Object *child, Evas_Object *base, double relative_position) |
Specifies the bottom side edge of the child object relative to the base object. When relative_position is 0 the bottom edge of the child object is aligned to the top edge of the base object. When is 1 the bottom edges of the two objects are aligned. | |
void | elm_relative_container_relation_bottom_get (const Evas_Object *obj, Evas_Object *child, Evas_Object **base, double *relative_position) |
Get the bottom side edge of the child object relative to the base object. | |
Eina_List * | elm_relative_container_children_get (const Evas_Object *obj) |
Get a list of the objects in the relative_container. |
Function Documentation
Evas_Object* elm_relative_container_add | ( | Evas_Object * | parent | ) |
Add a new relative_container to the parent.
- Parameters:
-
parent The parent object
- Returns:
- The new object or NULL if it cannot be created
- Since :
- 6.0
- Examples:
- relative_container_example_01.c, and relative_container_example_02.c.
Eina_List* elm_relative_container_children_get | ( | const Evas_Object * | obj | ) |
Get a list of the objects in the relative_container.
Returns a new list
with a pointer to Evas_Object
in its nodes.
You must free this list with eina_list_free() once you are done with it.
- Parameters:
-
[in] obj The object.
- Returns:
- List of children
- Since :
- 6.0
void elm_relative_container_relation_bottom_get | ( | const Evas_Object * | obj, |
Evas_Object * | child, | ||
Evas_Object ** | base, | ||
double * | relative_position | ||
) |
Get the bottom side edge of the child
object relative to the base
object.
- Parameters:
-
[in] obj The object. [in] child The child object whose size and position is being changed. [out] base The object whose size and position is being used as reference. NULL
means that the container object is used(this is the default value).[out] relative_position The ratio between top and bottom of the base, ranging from 0.0 to 1.0. 1.0 by default.
- Since :
- 6.0
void elm_relative_container_relation_bottom_set | ( | Evas_Object * | obj, |
Evas_Object * | child, | ||
Evas_Object * | base, | ||
double | relative_position | ||
) |
Specifies the bottom side edge of the child
object relative to the base
object. When relative_position
is 0 the bottom edge of the child
object is aligned to the top edge of the base
object. When is 1 the bottom edges of the two objects are aligned.
- Parameters:
-
[in] obj The object. [in] child The child object whose size and position is being changed. [in] base The object whose size and position is being used as reference. NULL
means that the container object is used(this is the default value).[in] relative_position The ratio between top and bottom of the base, ranging from 0.0 to 1.0. 1.0 by default.
- Since :
- 6.0
- Examples:
- relative_container_example_01.c.
void elm_relative_container_relation_left_get | ( | const Evas_Object * | obj, |
Evas_Object * | child, | ||
Evas_Object ** | base, | ||
double * | relative_position | ||
) |
Get the left side edge of the child
object relative to the base
object.
- Parameters:
-
[in] obj The object. [in] child The child object whose size and position is being changed. [out] base The object whose size and position is being used as reference. NULL
means that the container object is used(this is the default value).[out] relative_position The ratio between left and right of the base, ranging from 0.0 to 1.0. 0.0 by default.
- Since :
- 6.0
void elm_relative_container_relation_left_set | ( | Evas_Object * | obj, |
Evas_Object * | child, | ||
Evas_Object * | base, | ||
double | relative_position | ||
) |
Specifies the left side edge of the child
object relative to the base
object. When relative_position
is 0 the left edges of the two objects are aligned. When relative_position
is 1 the left edge of the child
object is aligned to the right edge of the base
object.
- Parameters:
-
[in] obj The object. [in] child The child object whose size and position is being changed. [in] base The object whose size and position is being used as reference. NULL
means that the container object is used(this is the default value).[in] relative_position The ratio between left and right of the base, ranging from 0.0 to 1.0. 0.0 by default.
- Since :
- 6.0
- Examples:
- relative_container_example_01.c, and relative_container_example_02.c.
void elm_relative_container_relation_right_get | ( | const Evas_Object * | obj, |
Evas_Object * | child, | ||
Evas_Object ** | base, | ||
double * | relative_position | ||
) |
Get the right side edge of the child
object relative to the base
object.
- Parameters:
-
[in] obj The object. [in] child The child object whose size and position is being changed. [out] base The object whose size and position is being used as reference. NULL
means that the container object is used(this is the default value).[out] relative_position The ratio between left and right of the base, ranging from 0.0 to 1.0. 1.0 by default.
- Since :
- 6.0
void elm_relative_container_relation_right_set | ( | Evas_Object * | obj, |
Evas_Object * | child, | ||
Evas_Object * | base, | ||
double | relative_position | ||
) |
Specifies the right side edge of the child
object relative to the base
object. When relative_position
is 0 the right edge of the child
object is aligned to the left edge of the base
object. When relative_position
is 1 the right edges of the two objects are aligned.
- Parameters:
-
[in] obj The object. [in] child The child object whose size and position is being changed. [in] base The object whose size and position is being used as reference. NULL
means that the container object is used(this is the default value).[in] relative_position The ratio between left and right of the base, ranging from 0.0 to 1.0. 1.0 by default.
- Since :
- 6.0
- Examples:
- relative_container_example_01.c, and relative_container_example_02.c.
void elm_relative_container_relation_top_get | ( | const Evas_Object * | obj, |
Evas_Object * | child, | ||
Evas_Object ** | base, | ||
double * | relative_position | ||
) |
Get the top side edge of the child
object relative to the base
object.
- Parameters:
-
[in] obj The object. [in] child The child object whose size and position is being changed. [out] base The object whose size and position is being used as reference. NULL
means that the container object is used(this is the default value).[out] relative_position The ratio between top and bottom of the base, ranging from 0.0 to 1.0. 0.0 by default.
- Since :
- 6.0
void elm_relative_container_relation_top_set | ( | Evas_Object * | obj, |
Evas_Object * | child, | ||
Evas_Object * | base, | ||
double | relative_position | ||
) |
Specifies the top side edge of the child
object relative to the base
object. When relative_position
is 0 the top edges of the two objects are aligned. When relative_position
is 1 the top edge of the child
object is aligned to the bottom edge of the base
object.
- Parameters:
-
[in] obj The object. [in] child The child object whose size and position is being changed. [in] base The object whose size and position is being used as reference. NULL
means that the container object is used(this is the default value).[in] relative_position The ratio between top and bottom of the base, ranging from 0.0 to 1.0. 0.0 by default.
- Since :
- 6.0
- Examples:
- relative_container_example_01.c.