Tizen Native API
|
Functions | |
void | evas_object_box_align_set (Evas_Box *obj, double horizontal, double vertical) |
Set the alignment of the whole bounding box of contents, for a given box object. | |
void | evas_object_box_align_get (const Evas_Box *obj, double *horizontal, double *vertical) |
Get the alignment of the whole bounding box of contents, for a given box object. | |
void | evas_object_box_padding_set (Evas_Box *obj, Evas_Coord horizontal, Evas_Coord vertical) |
Set the (space) padding between cells set for a given box object. | |
void | evas_object_box_padding_get (const Evas_Box *obj, Evas_Coord *horizontal, Evas_Coord *vertical) |
Get the (space) padding between cells set for a given box object. | |
void | evas_object_box_layout_set (Evas_Box *obj, Evas_Object_Box_Layout cb, const void *data, Eina_Free_Cb free_data) |
Set a new layouting function to a given box object. | |
void | evas_object_box_layout_horizontal (Evas_Box *obj, Evas_Object_Box_Data *priv, void *data) |
Layout function which sets the box o to a (basic) horizontal box. | |
void | evas_object_box_layout_vertical (Evas_Box *obj, Evas_Object_Box_Data *priv, void *data) |
Layout function which sets the box o to a (basic) vertical box. | |
void | evas_object_box_layout_homogeneous_max_size_horizontal (Evas_Box *obj, Evas_Object_Box_Data *priv, void *data) |
Layout function which sets the box o to a maximum size, homogeneous horizontal box. | |
void | evas_object_box_layout_flow_vertical (Evas_Box *obj, Evas_Object_Box_Data *priv, void *data) |
Layout function which sets the box o to a flow vertical box. | |
Evas_Object_Box_Option * | evas_object_box_insert_after (Evas_Box *obj, Evas_Object *child, const Evas_Object *reference) |
Insert a new child object after another existing one, in a given box object o. | |
Eina_Bool | evas_object_box_remove_all (Evas_Box *obj, Eina_Bool clear) |
Remove all child objects from a box object, unparenting them again. | |
Eina_Iterator * | evas_object_box_iterator_new (const Evas_Box *obj) |
Get an iterator to walk the list of children of a given box object. | |
Evas_Object * | evas_object_box_add_to (Evas_Box *obj) |
Add a new box as a child of a given smart object. | |
Evas_Object_Box_Option * | evas_object_box_append (Evas_Box *obj, Evas_Object *child) |
Append a new child object to the given box object o. | |
int | evas_object_box_option_property_id_get (const Evas_Box *obj, const char *name) |
Get the numerical identifier of the property of the child elements of the box o which have name as name string. | |
Evas_Object_Box_Option * | evas_object_box_prepend (Evas_Box *obj, Evas_Object *child) |
Prepend a new child object to the given box object o. | |
Eina_Accessor * | evas_object_box_accessor_new (const Evas_Box *obj) |
Get an accessor (a structure providing random items access) to the list of children of a given box object. | |
Eina_Bool | evas_object_box_remove_at (Evas_Box *obj, unsigned int pos) |
Remove an object, bound to a given position in a box object, unparenting it again. | |
Evas_Object_Box_Option * | evas_object_box_insert_before (Evas_Box *obj, Evas_Object *child, const Evas_Object *reference) |
Insert a new child object before another existing one, in a given box object o. | |
const char * | evas_object_box_option_property_name_get (const Evas_Box *obj, int property) |
Get the name of the property of the child elements of the box o which have id as identifier. | |
void | evas_object_box_layout_homogeneous_horizontal (Evas_Box *obj, Evas_Object_Box_Data *priv, void *data) |
Layout function which sets the box o to a homogeneous horizontal box. | |
void | evas_object_box_layout_homogeneous_max_size_vertical (Evas_Box *obj, Evas_Object_Box_Data *priv, void *data) |
Layout function which sets the box o to a maximum size, homogeneous vertical box. | |
Evas_Object_Box_Option * | evas_object_box_insert_at (Evas_Box *obj, Evas_Object *child, unsigned int pos) |
Insert a new child object at a given position, in a given box object o. | |
Eina_Bool | evas_object_box_remove (Evas_Box *obj, Evas_Object *child) |
Remove a given object from a box object, unparenting it again. | |
void | evas_object_box_layout_stack (Evas_Box *obj, Evas_Object_Box_Data *priv, void *data) |
Layout function which sets the box o to a stacking box. | |
void | evas_object_box_layout_homogeneous_vertical (Evas_Box *obj, Evas_Object_Box_Data *priv, void *data) |
Layout function which sets the box o to a homogeneous vertical box. | |
void | evas_object_box_layout_flow_horizontal (Evas_Box *obj, Evas_Object_Box_Data *priv, void *data) |
Layout function which sets the box o to a flow horizontal box. | |
void | evas_object_box_smart_set (Evas_Object_Box_Api *api) |
Set the default box api struct (Evas_Object_Box_Api) with the default values. May be used to extend that API. | |
const Evas_Object_Box_Api * | evas_object_box_smart_class_get (void) |
Get the Evas box smart class, for inheritance purposes. | |
Evas_Object * | evas_object_box_add (Evas *evas) |
Add a new box object on the provided canvas. | |
Eina_Bool | evas_object_box_option_property_vget (const Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) |
Get a property's value (by its given numerical identifier), on a given box child element -- by a variable argument list. | |
Eina_Bool | evas_object_box_option_property_vset (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) |
Set a property value (by its given numerical identifier), on a given box child element -- by a variable argument list. | |
Eina_Bool | evas_object_box_option_property_set (Evas_Object *o, Evas_Object_Box_Option *opt, int property,...) |
Set a property value (by its given numerical identifier), on a given box child element. | |
Eina_Bool | evas_object_box_option_property_get (const Evas_Object *o, Evas_Object_Box_Option *opt, int property,...) |
Get a property's value (by its given numerical identifier), on a given box child element. | |
Eina_List * | evas_object_box_children_get (const Evas_Object *o) |
Get the list of children objects in a given box object. | |
Typedefs | |
typedef struct _Evas_Object_Box_Api | Evas_Object_Box_Api |
typedef struct _Evas_Object_Box_Data | Evas_Object_Box_Data |
typedef struct _Evas_Object_Box_Option | Evas_Object_Box_Option |
typedef void(* | Evas_Object_Box_Layout )(Evas_Object *o, Evas_Object_Box_Data *priv, void *user_data) |
Defines | |
#define | EVAS_OBJECT_BOX_API_VERSION 1 |
#define | EVAS_OBJECT_BOX_API_INIT(smart_class_init) {smart_class_init, EVAS_OBJECT_BOX_API_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} |
#define | EVAS_OBJECT_BOX_API_INIT_NULL EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NULL) |
#define | EVAS_OBJECT_BOX_API_INIT_VERSION EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_VERSION) |
#define | EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(name) EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name)) |
A box is a convenience smart object that packs children inside it in sequence, using a layouting function specified by the user. There are a couple of pre-made layouting functions built-in in Evas, all of them using children size hints to define their size and alignment inside their cell space.
Examples on this smart object's usage:
- See also:
- Size Hints
Define Documentation
#define EVAS_OBJECT_BOX_API_INIT | ( | smart_class_init | ) | {smart_class_init, EVAS_OBJECT_BOX_API_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} |
Initializer for a whole Evas_Object_Box_Api structure, with NULL
values on its specific fields.
- Parameters:
-
smart_class_init initializer to use for the base field (Evas_Smart_Class).
- See also:
- EVAS_SMART_CLASS_INIT_NULL
- EVAS_SMART_CLASS_INIT_VERSION
- EVAS_SMART_CLASS_INIT_NAME_VERSION
- EVAS_OBJECT_BOX_API_INIT_NULL
- EVAS_OBJECT_BOX_API_INIT_VERSION
- EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
#define EVAS_OBJECT_BOX_API_INIT_NAME_VERSION | ( | name | ) | EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name)) |
Initializer to zero out a whole Evas_Object_Box_Api structure and set its name and version.
This is similar to EVAS_OBJECT_BOX_API_INIT_NULL, but it will also set the version field of Evas_Smart_Class (base field) to the latest #EVAS_SMART_CLASS_VERSION and name it to the specific value.
It will keep a reference to the name field as a const char *
, i.e., the name must be available while the structure is used (hint: static or global variable!) and must not be modified.
#define EVAS_OBJECT_BOX_API_INIT_NULL EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NULL) |
Initializer to zero out a whole Evas_Object_Box_Api structure.
#define EVAS_OBJECT_BOX_API_INIT_VERSION EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_VERSION) |
Initializer to zero out a whole Evas_Object_Box_Api structure and set a specific version on it.
This is similar to EVAS_OBJECT_BOX_API_INIT_NULL, but it will set the version field of Evas_Smart_Class (base field) to the latest #EVAS_SMART_CLASS_VERSION.
#define EVAS_OBJECT_BOX_API_VERSION 1 |
Current version for Evas box object smart class, a value which goes to _Evas_Object_Box_Api::version.
Typedef Documentation
Smart class extension, providing extra box object requirements.
Smart object instance data, providing box object requirements.
Function signature for an Evas box object layouting routine. By o it will be passed the box object in question, by priv it will be passed the box's internal data and, by user_data, it will be passed any custom data one could have set to a given box layouting function, with evas_object_box_layout_set().
The base structure for a box option. Box options are a way of extending box items properties, which will be taken into account for layouting decisions. The box layouting functions provided by Evas will only rely on objects' canonical size hints to layout them, so the basic box option has no (custom) property set.
Users creating their own layouts, but not depending on extra child items' properties, would be fine just using evas_object_box_layout_set(). But if one desires a layout depending on extra child properties, he/she has to subclass the box smart object. Thus, by using evas_object_box_smart_class_get() and evas_object_box_smart_set(), the option_new()
and option_free()
smart class functions should be properly redefined/extended.
Object properties are bound to an integer identifier and must have a name string. Their values are open to any data. See the API on option properties for more details.
Function Documentation
Eina_Accessor* evas_object_box_accessor_new | ( | const Evas_Box * | obj | ) |
Get an accessor (a structure providing random items access) to the list of children of a given box object.
- Since :
- 2.3
- Returns:
- An accessor on
o's
child objects, on success, orNULL
, on errors
- Note:
- Do not remove or delete objects while walking the list.
- Parameters:
-
[in] obj The box object
Evas_Object* evas_object_box_add | ( | Evas * | evas | ) |
Add a new box object on the provided canvas.
- Since :
- 2.3
- Parameters:
-
[in] evas The canvas to create the box object on.
- Returns:
NULL
on error, a pointer to a new box object on success.
- Remarks:
- After instantiation, if a box object hasn't its layout function set, via evas_object_box_layout_set(), it will have it by default set to evas_object_box_layout_horizontal(). The remaining properties of the box must be set/retrieved via
evas_object_box_{h,v}_{align,padding}_{get,set)()
.
Evas_Object* evas_object_box_add_to | ( | Evas_Box * | obj | ) |
Add a new box as a child of a given smart object.
- Since :
- 2.3
- Returns:
NULL
on error, a pointer to a new box object on success.
- Remarks:
- This is a helper function that has the same effect of putting a new box object into
parent
by use of evas_object_smart_member_add().
- See also:
- evas_object_box_add()
- Parameters:
-
[in] obj The box object
void evas_object_box_align_get | ( | const Evas_Box * | obj, |
double * | horizontal, | ||
double * | vertical | ||
) |
Get the alignment of the whole bounding box of contents, for a given box object.
- Since :
- 2.3
- See also:
- evas_object_box_align_set() for more information
- Parameters:
-
[in] obj The box object [out] horizontal The horizontal alignment, in pixels [out] vertical the vertical alignment, in pixels
void evas_object_box_align_set | ( | Evas_Box * | obj, |
double | horizontal, | ||
double | vertical | ||
) |
Set the alignment of the whole bounding box of contents, for a given box object.
- Since :
- 2.3
- Remarks:
- This will influence how a box object is to align its bounding box of contents within its own area. The values must be in the range
0.0
-1.0
, or undefined behavior is expected. For horizontal alignment,0.0
means to the left, with1.0
meaning to the right. For vertical alignment,0.0
means to the top, with1.0
meaning to the bottom. -
The default values for both alignments is
0.5
.
- See also:
- evas_object_box_align_get()
- Parameters:
-
[in] obj The box object [in] horizontal The horizontal alignment, in pixels [in] vertical the vertical alignment, in pixels
Evas_Object_Box_Option* evas_object_box_append | ( | Evas_Box * | obj, |
Evas_Object * | child | ||
) |
Append a new child object to the given box object o.
- Since :
- 2.3
- Returns:
- A box option bound to the recently added box item or
NULL
, on errors
- Remarks:
- On success, the
"child,added"
smart event will take place. -
The actual placing of the item relative to
o's
area will depend on the layout set to it. For example, on horizontal layouts an item in the end of the box's list of children will appear on its right. - This call will trigger the box's _Evas_Object_Box_Api.append smart function.
- Parameters:
-
[in] obj The box object [in] child A child Evas object to be made a member of o
Eina_List* evas_object_box_children_get | ( | const Evas_Object * | o | ) |
Get the list of children objects in a given box object.
- Since :
- 2.3
- Parameters:
-
[in] o The box to retrieve an items list from
- Returns:
- A list of
o's
child objects, on success, orNULL
, on errors (or if it has no child objects)
- Remarks:
- The returned list should be freed with
eina_list_free()
when you no longer need it. - This is a duplicate of the list kept by the box internally. It's up to the user to destroy it when it no longer needs it. It's possible to remove objects from the box when walking this list, but these removals won't be reflected on it.
Evas_Object_Box_Option* evas_object_box_insert_after | ( | Evas_Box * | obj, |
Evas_Object * | child, | ||
const Evas_Object * | reference | ||
) |
Insert a new child object after another existing one, in a given box object o.
- Since :
- 2.3
- Returns:
- A box option bound to the recently added box item or
NULL
, on errors
- Remarks:
- On success, the
"child,added"
smart event will take place. -
This function will fail if
reference
is not a member ofo
. -
The actual placing of the item relative to
o's
area will depend on the layout set to it. - This call will trigger the box's _Evas_Object_Box_Api.insert_after smart function.
- Parameters:
-
[in] obj The box object [in] child A child Evas object to be made a member of o
[in] reference The child object to place this new one after
Evas_Object_Box_Option* evas_object_box_insert_at | ( | Evas_Box * | obj, |
Evas_Object * | child, | ||
unsigned int | pos | ||
) |
Insert a new child object at a given position, in a given box object o.
- Since :
- 2.3
- Returns:
- A box option bound to the recently added box item or
NULL
, on errors
- Remarks:
- On success, the
"child,added"
smart event will take place. -
This function will fail if the given position is invalid, given
o's
internal list of elements. -
The actual placing of the item relative to
o's
area will depend on the layout set to it. - This call will trigger the box's _Evas_Object_Box_Api.insert_at smart function.
- Parameters:
-
[in] obj The box object [in] child A child Evas object to be made a member of o
[in] pos The numeric position (starting from 0
) to place the new child object at
Evas_Object_Box_Option* evas_object_box_insert_before | ( | Evas_Box * | obj, |
Evas_Object * | child, | ||
const Evas_Object * | reference | ||
) |
Insert a new child object before another existing one, in a given box object o.
- Since :
- 2.3
- Returns:
- A box option bound to the recently added box item or
NULL
, on errors
- Remarks:
- On success, the
"child,added"
smart event will take place. -
This function will fail if
reference
is not a member ofo
. -
The actual placing of the item relative to
o's
area will depend on the layout set to it. - This call will trigger the box's _Evas_Object_Box_Api.insert_before smart function.
- Parameters:
-
[in] obj The box object [in] child A child Evas object to be made a member of o
[in] reference The child object to place this new one before
Eina_Iterator* evas_object_box_iterator_new | ( | const Evas_Box * | obj | ) |
Get an iterator to walk the list of children of a given box object.
- Since :
- 2.3
- Returns:
- An iterator on
o's
child objects, on success, orNULL
, on errors
- Note:
- Do not remove or delete objects while walking the list.
- Parameters:
-
[in] obj The box object
void evas_object_box_layout_flow_horizontal | ( | Evas_Box * | obj, |
Evas_Object_Box_Data * | priv, | ||
void * | data | ||
) |
Layout function which sets the box o to a flow horizontal box.
- Since :
- 2.3
- Remarks:
- In a flow horizontal box, the box's child elements are placed in rows (think of text as an analogy). A row has as much elements as can fit into the box's width. The box's overall behavior is controlled by its properties, which are set by the
evas_object_box_{h,v}_{align,padding}_set()
family of functions. The size hints of the elements in the box -- set by theevas_object_size_hint_{align,padding,weight}_set()
functions -- also control the way this function works.
- Box's properties:
padding_h
tells the box to draw empty spaces of that size, in pixels, between the child objects' cells.align_h
dictates the horizontal alignment of the rows (0.0
to left align them,1.0
to right align). A value of-1.0
toalign_h
lets the rows justified horizontally.align_v
controls the vertical alignment of the entire set of rows (0.0
to top,1.0
to bottom). A value of-1.0
toalign_v
makes the box to justify the rows vertically. The padding between them, in this case, is corrected so that the first row touches the top border and the last one touches the bottom border (even if they must overlap).padding_v
has no influence on the layout.
- Child element's properties:
padding_l
andpadding_r
sum up to the required width of the child element. Thealign_x
property has no influence on the layout. The child'spadding_t
andpadding_b
sum up to the required height of the child element and is the only means (besides row justifying) of setting space between rows. Note, however, thatalign_y
dictates positioning relative to the largest height required by a child object in the actual row.
- Parameters:
-
[in] obj The box object [in] priv No description supplied. [in] data No description supplied.
void evas_object_box_layout_flow_vertical | ( | Evas_Box * | obj, |
Evas_Object_Box_Data * | priv, | ||
void * | data | ||
) |
Layout function which sets the box o to a flow vertical box.
- Since :
- 2.3
- Remarks:
- This function behaves analogously to evas_object_box_layout_flow_horizontal(). The description of its behaviour can be derived from that function's documentation.
- Parameters:
-
[in] obj The box object [in] priv No description supplied. [in] data No description supplied.
void evas_object_box_layout_homogeneous_horizontal | ( | Evas_Box * | obj, |
Evas_Object_Box_Data * | priv, | ||
void * | data | ||
) |
Layout function which sets the box o to a homogeneous horizontal box.
- Since :
- 2.3
- Remarks:
- In a homogeneous horizontal box, its width is divided equally between the contained objects. The box's overall behavior is controlled by its padding/alignment properties, which are set by the
evas_object_box_{h,v}_{align,padding}_set()
family of functions. The size hints the elements in the box -- set by theevas_object_size_hint_{align,padding,weight}_set()
functions -- also control the way this function works.
- Box's properties:
align_h
has no influence on the box for this layout.padding_h
tells the box to draw empty spaces of that size, in pixels, between the (equal) child objects' cells. Thealign_v
andpadding_v
properties of the box don't contribute to its behaviour when this layout is chosen.
- Child element's properties:
padding_l
andpadding_r
sum up to the required width of the child element. Thealign_x
property tells the relative position of this overall child width in its allocated cell (0.0
to extreme left,1.0
to extreme right). A value of-1.0
toalign_x
makes the box try to resize this child element to the exact width of its cell (respecting the minimum and maximum size hints on the child's width and accounting for its horizontal padding hints). The child'spadding_t
,padding_b
andalign_y
properties apply for padding/alignment relative to the overall height of the box. A value of-1.0
toalign_y
makes the box try to resize this child element to the exact height of its parent (respecting the maximum size hint on the child's height).
- Parameters:
-
[in] obj The box object [in] priv No description supplied. [in] data No description supplied.
void evas_object_box_layout_homogeneous_max_size_horizontal | ( | Evas_Box * | obj, |
Evas_Object_Box_Data * | priv, | ||
void * | data | ||
) |
Layout function which sets the box o to a maximum size, homogeneous horizontal box.
- Since :
- 2.3
- Remarks:
- In a maximum size, homogeneous horizontal box, besides having cells of equal size reserved for the child objects, this size will be defined by the size of the largest child in the box (in width). The box's overall behavior is controlled by its properties, which are set by the
evas_object_box_{h,v}_{align,padding}_set()
family of functions. The size hints of the elements in the box -- set by theevas_object_size_hint_{align,padding,weight}_set()
functions -- also control the way this function works.
- Box's properties:
padding_h
tells the box to draw empty spaces of that size, in pixels, between the child objects' cells.align_h
controls the horizontal alignment of the child objects, relative to the containing box. When set to0.0
, children are aligned to the left. A value of1.0
lets them aligned to the right border. Values in between align them proportionally. A negative value ofalign_h
makes the box to justify its children cells. The padding between them, in this case, is corrected so that the leftmost one touches the left border and the rightmost one touches the right border (even if they must overlap). Thealign_v
andpadding_v
properties of the box don't contribute to its behaviour when this layout is chosen.
- Child element's properties:
padding_l
andpadding_r
sum up to the required width of the child element. Thealign_x
property tells the relative position of this overall child width in its allocated cell (0.0
to extreme left,1.0
to extreme right). A value of-1.0
toalign_x
makes the box try to resize this child element to the exact width of its cell (respecting the minimum and maximum size hints on the child's width and accounting for its horizontal padding hints). The child'spadding_t
,padding_b
andalign_y
properties apply for padding/alignment relative to the overall height of the box. A value of-1.0
toalign_y
makes the box try to resize this child element to the exact height of its parent (respecting the max hint on the child's height).
- Parameters:
-
[in] obj The box object [in] priv No description supplied. [in] data No description supplied.
void evas_object_box_layout_homogeneous_max_size_vertical | ( | Evas_Box * | obj, |
Evas_Object_Box_Data * | priv, | ||
void * | data | ||
) |
Layout function which sets the box o to a maximum size, homogeneous vertical box.
- Since :
- 2.3
- Remarks:
- This function behaves analogously to evas_object_box_layout_homogeneous_max_size_horizontal(). The description of its behaviour can be derived from that function's documentation.
- Parameters:
-
[in] obj The box object [in] priv No description supplied. [in] data No description supplied.
void evas_object_box_layout_homogeneous_vertical | ( | Evas_Box * | obj, |
Evas_Object_Box_Data * | priv, | ||
void * | data | ||
) |
Layout function which sets the box o to a homogeneous vertical box.
- Since :
- 2.3
- Remarks:
- This function behaves analogously to evas_object_box_layout_homogeneous_horizontal(). The description of its behaviour can be derived from that function's documentation.
- Parameters:
-
[in] obj The box object [in] priv No description supplied. [in] data No description supplied.
void evas_object_box_layout_horizontal | ( | Evas_Box * | obj, |
Evas_Object_Box_Data * | priv, | ||
void * | data | ||
) |
Layout function which sets the box o to a (basic) horizontal box.
- Since :
- 2.3
- Remarks:
- In this layout, the box object's overall behavior is controlled by its padding/alignment properties, which are set by the
evas_object_box_{h,v}_{align,padding}_set()
family of functions. The size hints of the elements in the box -- set by theevas_object_size_hint_{align,padding,weight}_set()
functions -- also control the way this function works.
- Box's properties:
align_h
controls the horizontal alignment of the child objects relative to the containing box. When set to0.0
, children are aligned to the left. A value of1.0
makes them aligned to the right border. Values in between align them proportionally. Note that if the size required by the children, which is given by their widths and thepadding_h
property of the box, is bigger than the their container's width, the children will be displayed out of the box's bounds. A negative value ofalign_h
makes the box to justify its children. The padding between them, in this case, is corrected so that the leftmost one touches the left border and the rightmost one touches the right border (even if they must overlap). Thealign_v
andpadding_v
properties of the box don't contribute to its behaviour when this layout is chosen.
- Child element's properties:
align_x
does not influence the box's behavior.padding_l
andpadding_r
sum up to the container's horizontal padding between elements. The child'spadding_t
,padding_b
andalign_y
properties apply for padding/alignment relative to the overall height of the box. Finally, there is theweight_x
property, which, if set to a non-zero value, tells the container that the child width is not pre-defined. If the container can't accommodate all its children, it sets the widths of the ones with weights to sizes as small as they can all fit into it. If the size required by the children is less than the available, the box increases its childrens' (which have weights) widths as to fit the remaining space. Theweight_x
property, besides telling the element is resizable, gives a weight for the resizing process. The parent box will try to distribute (or take off) widths accordingly to the normalized list of weights: most weighted children remain/get larger in this process than the least ones.weight_y
does not influence the layout.
- Remarks:
- If one desires that, besides having weights, child elements must be resized bounded to a minimum or maximum size, those size hints must be set, by the
evas_object_size_hint_{min,max}_set()
functions.
- Parameters:
-
[in] obj The box object [in] priv No description supplied. [in] data No description supplied.
void evas_object_box_layout_set | ( | Evas_Box * | obj, |
Evas_Object_Box_Layout | cb, | ||
const void * | data, | ||
Eina_Free_Cb | free_data | ||
) |
Set a new layouting function to a given box object.
- Since :
- 2.3
- Remarks:
- A box layout function affects how a box object displays child elements within its area. The list of pre-defined box layouts available in Evas is:
- evas_object_box_layout_horizontal()
- evas_object_box_layout_vertical()
- evas_object_box_layout_homogeneous_horizontal()
- evas_object_box_layout_homogeneous_vertical()
- evas_object_box_layout_homogeneous_max_size_horizontal()
- evas_object_box_layout_homogeneous_max_size_vertical()
- evas_object_box_layout_flow_horizontal()
- evas_object_box_layout_flow_vertical()
- evas_object_box_layout_stack()
- Refer to each of their documentation texts for details on them.
-
A box layouting function will be triggered by the
'calculate'
smart callback of the box's smart class.
- Parameters:
-
[in] obj The box object [in] cb The new layout function to set on o
.[in] data Data pointer to be passed to cb
.[in] free_data Function to free data
, if need be.
void evas_object_box_layout_stack | ( | Evas_Box * | obj, |
Evas_Object_Box_Data * | priv, | ||
void * | data | ||
) |
Layout function which sets the box o to a stacking box.
- Since :
- 2.3
- Remarks:
- In a stacking box, all children will be given the same size -- the box's own size -- and they will be stacked one above the other, so that the first object in
o's
internal list of child elements will be the bottommost in the stack.
- Box's properties:
- No box properties are used.
- Child element's properties:
padding_l
andpadding_r
sum up to the required width of the child element. Thealign_x
property tells the relative position of this overall child width in its allocated cell (0.0
to extreme left,1.0
to extreme right). A value of-1.0
toalign_x
makes the box try to resize this child element to the exact width of its cell (respecting the min and max hints on the child's width and accounting for its horizontal padding properties). The same applies to the vertical axis.
- Parameters:
-
[in] obj The box object [in] priv No description supplied. [in] data No description supplied.
void evas_object_box_layout_vertical | ( | Evas_Box * | obj, |
Evas_Object_Box_Data * | priv, | ||
void * | data | ||
) |
Layout function which sets the box o to a (basic) vertical box.
- Since :
- 2.3
- Remarks:
- This function behaves analogously to evas_object_box_layout_horizontal(). The description of its behaviour can be derived from that function's documentation.
- Parameters:
-
[in] obj The box object [in] priv No description supplied. [in] data No description supplied.
Eina_Bool evas_object_box_option_property_get | ( | const Evas_Object * | o, |
Evas_Object_Box_Option * | opt, | ||
int | property, | ||
... | |||
) |
Get a property's value (by its given numerical identifier), on a given box child element.
- Since :
- 2.3
- Parameters:
-
[in] o The box parenting the child element [in] opt The box option structure bound to the child box element to get a property from [in] property The numerical ID of the given property [out] ... (List of) pointer(s) where to store the value(s) set for this property. It (they) must point to variable(s) of the same type the user has defined for it (them).
- Returns:
EINA_TRUE
on success,EINA_FALSE
on failure.
- Remarks:
- This call won't do anything for a canonical Evas box. Only users which have subclassed it, getting custom box items options (see Evas_Object_Box_Option) on it, would benefit from this function. They'd have to implement it and get it to be the _Evas_Object_Box_Api::property_get smart class function of the box, which is originally get to
NULL
. -
This function will internally create a variable argument list, with the values passed after
property
, and call evas_object_box_option_property_vget() with this list and the same previous arguments.
int evas_object_box_option_property_id_get | ( | const Evas_Box * | obj, |
const char * | name | ||
) |
Get the numerical identifier of the property of the child elements of the box o which have name as name string.
- Since :
- 2.3
- Returns:
- The numerical ID of the given property or
-1
, on errors.
- Remarks:
- This call won't do anything for a canonical Evas box. Only users which have subclassed it, setting custom box items options (see Evas_Object_Box_Option) on it, would benefit from this
-
function. They'd have to implement it and set it to be the _Evas_Object_Box_Api.property_id_get smart class function of the box, which is originally set to
NULL
.
- Parameters:
-
[in] obj The box object [in] name The name string of the option being searched, for its ID
const char* evas_object_box_option_property_name_get | ( | const Evas_Box * | obj, |
int | property | ||
) |
Get the name of the property of the child elements of the box o which have id as identifier.
- Since :
- 2.3
- Returns:
- The name of the given property or
NULL
, on errors.
- Remarks:
- This call won't do anything for a canonical Evas box. Only users which have subclassed it, setting custom box items options (see Evas_Object_Box_Option) on it, would benefit from this
-
function. They'd have to implement it and set it to be the _Evas_Object_Box_Api.property_name_get smart class function of the box, which is originally set to
NULL
.
- Parameters:
-
[in] obj The box object [in] property The numerical identifier of the option being searched, for its name
Eina_Bool evas_object_box_option_property_set | ( | Evas_Object * | o, |
Evas_Object_Box_Option * | opt, | ||
int | property, | ||
... | |||
) |
Set a property value (by its given numerical identifier), on a given box child element.
- Since :
- 2.3
- Parameters:
-
[in] o The box parenting the child element [in] opt The box option structure bound to the child box element to set a property on [in] property The numerical ID of the given property [in] ... (List of) actual value(s) to be set for this property. It (they) must be of the same type the user has defined for it (them).
- Returns:
EINA_TRUE
on success,EINA_FALSE
on failure.
- Remarks:
- This call won't do anything for a canonical Evas box. Only users which have subclassed it, setting custom box items options (see Evas_Object_Box_Option) on it, would benefit from this function. They'd have to implement it and set it to be the _Evas_Object_Box_Api::property_set smart class function of the box, which is originally set to
NULL
. -
This function will internally create a variable argument list, with the values passed after
property
, and call evas_object_box_option_property_vset() with this list and the same previous arguments.
Eina_Bool evas_object_box_option_property_vget | ( | const Evas_Object * | o, |
Evas_Object_Box_Option * | opt, | ||
int | property, | ||
va_list | args | ||
) |
Get a property's value (by its given numerical identifier), on a given box child element -- by a variable argument list.
- Since :
- 2.3
- Parameters:
-
[in] o The box parenting the child element [in] opt The box option structure bound to the child box element to get a property from [in] property The numerical ID of the given property [out] args The variable argument list with pointers to where to store the values of this property. They must point to variables of the same type the user has defined for them.
- Returns:
EINA_TRUE
on success,EINA_FALSE
on failure.
- Remarks:
- This is a variable argument list variant of the evas_object_box_option_property_get(). See its documentation for more details.
Eina_Bool evas_object_box_option_property_vset | ( | Evas_Object * | o, |
Evas_Object_Box_Option * | opt, | ||
int | property, | ||
va_list | args | ||
) |
Set a property value (by its given numerical identifier), on a given box child element -- by a variable argument list.
- Since :
- 2.3
- Parameters:
-
[in] o The box parenting the child element [in] opt The box option structure bound to the child box element to set a property on [in] property The numerical ID of the given property [in] args The variable argument list implementing the value to be set for this property. It must be of the same type the user has defined for it.
- Returns:
EINA_TRUE
on success,EINA_FALSE
on failure.
- Remarks:
- This is a variable argument list variant of the evas_object_box_option_property_set(). See its documentation for more details.
void evas_object_box_padding_get | ( | const Evas_Box * | obj, |
Evas_Coord * | horizontal, | ||
Evas_Coord * | vertical | ||
) |
Get the (space) padding between cells set for a given box object.
- Since :
- 2.3
- See also:
- evas_object_box_padding_set()
- Parameters:
-
[in] obj The box object [out] horizontal The horizontal padding, in pixels [out] vertical the vertical padding, in pixels
void evas_object_box_padding_set | ( | Evas_Box * | obj, |
Evas_Coord | horizontal, | ||
Evas_Coord | vertical | ||
) |
Set the (space) padding between cells set for a given box object.
- Since :
- 2.3
- Remarks:
- The default values for both padding components is
0
.
- See also:
- evas_object_box_padding_get()
- Parameters:
-
[in] obj The box object [in] horizontal The horizontal padding, in pixels [in] vertical the vertical padding, in pixels
Evas_Object_Box_Option* evas_object_box_prepend | ( | Evas_Box * | obj, |
Evas_Object * | child | ||
) |
Prepend a new child object to the given box object o.
- Since :
- 2.3
- Returns:
- A box option bound to the recently added box item or
NULL
, on errors
- Remarks:
- On success, the
"child,added"
smart event will take place. -
The actual placing of the item relative to
o's
area will depend on the layout set to it. For example, on horizontal layouts an item in the beginning of the box's list of children will appear on its left. - This call will trigger the box's _Evas_Object_Box_Api.prepend smart function.
- Parameters:
-
[in] obj The box object [in] child A child Evas object to be made a member of o
Eina_Bool evas_object_box_remove | ( | Evas_Box * | obj, |
Evas_Object * | child | ||
) |
Remove a given object from a box object, unparenting it again.
- Since :
- 2.3
- Returns:
EINA_TRUE
, on success,EINA_FALSE
otherwise
- Remarks:
- On removal, you'll get an unparented object again, just as it was before you inserted it in the box. The _Evas_Object_Box_Api.option_free box smart callback will be called automatically for you and, also, the
"child,removed"
smart event will take place. - This call will trigger the box's _Evas_Object_Box_Api.remove smart function.
- Parameters:
-
[in] obj The box object [in] child The handle to the child object to be removed
Eina_Bool evas_object_box_remove_all | ( | Evas_Box * | obj, |
Eina_Bool | clear | ||
) |
Remove all child objects from a box object, unparenting them again.
- Since :
- 2.3
- Returns:
EINA_TRUE
, on success,EINA_FALSE
otherwise
- Remarks:
- This has the same effect of calling evas_object_box_remove() on each of
o's
child objects, in sequence. If, and only if, all those calls succeed, so does this one.
- Parameters:
-
[in] obj The box object [in] clear if true, it will delete just removed children.
Eina_Bool evas_object_box_remove_at | ( | Evas_Box * | obj, |
unsigned int | pos | ||
) |
Remove an object, bound to a given position in a box object, unparenting it again.
- Since :
- 2.3
- Returns:
EINA_TRUE
, on success,EINA_FALSE
otherwise
- Remarks:
- On removal, you'll get an unparented object again, just as it was before you inserted it in the box. The
option_free()
box smart callback will be called automatically for you and, also, the"child,removed"
smart event will take place. -
This function will fail if the given position is invalid, given
o's
internal list of elements. - This call will trigger the box's _Evas_Object_Box_Api.remove_at smart function.
- Parameters:
-
[in] obj The box object [in] pos The numeric position (starting from 0
) of the child object to be removed
const Evas_Object_Box_Api* evas_object_box_smart_class_get | ( | void | ) |
Get the Evas box smart class, for inheritance purposes.
- Since :
- 2.3
- Returns:
- the (canonical) Evas box smart class.
- Remarks:
- The returned value is not to be modified, just use it as your parent class.
void evas_object_box_smart_set | ( | Evas_Object_Box_Api * | api | ) |
Set the default box api struct (Evas_Object_Box_Api) with the default values. May be used to extend that API.
- Since :
- 2.3
- Parameters:
-
[in] api The box API struct to set back, most probably with overridden fields (on class extensions scenarios)