A box is a convenience smart object that packs children inside it in sequence, using a layouting function specified by the user. More...

Data Structures

struct  _Evas_Object_Box_Api
 This structure should be used by any smart class inheriting from the box's one, to provide custom box behavior which could not be achieved only by providing a layout function, with evas_object_box_layout_set(). More...
 
struct  _Evas_Object_Box_Data
 This structure augments clipped smart object's instance data, providing extra members required by generic box implementation. More...
 
struct  _Evas_Object_Box_Option
 Evas_Object_Box_Option struct fields More...
 

Macros

#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.
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 

Typedefs

typedef struct _Evas_Object_Box_Api Evas_Object_Box_Api
 Smart class extension, providing extra box object requirements.
 
typedef struct _Evas_Object_Box_Data Evas_Object_Box_Data
 Smart object instance data, providing box object requirements.
 
typedef struct _Evas_Object_Box_Option Evas_Object_Box_Option
 The base structure for a box option. More...
 
typedef void(* Evas_Object_Box_Layout) (Evas_Object *o, Evas_Object_Box_Data *priv, void *user_data)
 Function signature for an Evas box object layouting routine. More...
 

Functions

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. More...
 
const Evas_Object_Box_Apievas_object_box_smart_class_get (void)
 Get the Evas box smart class, for inheritance purposes. More...
 
const Eo_Classevas_object_box_class_get (void)
 
#define EVAS_OBJ_BOX_CLASS   evas_object_box_class_get()
 
#define EVAS_OBJ_BOX_ID(sub_id)   (EVAS_OBJ_BOX_BASE_ID + sub_id)
 
#define evas_obj_box_internal_append(child, option)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_APPEND), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object_Box_Option **, option)
 
#define evas_obj_box_internal_prepend(child, option)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_PREPEND), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object_Box_Option **, option)
 
#define evas_obj_box_internal_insert_before(child, reference, option)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_BEFORE), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(const Evas_Object *, reference), EO_TYPECHECK(Evas_Object_Box_Option **, option)
 
#define evas_obj_box_internal_insert_after(child, reference, option)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_AFTER), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(const Evas_Object *, reference), EO_TYPECHECK(Evas_Object_Box_Option **, option)
 
#define evas_obj_box_internal_insert_at(child, pos, option)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_AT), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(unsigned int, pos), EO_TYPECHECK(Evas_Object_Box_Option **, option)
 
#define evas_obj_box_internal_remove(child, result)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_REMOVE), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object **, result)
 
#define evas_obj_box_internal_remove_at(pos, result)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_REMOVE_AT), EO_TYPECHECK(unsigned int, pos), EO_TYPECHECK(Evas_Object **, result)
 
#define evas_obj_box_internal_option_new(child, ret)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_OPTION_NEW), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object_Box_Option **, ret)
 
#define evas_obj_box_internal_option_free(opt)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_OPTION_FREE), EO_TYPECHECK(Evas_Object_Box_Option *, opt)
 
#define evas_obj_box_add_to(o)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ADD_TO), EO_TYPECHECK(Evas_Object **, o)
 
#define evas_obj_box_layout_set(cb, data, free_data)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_SET), EO_TYPECHECK(Evas_Object_Box_Layout, cb), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Eina_Free_Cb, free_data)
 
#define evas_obj_box_layout_horizontal()   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HORIZONTAL)
 
#define evas_obj_box_layout_vertical()   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_VERTICAL)
 
#define evas_obj_box_layout_homogeneous_horizontal()   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_HORIZONTAL)
 
#define evas_obj_box_layout_homogeneous_vertical()   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_VERTICAL)
 
#define evas_obj_box_layout_homogeneous_max_size_horizontal()   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_MAX_SIZE_HORIZONTAL)
 
#define evas_obj_box_layout_homogeneous_max_size_vertical()   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_MAX_SIZE_VERTICAL)
 
#define evas_obj_box_layout_flow_horizontal()   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_FLOW_HORIZONTAL)
 
#define evas_obj_box_layout_flow_vertical()   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_FLOW_VERTICAL)
 
#define evas_obj_box_layout_stack()   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_STACK)
 
#define evas_obj_box_align_set(horizontal, vertical)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ALIGN_SET), EO_TYPECHECK(double, horizontal), EO_TYPECHECK(double, vertical)
 
#define evas_obj_box_align_get(horizontal, vertical)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ALIGN_GET), EO_TYPECHECK(double *, horizontal), EO_TYPECHECK(double *, vertical)
 
#define evas_obj_box_padding_set(horizontal, vertical)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_PADDING_SET), EO_TYPECHECK(Evas_Coord, horizontal), EO_TYPECHECK(Evas_Coord, vertical)
 
#define evas_obj_box_padding_get(horizontal, vertical)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_PADDING_GET), EO_TYPECHECK(Evas_Coord *, horizontal), EO_TYPECHECK(Evas_Coord *, vertical)
 
#define evas_obj_box_append(child, option)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_APPEND), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object_Box_Option **, option)
 
#define evas_obj_box_prepend(child, option)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_PREPEND), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object_Box_Option **, option)
 
#define evas_obj_box_insert_before(child, reference, option)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INSERT_BEFORE), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(const Evas_Object *, reference), EO_TYPECHECK(Evas_Object_Box_Option **, option)
 
#define evas_obj_box_insert_after(child, reference, option)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INSERT_AFTER), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(const Evas_Object *, reference), EO_TYPECHECK(Evas_Object_Box_Option **, option)
 
#define evas_obj_box_insert_at(child, pos, option)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INSERT_AT), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(unsigned int, pos), EO_TYPECHECK(Evas_Object_Box_Option **, option)
 
#define evas_obj_box_remove(child, result)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_REMOVE), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Eina_Bool *, result)
 
#define evas_obj_box_remove_at(pos, result)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_REMOVE_AT), EO_TYPECHECK(unsigned int, pos), EO_TYPECHECK(Eina_Bool *, result)
 
#define evas_obj_box_remove_all(clear, result)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_REMOVE_ALL), EO_TYPECHECK(Eina_Bool, clear), EO_TYPECHECK(Eina_Bool *, result)
 
#define evas_obj_box_iterator_new(itr)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ITERATOR_NEW), EO_TYPECHECK(Eina_Iterator **, itr)
 
#define evas_obj_box_accessor_new(accessor)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ACCESSOR_NEW), EO_TYPECHECK(Eina_Accessor **, accessor)
 
#define evas_obj_box_option_property_name_get(property, name)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_NAME_GET), EO_TYPECHECK(int, property), EO_TYPECHECK(const char **, name)
 
#define evas_obj_box_option_property_id_get(name, id)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_ID_GET), EO_TYPECHECK(const char *, name), EO_TYPECHECK(int *, id)
 
#define evas_obj_box_option_property_vset(opt, property, args, ret)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_VSET), EO_TYPECHECK(Evas_Object_Box_Option *, opt), EO_TYPECHECK(int, property), EO_TYPECHECK(va_list *, args), EO_TYPECHECK(Eina_Bool *, ret)
 
#define evas_obj_box_option_property_vget(opt, property, args, ret)   EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_VGET), EO_TYPECHECK(Evas_Object_Box_Option *, opt), EO_TYPECHECK(int, property), EO_TYPECHECK(va_list *, args), EO_TYPECHECK(Eina_Bool *, ret)
 
enum  {
  EVAS_OBJ_BOX_SUB_ID_INTERNAL_APPEND,
  EVAS_OBJ_BOX_SUB_ID_INTERNAL_PREPEND,
  EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_BEFORE,
  EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_AFTER,
  EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_AT,
  EVAS_OBJ_BOX_SUB_ID_INTERNAL_REMOVE,
  EVAS_OBJ_BOX_SUB_ID_INTERNAL_REMOVE_AT,
  EVAS_OBJ_BOX_SUB_ID_INTERNAL_OPTION_NEW,
  EVAS_OBJ_BOX_SUB_ID_INTERNAL_OPTION_FREE,
  EVAS_OBJ_BOX_SUB_ID_ADD_TO,
  EVAS_OBJ_BOX_SUB_ID_LAYOUT_SET,
  EVAS_OBJ_BOX_SUB_ID_LAYOUT_HORIZONTAL,
  EVAS_OBJ_BOX_SUB_ID_LAYOUT_VERTICAL,
  EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_HORIZONTAL,
  EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_VERTICAL,
  EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_MAX_SIZE_HORIZONTAL,
  EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_MAX_SIZE_VERTICAL,
  EVAS_OBJ_BOX_SUB_ID_LAYOUT_FLOW_HORIZONTAL,
  EVAS_OBJ_BOX_SUB_ID_LAYOUT_FLOW_VERTICAL,
  EVAS_OBJ_BOX_SUB_ID_LAYOUT_STACK,
  EVAS_OBJ_BOX_SUB_ID_ALIGN_SET,
  EVAS_OBJ_BOX_SUB_ID_ALIGN_GET,
  EVAS_OBJ_BOX_SUB_ID_PADDING_SET,
  EVAS_OBJ_BOX_SUB_ID_PADDING_GET,
  EVAS_OBJ_BOX_SUB_ID_APPEND,
  EVAS_OBJ_BOX_SUB_ID_PREPEND,
  EVAS_OBJ_BOX_SUB_ID_INSERT_BEFORE,
  EVAS_OBJ_BOX_SUB_ID_INSERT_AFTER,
  EVAS_OBJ_BOX_SUB_ID_INSERT_AT,
  EVAS_OBJ_BOX_SUB_ID_REMOVE,
  EVAS_OBJ_BOX_SUB_ID_REMOVE_AT,
  EVAS_OBJ_BOX_SUB_ID_REMOVE_ALL,
  EVAS_OBJ_BOX_SUB_ID_ITERATOR_NEW,
  EVAS_OBJ_BOX_SUB_ID_ACCESSOR_NEW,
  EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_NAME_GET,
  EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_ID_GET,
  EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_VSET,
  EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_VGET,
  EVAS_OBJ_BOX_SUB_ID_LAST
}
 
Eo_Op EVAS_OBJ_BOX_BASE_ID
 
void evas_object_box_layout_set (Evas_Object *o, Evas_Object_Box_Layout cb, const void *data, void(*free_data)(void *data))
 Set a new layouting function to a given box object. More...
 
Evas_Objectevas_object_box_add (Evas *evas)
 Add a new box object on the provided canvas. More...
 
Evas_Objectevas_object_box_add_to (Evas_Object *parent)
 Add a new box as a child of a given smart object. More...
 
void evas_object_box_layout_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
 Layout function which sets the box o to a (basic) horizontal box. More...
 
void evas_object_box_layout_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
 Layout function which sets the box o to a (basic) vertical box. More...
 
void evas_object_box_layout_homogeneous_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
 Layout function which sets the box o to a homogeneous vertical box. More...
 
void evas_object_box_layout_homogeneous_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
 Layout function which sets the box o to a homogeneous horizontal box. More...
 
void evas_object_box_layout_homogeneous_max_size_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
 Layout function which sets the box o to a maximum size, homogeneous horizontal box. More...
 
void evas_object_box_layout_homogeneous_max_size_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
 Layout function which sets the box o to a maximum size, homogeneous vertical box. More...
 
void evas_object_box_layout_flow_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
 Layout function which sets the box o to a flow horizontal box. More...
 
void evas_object_box_layout_flow_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
 Layout function which sets the box o to a flow vertical box. More...
 
void evas_object_box_layout_stack (Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
 Layout function which sets the box o to a stacking box. More...
 
void evas_object_box_align_set (Evas_Object *o, double horizontal, double vertical)
 Set the alignment of the whole bounding box of contents, for a given box object. More...
 
void evas_object_box_align_get (const Evas_Object *o, double *horizontal, double *vertical)
 Get the alignment of the whole bounding box of contents, for a given box object. More...
 
void evas_object_box_padding_set (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical)
 Set the (space) padding between cells set for a given box object. More...
 
void evas_object_box_padding_get (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical)
 Get the (space) padding between cells set for a given box object. More...
 
Evas_Object_Box_Optionevas_object_box_append (Evas_Object *o, Evas_Object *child)
 Append a new child object to the given box object o. More...
 
Evas_Object_Box_Optionevas_object_box_prepend (Evas_Object *o, Evas_Object *child)
 Prepend a new child object to the given box object o. More...
 
Evas_Object_Box_Optionevas_object_box_insert_before (Evas_Object *o, Evas_Object *child, const Evas_Object *reference)
 Insert a new child object before another existing one, in a given box object o. More...
 
Evas_Object_Box_Optionevas_object_box_insert_after (Evas_Object *o, Evas_Object *child, const Evas_Object *reference)
 Insert a new child object after another existing one, in a given box object o. More...
 
Evas_Object_Box_Optionevas_object_box_insert_at (Evas_Object *o, Evas_Object *child, unsigned int pos)
 Insert a new child object at a given position, in a given box object o. More...
 
Eina_Bool evas_object_box_remove (Evas_Object *o, Evas_Object *child)
 Remove a given object from a box object, unparenting it again. More...
 
Eina_Bool evas_object_box_remove_at (Evas_Object *o, unsigned int pos)
 Remove an object, bound to a given position in a box object, unparenting it again. More...
 
Eina_Bool evas_object_box_remove_all (Evas_Object *o, Eina_Bool clear)
 Remove all child objects from a box object, unparenting them again. More...
 
Eina_Iteratorevas_object_box_iterator_new (const Evas_Object *o)
 Get an iterator to walk the list of children of a given box object. More...
 
Eina_Accessorevas_object_box_accessor_new (const Evas_Object *o)
 Get an accessor (a structure providing random items access) to the list of children of a given box object. More...
 
Eina_Listevas_object_box_children_get (const Evas_Object *o)
 Get the list of children objects in a given box object. More...
 
const char * evas_object_box_option_property_name_get (const Evas_Object *o, int property)
 Get the name of the property of the child elements of the box o which have id as identifier. More...
 
int evas_object_box_option_property_id_get (const Evas_Object *o, const char *name)
 Get the numerical identifier of the property of the child elements of the box o which have name as name string. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

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

Macro Definition 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_initinitializer 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_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.

See also
EVAS_OBJECT_BOX_API_INIT_NULL
EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
EVAS_OBJECT_BOX_API_INIT
#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.

See also
EVAS_OBJECT_BOX_API_INIT_NULL
EVAS_OBJECT_BOX_API_INIT_VERSION
EVAS_OBJECT_BOX_API_INIT
#define evas_obj_box_internal_append (   child,
  option 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_APPEND), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object_Box_Option **, option)
Since
1.8

No description supplied by the EAPI.

Parameters
[in]child
[out]option
See also
evas_object_box_internal_append

Referenced by evas_object_box_append().

#define evas_obj_box_internal_prepend (   child,
  option 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_PREPEND), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object_Box_Option **, option)
Since
1.8

No description supplied by the EAPI.

Parameters
[in]child
[out]option
See also
evas_object_box_internal_prepend

Referenced by evas_object_box_prepend().

#define evas_obj_box_internal_insert_before (   child,
  reference,
  option 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_BEFORE), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(const Evas_Object *, reference), EO_TYPECHECK(Evas_Object_Box_Option **, option)
Since
1.8

No description supplied by the EAPI.

Parameters
[in]child
[in]reference
[out]option
See also
evas_object_box_internal_insert_before

Referenced by evas_object_box_insert_before().

#define evas_obj_box_internal_insert_after (   child,
  reference,
  option 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_AFTER), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(const Evas_Object *, reference), EO_TYPECHECK(Evas_Object_Box_Option **, option)
Since
1.8

No description supplied by the EAPI.

Parameters
[in]child
[in]reference
[out]option
See also
evas_object_box_internal_insert_after

Referenced by evas_object_box_insert_after().

#define evas_obj_box_internal_insert_at (   child,
  pos,
  option 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_AT), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(unsigned int, pos), EO_TYPECHECK(Evas_Object_Box_Option **, option)
Since
1.8

No description supplied by the EAPI.

Parameters
[in]child
[in]pos
[out]option
See also
evas_object_box_internal_insert_at

Referenced by evas_object_box_insert_at().

#define evas_obj_box_internal_remove (   child,
  result 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_REMOVE), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object **, result)
Since
1.8

No description supplied by the EAPI.

Parameters
[in]child
[out]result
See also
evas_object_box_internal_remove

Referenced by evas_object_box_remove(), and evas_object_box_remove_all().

#define evas_obj_box_internal_remove_at (   pos,
  result 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_REMOVE_AT), EO_TYPECHECK(unsigned int, pos), EO_TYPECHECK(Evas_Object **, result)
Since
1.8

No description supplied by the EAPI.

Parameters
[in]pos
[out]result
See also
evas_object_box_internal_remove_at

Referenced by evas_object_box_remove_at().

#define evas_obj_box_internal_option_new (   child,
  ret 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_OPTION_NEW), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object_Box_Option **, ret)
Since
1.8

No description supplied by the EAPI.

Parameters
[in]child
[out]ret
See also
evas_object_box_internal_option_new
#define evas_obj_box_internal_option_free (   opt)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_OPTION_FREE), EO_TYPECHECK(Evas_Object_Box_Option *, opt)
Since
1.8

No description supplied by the EAPI.

Parameters
[in]opt
See also
evas_object_box_internal_option_free
#define evas_obj_box_add_to (   o)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ADD_TO), EO_TYPECHECK(Evas_Object **, o)
Since
1.8

Add a new box as a child of a given smart object.

Parameters
[in]o
See also
evas_object_box_add_to

Referenced by evas_object_box_add_to().

#define evas_obj_box_layout_set (   cb,
  data,
  free_data 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_SET), EO_TYPECHECK(Evas_Object_Box_Layout, cb), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Eina_Free_Cb, free_data)
Since
1.8

Set a new layouting function to a given box object

Parameters
[in]cb
[in]data
[in]free_data
See also
evas_object_box_layout_set

Referenced by evas_object_box_layout_set().

#define evas_obj_box_layout_horizontal ( )    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HORIZONTAL)
Since
1.8

Layout function which sets the box o to a (basic) horizontal box

See also
evas_object_box_layout_horizontal

Referenced by evas_object_box_layout_horizontal().

#define evas_obj_box_layout_vertical ( )    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_VERTICAL)
Since
1.8

Layout function which sets the box o to a (basic) vertical box

See also
evas_object_box_layout_vertical

Referenced by evas_object_box_layout_vertical().

#define evas_obj_box_layout_homogeneous_horizontal ( )    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_HORIZONTAL)
Since
1.8

Layout function which sets the box o to a homogeneous

See also
evas_object_box_layout_homogeneous_horizontal

Referenced by evas_object_box_layout_homogeneous_horizontal().

#define evas_obj_box_layout_homogeneous_vertical ( )    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_VERTICAL)
Since
1.8

Layout function which sets the box o to a homogeneous

See also
evas_object_box_layout_homogeneous_vertical

Referenced by evas_object_box_layout_homogeneous_vertical().

#define evas_obj_box_layout_homogeneous_max_size_horizontal ( )    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_MAX_SIZE_HORIZONTAL)
Since
1.8

Layout function which sets the box o to a maximum size.

See also
evas_object_box_layout_homogeneous_max_size_horizontal

Referenced by evas_object_box_layout_homogeneous_max_size_horizontal().

#define evas_obj_box_layout_homogeneous_max_size_vertical ( )    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_MAX_SIZE_VERTICAL)
Since
1.8

Layout function which sets the box o to a maximum size,

See also
evas_object_box_layout_homogeneous_max_size_vertical

Referenced by evas_object_box_layout_homogeneous_max_size_vertical().

#define evas_obj_box_layout_flow_horizontal ( )    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_FLOW_HORIZONTAL)
Since
1.8

Layout function which sets the box o to a flow horizontal

See also
evas_object_box_layout_flow_horizontal

Referenced by evas_object_box_layout_flow_horizontal().

#define evas_obj_box_layout_flow_vertical ( )    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_FLOW_VERTICAL)
Since
1.8

Layout function which sets the box o to a flow vertical box.

See also
evas_object_box_layout_flow_vertical

Referenced by evas_object_box_layout_flow_vertical().

#define evas_obj_box_layout_stack ( )    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_STACK)
Since
1.8

Layout function which sets the box o to a stacking box

See also
evas_object_box_layout_stack

Referenced by evas_object_box_layout_stack().

#define evas_obj_box_align_set (   horizontal,
  vertical 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ALIGN_SET), EO_TYPECHECK(double, horizontal), EO_TYPECHECK(double, vertical)
Since
1.8

Set the alignment of the whole bounding box of contents, for a

Parameters
[in]horizontal
[in]vertical
See also
evas_object_box_align_set

Referenced by evas_object_box_align_set().

#define evas_obj_box_align_get (   horizontal,
  vertical 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ALIGN_GET), EO_TYPECHECK(double *, horizontal), EO_TYPECHECK(double *, vertical)
Since
1.8

Get the alignment of the whole bounding box of contents, for a

Parameters
[out]horizontal
[out]vertical
See also
evas_object_box_align_get

Referenced by evas_object_box_align_get().

#define evas_obj_box_padding_set (   horizontal,
  vertical 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_PADDING_SET), EO_TYPECHECK(Evas_Coord, horizontal), EO_TYPECHECK(Evas_Coord, vertical)
Since
1.8

Set the (space) padding between cells set for a given box object.

Parameters
[in]horizontal
[in]vertical
See also
evas_object_box_padding_set

Referenced by evas_object_box_padding_set().

#define evas_obj_box_padding_get (   horizontal,
  vertical 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_PADDING_GET), EO_TYPECHECK(Evas_Coord *, horizontal), EO_TYPECHECK(Evas_Coord *, vertical)
Since
1.8

Get the (space) padding between cells set for a given box object.

Parameters
[out]horizontal
[out]vertical
See also
evas_object_box_padding_get

Referenced by evas_object_box_padding_get().

#define evas_obj_box_append (   child,
  option 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_APPEND), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object_Box_Option **, option)
Since
1.8

Append a new child object to the given box object o.

Parameters
[in]child
[in]option
See also
evas_object_box_append

Referenced by evas_object_box_append().

#define evas_obj_box_prepend (   child,
  option 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_PREPEND), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object_Box_Option **, option)
Since
1.8

Prepend a new child object to the given box object o.

Parameters
[in]child
[in]option
See also
evas_object_box_prepend

Referenced by evas_object_box_prepend().

#define evas_obj_box_insert_before (   child,
  reference,
  option 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INSERT_BEFORE), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(const Evas_Object *, reference), EO_TYPECHECK(Evas_Object_Box_Option **, option)
Since
1.8

Insert a new child object before another existing one, in

Parameters
[in]child
[in]reference
[in]option
See also
evas_object_box_insert_before

Referenced by evas_object_box_insert_before().

#define evas_obj_box_insert_after (   child,
  reference,
  option 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INSERT_AFTER), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(const Evas_Object *, reference), EO_TYPECHECK(Evas_Object_Box_Option **, option)
Since
1.8

Insert a new child object after another existing one, in

Parameters
[in]child
[in]reference
[in]option
See also
evas_object_box_insert_after

Referenced by evas_object_box_insert_after().

#define evas_obj_box_insert_at (   child,
  pos,
  option 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INSERT_AT), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(unsigned int, pos), EO_TYPECHECK(Evas_Object_Box_Option **, option)
Since
1.8

Insert a new child object at a given position, in a given

Parameters
[in]child
[in]pos
[in]option
See also
evas_object_box_insert_at

Referenced by evas_object_box_insert_at().

#define evas_obj_box_remove (   child,
  result 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_REMOVE), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Eina_Bool *, result)
Since
1.8

Remove a given object from a box object, unparenting it again.

Parameters
[in]child
[out]result
See also
evas_object_box_remove

Referenced by evas_object_box_remove().

#define evas_obj_box_remove_at (   pos,
  result 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_REMOVE_AT), EO_TYPECHECK(unsigned int, pos), EO_TYPECHECK(Eina_Bool *, result)
Since
1.8

Remove an object, bound to a given position in a box object,

Parameters
[in]pos
[out]result
See also
evas_object_box_remove_at

Referenced by evas_object_box_remove_at().

#define evas_obj_box_remove_all (   clear,
  result 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_REMOVE_ALL), EO_TYPECHECK(Eina_Bool, clear), EO_TYPECHECK(Eina_Bool *, result)
Since
1.8

Remove all child objects from a box object, unparenting them

Parameters
[in]clear
[out]result
See also
evas_object_box_remove_all

Referenced by evas_object_box_remove_all().

#define evas_obj_box_iterator_new (   itr)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ITERATOR_NEW), EO_TYPECHECK(Eina_Iterator **, itr)
Since
1.8

Get an iterator to walk the list of children of a given box object.

Parameters
[in]itr
See also
evas_object_box_iterator_new

Referenced by evas_object_box_iterator_new().

#define evas_obj_box_accessor_new (   accessor)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ACCESSOR_NEW), EO_TYPECHECK(Eina_Accessor **, accessor)
Since
1.8

Get an accessor (a structure providing random items access) to the

Parameters
[in]accessor
See also
evas_object_box_accessor_new

Referenced by evas_object_box_accessor_new().

#define evas_obj_box_option_property_name_get (   property,
  name 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_NAME_GET), EO_TYPECHECK(int, property), EO_TYPECHECK(const char **, name)
Since
1.8

Get the name of the property of the child elements of the box o

Parameters
[in]property
[in]name
See also
evas_object_box_option_property_name_get

Referenced by evas_object_box_option_property_name_get().

#define evas_obj_box_option_property_id_get (   name,
  id 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_ID_GET), EO_TYPECHECK(const char *, name), EO_TYPECHECK(int *, id)
Since
1.8

Get the numerical identifier of the property of the child elements

Parameters
[in]name
[in]id
See also
evas_object_box_option_property_id_get

Referenced by evas_object_box_option_property_id_get().

#define evas_obj_box_option_property_vset (   opt,
  property,
  args,
  ret 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_VSET), EO_TYPECHECK(Evas_Object_Box_Option *, opt), EO_TYPECHECK(int, property), EO_TYPECHECK(va_list *, args), EO_TYPECHECK(Eina_Bool *, ret)
Since
1.8

Set a property value (by its given numerical identifier), on a

Parameters
[in]opt
[in]property
[in]args
[out]ret
See also
evas_object_box_option_property_vset

Referenced by evas_object_box_option_property_vset().

#define evas_obj_box_option_property_vget (   opt,
  property,
  args,
  ret 
)    EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_VGET), EO_TYPECHECK(Evas_Object_Box_Option *, opt), EO_TYPECHECK(int, property), EO_TYPECHECK(va_list *, args), EO_TYPECHECK(Eina_Bool *, ret)
Since
1.8

Get a property's value (by its given numerical identifier), on a

Parameters
[in]opt
[in]property
[in]args
[out]ret
See also
evas_object_box_option_property_vget

Referenced by evas_object_box_option_property_vget().

Typedef Documentation

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.

Evas_Object_Box_Layout

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().

Function Documentation

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.

Parameters
apiThe box API struct to set back, most probably with overridden fields (on class extensions scenarios)

References EAPI.

const Evas_Object_Box_Api* evas_object_box_smart_class_get ( void  )

Get the Evas box smart class, for inheritance purposes.

Returns
the (canonical) Evas box smart class.

The returned value is not to be modified, just use it as your parent class.

References EAPI.

void evas_object_box_layout_set ( Evas_Object o,
Evas_Object_Box_Layout  cb,
const void *  data,
void(*)(void *data)  free_data 
)

Set a new layouting function to a given box object.

Parameters
oThe box object to operate on.
cbThe new layout function to set on o.
dataData pointer to be passed to cb.
free_dataFunction to free data, if need be.

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:

Refer to each of their documentation texts for details on them.

Note
A box layouting function will be triggered by the 'calculate' smart callback of the box's smart class.

References EAPI, evas_obj_box_layout_set, evas_object_geometry_get(), evas_object_resize(), evas_object_size_hint_max_get(), evas_object_size_hint_min_get(), evas_object_size_hint_weight_get(), evas_object_smart_changed(), and _Evas_Object_Box_Option::obj.

Evas_Object* evas_object_box_add ( Evas evas)

Add a new box object on the provided canvas.

Parameters
evasThe canvas to create the box object on.
Returns
NULL on error, a pointer to a new box object on success.

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)().

Examples:
evas-box.c, and evas-hints.c.

References EAPI, evas_obj_smart_callbacks_descriptions_set, and evas_obj_type_set.

Referenced by edje_file_data_get(), and evas_object_box_add_to().

Evas_Object* evas_object_box_add_to ( Evas_Object parent)

Add a new box as a child of a given smart object.

Parameters
parentThe parent smart object to put the new box in.
Returns
NULL on error, a pointer to a new box object on success.

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()

References EAPI, evas_obj_box_add_to, evas_object_box_add(), evas_object_evas_get(), and evas_object_smart_member_add().

void evas_object_box_layout_horizontal ( Evas_Object o,
Evas_Object_Box_Data priv,
void *  data 
)

Layout function which sets the box o to a (basic) horizontal box.

Parameters
oThe box object in question
privThe smart data of the o
dataThe data pointer passed on evas_object_box_layout_set(), if any

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 the evas_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 to 0.0, children are aligned to the left. A value of 1.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 the padding_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 of align_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). The align_v and padding_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 and padding_r sum up to the container's horizontal padding between elements. The child's padding_t, padding_b and align_y properties apply for padding/alignment relative to the overall height of the box. Finally, there is the weight_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. The weight_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.

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.

Examples:
evas-box.c.

References EAPI, eina_list_count(), EINA_LIST_FOREACH, evas_obj_box_layout_horizontal, evas_object_geometry_get(), evas_object_move(), evas_object_resize(), evas_object_size_hint_align_get(), evas_object_size_hint_max_get(), evas_object_size_hint_min_get(), evas_object_size_hint_min_set(), evas_object_size_hint_padding_get(), evas_object_size_hint_weight_get(), and _Evas_Object_Box_Option::obj.

Referenced by edje_extern_object_aspect_set().

void evas_object_box_layout_vertical ( Evas_Object o,
Evas_Object_Box_Data priv,
void *  data 
)
void evas_object_box_layout_homogeneous_vertical ( Evas_Object o,
Evas_Object_Box_Data priv,
void *  data 
)
void evas_object_box_layout_homogeneous_horizontal ( Evas_Object o,
Evas_Object_Box_Data priv,
void *  data 
)

Layout function which sets the box o to a homogeneous horizontal box.

Parameters
oThe box object in question
privThe smart data of the o
dataThe data pointer passed on evas_object_box_layout_set(), if any

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 the evas_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. The align_v and padding_v properties of the box don't contribute to its behaviour when this layout is chosen.
Child element's properties:
padding_l and padding_r sum up to the required width of the child element. The align_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 to align_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's padding_t, padding_b and align_y properties apply for padding/alignment relative to the overall height of the box. A value of -1.0 to align_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).
Examples:
evas-box.c.

References EAPI, eina_list_count(), EINA_LIST_FOREACH, evas_obj_box_layout_homogeneous_horizontal, evas_object_geometry_get(), evas_object_move(), evas_object_resize(), evas_object_size_hint_align_get(), evas_object_size_hint_max_get(), evas_object_size_hint_min_get(), evas_object_size_hint_min_set(), evas_object_size_hint_padding_get(), and _Evas_Object_Box_Option::obj.

Referenced by edje_extern_object_aspect_set().

void evas_object_box_layout_homogeneous_max_size_horizontal ( Evas_Object o,
Evas_Object_Box_Data priv,
void *  data 
)

Layout function which sets the box o to a maximum size, homogeneous horizontal box.

Parameters
oThe box object in question
privThe smart data of the o
dataThe data pointer passed on evas_object_box_layout_set(), if any

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 the evas_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 to 0.0, children are aligned to the left. A value of 1.0 lets them aligned to the right border. Values in between align them proportionally. A negative value of align_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). The align_v and padding_v properties of the box don't contribute to its behaviour when this layout is chosen.
Child element's properties:
padding_l and padding_r sum up to the required width of the child element. The align_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 to align_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's padding_t, padding_b and align_y properties apply for padding/alignment relative to the overall height of the box. A value of -1.0 to align_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).
Examples:
evas-box.c.

References EAPI, eina_list_count(), EINA_LIST_FOREACH, evas_obj_box_layout_homogeneous_max_size_horizontal, evas_object_geometry_get(), evas_object_move(), evas_object_resize(), evas_object_size_hint_align_get(), evas_object_size_hint_max_get(), evas_object_size_hint_min_get(), evas_object_size_hint_min_set(), evas_object_size_hint_padding_get(), and _Evas_Object_Box_Option::obj.

Referenced by edje_extern_object_aspect_set().

void evas_object_box_layout_homogeneous_max_size_vertical ( Evas_Object o,
Evas_Object_Box_Data priv,
void *  data 
)
void evas_object_box_layout_flow_horizontal ( Evas_Object o,
Evas_Object_Box_Data priv,
void *  data 
)

Layout function which sets the box o to a flow horizontal box.

Parameters
oThe box object in question
privThe smart data of the o
dataThe data pointer passed on evas_object_box_layout_set(), if any

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 the evas_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 to align_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 to align_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 and padding_r sum up to the required width of the child element. The align_x property has no influence on the layout. The child's padding_t and padding_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, that align_y dictates positioning relative to the largest height required by a child object in the actual row.
Examples:
evas-box.c.

References _Eina_List::data, EAPI, eina_list_count(), evas_obj_box_layout_flow_horizontal, evas_object_geometry_get(), evas_object_move(), evas_object_size_hint_align_get(), evas_object_size_hint_min_set(), evas_object_size_hint_padding_get(), _Eina_List::next, and _Evas_Object_Box_Option::obj.

Referenced by edje_extern_object_aspect_set().

void evas_object_box_layout_flow_vertical ( Evas_Object o,
Evas_Object_Box_Data priv,
void *  data 
)

Layout function which sets the box o to a flow vertical box.

This function behaves analogously to evas_object_box_layout_flow_horizontal(). The description of its behaviour can be derived from that function's documentation.

Examples:
evas-box.c.

References EAPI, eina_list_count(), evas_obj_box_layout_flow_vertical, evas_object_geometry_get(), evas_object_move(), evas_object_size_hint_align_get(), evas_object_size_hint_min_set(), evas_object_size_hint_padding_get(), _Eina_List::next, and _Evas_Object_Box_Option::obj.

Referenced by edje_extern_object_aspect_set().

void evas_object_box_layout_stack ( Evas_Object o,
Evas_Object_Box_Data priv,
void *  data 
)

Layout function which sets the box o to a stacking box.

Parameters
oThe box object in question
privThe smart data of the o
dataThe data pointer passed on evas_object_box_layout_set(), if any

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 and padding_r sum up to the required width of the child element. The align_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 to align_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.
Examples:
evas-box.c.

References EAPI, EINA_LIST_FOREACH, evas_obj_box_layout_stack, evas_object_geometry_get(), evas_object_move(), evas_object_resize(), evas_object_size_hint_align_get(), evas_object_size_hint_max_get(), evas_object_size_hint_min_get(), evas_object_size_hint_min_set(), evas_object_size_hint_padding_get(), evas_object_stack_above(), and _Evas_Object_Box_Option::obj.

Referenced by edje_extern_object_aspect_set().

void evas_object_box_align_set ( Evas_Object o,
double  horizontal,
double  vertical 
)

Set the alignment of the whole bounding box of contents, for a given box object.

Parameters
oThe given box object to set alignment from
horizontalThe horizontal alignment, in pixels
verticalthe vertical alignment, in pixels

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, with 1.0 meaning to the right. For vertical alignment, 0.0 means to the top, with 1.0 meaning to the bottom.

Note
The default values for both alignments is 0.5.
See also
evas_object_box_align_get()
Examples:
evas-box.c.

References EAPI, evas_obj_box_align_set, and evas_object_smart_changed().

void evas_object_box_align_get ( const Evas_Object o,
double *  horizontal,
double *  vertical 
)

Get the alignment of the whole bounding box of contents, for a given box object.

Parameters
oThe given box object to get alignment from
horizontalPointer to a variable where to store the horizontal alignment
verticalPointer to a variable where to store the vertical alignment
See also
evas_object_box_align_set() for more information
Examples:
evas-box.c.

References EAPI, and evas_obj_box_align_get.

void evas_object_box_padding_set ( Evas_Object o,
Evas_Coord  horizontal,
Evas_Coord  vertical 
)

Set the (space) padding between cells set for a given box object.

Parameters
oThe given box object to set padding from
horizontalThe horizontal padding, in pixels
verticalthe vertical padding, in pixels
Note
The default values for both padding components is 0.
See also
evas_object_box_padding_get()
Examples:
evas-box.c.

References EAPI, evas_obj_box_padding_set, and evas_object_smart_changed().

void evas_object_box_padding_get ( const Evas_Object o,
Evas_Coord *  horizontal,
Evas_Coord *  vertical 
)

Get the (space) padding between cells set for a given box object.

Parameters
oThe given box object to get padding from
horizontalPointer to a variable where to store the horizontal padding
verticalPointer to a variable where to store the vertical padding
See also
evas_object_box_padding_set()
Examples:
evas-box.c.

References EAPI, and evas_obj_box_padding_get.

Evas_Object_Box_Option* evas_object_box_append ( Evas_Object o,
Evas_Object child 
)

Append a new child object to the given box object o.

Parameters
oThe given box object
childA child Evas object to be made a member of o
Returns
A box option bound to the recently added box item or NULL, on errors

On success, the "child,added" smart event will take place.

Note
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.
Examples:
evas-box.c, and evas-hints.c.

References EAPI, evas_obj_box_append, evas_obj_box_internal_append, evas_object_smart_changed(), and evas_object_smart_member_add().

Referenced by edje_object_access_part_list_get().

Evas_Object_Box_Option* evas_object_box_prepend ( Evas_Object o,
Evas_Object child 
)

Prepend a new child object to the given box object o.

Parameters
oThe given box object
childA child Evas object to be made a member of o
Returns
A box option bound to the recently added box item or NULL, on errors

On success, the "child,added" smart event will take place.

Note
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.

References EAPI, evas_obj_box_internal_prepend, evas_obj_box_prepend, evas_object_smart_changed(), and evas_object_smart_member_add().

Referenced by edje_object_access_part_list_get().

Evas_Object_Box_Option* evas_object_box_insert_before ( Evas_Object o,
Evas_Object child,
const Evas_Object reference 
)

Insert a new child object before another existing one, in a given box object o.

Parameters
oThe given box object
childA child Evas object to be made a member of o
referenceThe child object to place this new one before
Returns
A box option bound to the recently added box item or NULL, on errors

On success, the "child,added" smart event will take place.

Note
This function will fail if reference is not a member of o.
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.

References EAPI, evas_obj_box_insert_before, evas_obj_box_internal_insert_before, evas_object_smart_changed(), and evas_object_smart_member_add().

Referenced by edje_object_access_part_list_get().

Evas_Object_Box_Option* evas_object_box_insert_after ( Evas_Object o,
Evas_Object child,
const Evas_Object reference 
)

Insert a new child object after another existing one, in a given box object o.

Parameters
oThe given box object
childA child Evas object to be made a member of o
referenceThe child object to place this new one after
Returns
A box option bound to the recently added box item or NULL, on errors

On success, the "child,added" smart event will take place.

Note
This function will fail if reference is not a member of o.
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.

References EAPI, evas_obj_box_insert_after, evas_obj_box_internal_insert_after, evas_object_smart_changed(), and evas_object_smart_member_add().

Evas_Object_Box_Option* evas_object_box_insert_at ( Evas_Object o,
Evas_Object child,
unsigned int  pos 
)

Insert a new child object at a given position, in a given box object o.

Parameters
oThe given box object
childA child Evas object to be made a member of o
posThe numeric position (starting from 0) to place the new child object at
Returns
A box option bound to the recently added box item or NULL, on errors

On success, the "child,added" smart event will take place.

Note
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.
Examples:
evas-box.c.

References EAPI, evas_obj_box_insert_at, evas_obj_box_internal_insert_at, evas_object_smart_changed(), and evas_object_smart_member_add().

Referenced by edje_object_access_part_list_get().

Eina_Bool evas_object_box_remove ( Evas_Object o,
Evas_Object child 
)

Remove a given object from a box object, unparenting it again.

Parameters
oThe box object to remove a child object from
childThe handle to the child object to be removed
Returns
EINA_TRUE, on success, EINA_FALSE otherwise

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.

Note
This call will trigger the box's _Evas_Object_Box_Api::remove smart function.

References EAPI, EINA_FALSE, EINA_TRUE, evas_obj_box_internal_remove, evas_obj_box_remove, evas_object_smart_changed(), and evas_object_smart_member_del().

Referenced by edje_object_access_part_list_get().

Eina_Bool evas_object_box_remove_at ( Evas_Object o,
unsigned int  pos 
)

Remove an object, bound to a given position in a box object, unparenting it again.

Parameters
oThe box object to remove a child object from
posThe numeric position (starting from 0) of the child object to be removed
Returns
EINA_TRUE, on success, EINA_FALSE otherwise

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.

Note
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.
Examples:
evas-box.c.

References EAPI, EINA_FALSE, EINA_TRUE, evas_obj_box_internal_remove_at, evas_obj_box_remove_at, evas_object_smart_changed(), and evas_object_smart_member_del().

Referenced by edje_object_access_part_list_get().

Eina_Bool evas_object_box_remove_all ( Evas_Object o,
Eina_Bool  clear 
)

Remove all child objects from a box object, unparenting them again.

Parameters
oThe box object to remove a child object from
clearif true, it will delete just removed children.
Returns
EINA_TRUE, on success, EINA_FALSE otherwise

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.

References _Eina_List::data, EAPI, EINA_FALSE, EINA_TRUE, evas_obj_box_internal_remove, evas_obj_box_remove_all, evas_object_del(), evas_object_smart_changed(), evas_object_smart_member_del(), and _Evas_Object_Box_Option::obj.

Eina_Iterator* evas_object_box_iterator_new ( const Evas_Object o)

Get an iterator to walk the list of children of a given box object.

Parameters
oThe box to retrieve an items iterator from
Returns
An iterator on o's child objects, on success, or NULL, on errors
Note
Do not remove or delete objects while walking the list.

References EAPI, eina_list_iterator_new(), EINA_MAGIC_SET, evas_obj_box_iterator_new, FUNC_ITERATOR_FREE, FUNC_ITERATOR_GET_CONTAINER, and FUNC_ITERATOR_NEXT.

Referenced by edje_file_data_get(), and edje_object_update_hints_get().

Eina_Accessor* evas_object_box_accessor_new ( const Evas_Object o)

Get an accessor (a structure providing random items access) to the list of children of a given box object.

Parameters
oThe box to retrieve an items iterator from
Returns
An accessor on o's child objects, on success, or NULL, on errors
Note
Do not remove or delete objects while walking the list.

References EAPI, eina_list_accessor_new(), EINA_MAGIC_SET, evas_obj_box_accessor_new, FUNC_ACCESSOR_FREE, FUNC_ACCESSOR_GET_AT, and FUNC_ACCESSOR_GET_CONTAINER.

Eina_List* evas_object_box_children_get ( const Evas_Object o)

Get the list of children objects in a given box object.

Parameters
oThe box to retrieve an items list from
Returns
A list of o's child objects, on success, or NULL, on errors (or if it has no child objects)

The returned list should be freed with eina_list_free() when you no longer need it.

Note
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.
Examples:
evas-box.c.

References EAPI, eina_list_append(), EINA_LIST_FOREACH, and _Evas_Object_Box_Option::obj.

Referenced by edje_file_data_get(), and edje_object_access_part_list_get().

const char* evas_object_box_option_property_name_get ( const Evas_Object o,
int  property 
)

Get the name of the property of the child elements of the box o which have id as identifier.

Parameters
oThe box to search child options from
propertyThe numerical identifier of the option being searched, for its name
Returns
The name of the given property or NULL, on errors.
Note
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.

References EAPI, and evas_obj_box_option_property_name_get.

int evas_object_box_option_property_id_get ( const Evas_Object o,
const char *  name 
)

Get the numerical identifier of the property of the child elements of the box o which have name as name string.

Parameters
oThe box to search child options from
nameThe name string of the option being searched, for its ID
Returns
The numerical ID of the given property or -1, on errors.
Note
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.

References EAPI, and evas_obj_box_option_property_id_get.

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.

Parameters
oThe box parenting the child element
optThe box option structure bound to the child box element to set a property on
propertyThe numerical ID of the given property
...(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.
Note
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.

References EAPI, and evas_object_box_option_property_vset().

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.

Parameters
oThe box parenting the child element
optThe box option structure bound to the child box element to set a property on
propertyThe numerical ID of the given property
argsThe 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.

This is a variable argument list variant of the evas_object_box_option_property_set(). See its documentation for more details.

References EAPI, EINA_FALSE, and evas_obj_box_option_property_vset.

Referenced by evas_object_box_option_property_set().

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.

Parameters
oThe box parenting the child element
optThe box option structure bound to the child box element to get a property from
propertyThe numerical ID of the given property
...(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.
Note
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.

References EAPI, and evas_object_box_option_property_vget().

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.

Parameters
oThe box parenting the child element
optThe box option structure bound to the child box element to get a property from
propertyThe numerical ID of the given property
argsThe 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.

This is a variable argument list variant of the evas_object_box_option_property_get(). See its documentation for more details.

References EINA_FALSE, evas_obj_box_option_property_vget, and evas_smart_legacy_type_register().

Referenced by evas_object_box_option_property_get().