Box
A box object arranges objects in a single row within a box. More...
Functions | |
EAPI Evas_Object * | elm_box_add (Evas_Object *parent) |
Add a new box to the parent. | |
EAPI void | elm_box_horizontal_set (Evas_Object *obj, Eina_Bool horizontal) |
Set the horizontal orientation. | |
EAPI void | elm_box_homogenous_set (Evas_Object *obj, Eina_Bool homogenous) |
Set homogenous layout. | |
EAPI void | elm_box_pack_start (Evas_Object *obj, Evas_Object *subobj) |
This adds a box at the start of the box (top or left based on orientation). | |
EAPI void | elm_box_pack_end (Evas_Object *obj, Evas_Object *subobj) |
This adds a box at the end of the box (bottom or right based on orientation). | |
EAPI void | elm_box_pack_before (Evas_Object *obj, Evas_Object *subobj, Evas_Object *before) |
This adds adds an object to the box before the indicated object. | |
EAPI void | elm_box_pack_after (Evas_Object *obj, Evas_Object *subobj, Evas_Object *after) |
This adds adds an object to the box after the indicated object. |
Detailed Description
A box object arranges objects in a single row within a box.Sub objects can be added at the start, end or before or after any existing object in the box already. It can have its orientation changed too. How a child object is sized and otherwise arranged within the box depends on evas hints. evas_object_size_hint_align_set() will set either the alignment within its region if the region allocated is bigger than the object size. If you want the sub object sized up to fill the allocated region, use -1.0 for the apporpriate horizontal or vertical axes. evas_object_size_hint_weight_set() will set the packing weight. The weights of all items being packed are added up and if items are to be sized up to fit, those with the higher weights get proportionally more space.
Function Documentation
EAPI Evas_Object* elm_box_add | ( | Evas_Object * | parent | ) |
Add a new box to the parent.
- Parameters:
-
parent The parent object
- Returns:
- The new object or NULL if it cannot be created
EAPI void elm_box_homogenous_set | ( | Evas_Object * | obj, | |
Eina_Bool | homogenous | |||
) |
Set homogenous layout.
If enabled, homogenous layout makes all items the same size. This size is of course governed by the size of the largest item in the box.
- Parameters:
-
obj The box object homogenous The homogenous flag (1 = on, 2 = off)
EAPI void elm_box_horizontal_set | ( | Evas_Object * | obj, | |
Eina_Bool | horizontal | |||
) |
Set the horizontal orientation.
By default box object arrange their contents vertically from top to bottom. By calling this and providing orizontal
as true, the box will become horizontal arranging contents left to right.
- Parameters:
-
obj The box object horizontal The horizontal flag (1 = horizontal, 0 = vertical)
EAPI void elm_box_pack_after | ( | Evas_Object * | obj, | |
Evas_Object * | subobj, | |||
Evas_Object * | after | |||
) |
This adds adds an object to the box after the indicated object.
This will add the subobj
to the box indicated after the object indicated with after
. If after
is not already in the box, results are undefined. After means either to the right of the indicated object or below it depending on orientation.
- Parameters:
-
obj The box object subobj The object to add to the box after The object after which to add it
EAPI void elm_box_pack_before | ( | Evas_Object * | obj, | |
Evas_Object * | subobj, | |||
Evas_Object * | before | |||
) |
This adds adds an object to the box before the indicated object.
This will add the subobj
to the box indicated before the object indicated with before
. If before
is not already in the box, results are undefined. Before means either to the left of the indicated object or above it depending on orientation.
- Parameters:
-
obj The box object subobj The object to add to the box before The object before which to add it
EAPI void elm_box_pack_end | ( | Evas_Object * | obj, | |
Evas_Object * | subobj | |||
) |
This adds a box at the end of the box (bottom or right based on orientation).
This will add the subobj
to the box object indicated at the end of the box (the right or bottom end).
- Parameters:
-
obj The box object subobj The object to add to the box
EAPI void elm_box_pack_start | ( | Evas_Object * | obj, | |
Evas_Object * | subobj | |||
) |
This adds a box at the start of the box (top or left based on orientation).
This will add the subobj
to the box object indicated at the beginning of the box (the left or top end).
- Parameters:
-
obj The box object subobj The object to add to the box