Convenience smart object that packs children using a tabular layout using children size hints to define their size and alignment inside their cell space. More...
Typedefs | |
typedef enum _Evas_Object_Table_Homogeneous_Mode | Evas_Object_Table_Homogeneous_Mode |
How to pack items into cells in a table. More... | |
Enumerations | |
enum | _Evas_Object_Table_Homogeneous_Mode { EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE = 0, EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1, EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2 } |
How to pack items into cells in a table. More... | |
enum | { EVAS_OBJ_TABLE_SUB_ID_ADD_TO, EVAS_OBJ_TABLE_SUB_ID_HOMOGENEOUS_SET, EVAS_OBJ_TABLE_SUB_ID_HOMOGENEOUS_GET, EVAS_OBJ_TABLE_SUB_ID_ALIGN_SET, EVAS_OBJ_TABLE_SUB_ID_ALIGN_GET, EVAS_OBJ_TABLE_SUB_ID_PADDING_SET, EVAS_OBJ_TABLE_SUB_ID_PADDING_GET, EVAS_OBJ_TABLE_SUB_ID_PACK_GET, EVAS_OBJ_TABLE_SUB_ID_PACK, EVAS_OBJ_TABLE_SUB_ID_UNPACK, EVAS_OBJ_TABLE_SUB_ID_CLEAR, EVAS_OBJ_TABLE_SUB_ID_COL_ROW_SIZE_GET, EVAS_OBJ_TABLE_SUB_ID_ITERATOR_NEW, EVAS_OBJ_TABLE_SUB_ID_ACCESSOR_NEW, EVAS_OBJ_TABLE_SUB_ID_CHILDREN_GET, EVAS_OBJ_TABLE_SUB_ID_MIRRORED_GET, EVAS_OBJ_TABLE_SUB_ID_MIRRORED_SET, EVAS_OBJ_TABLE_SUB_ID_LAST } |
const Eo_Class * | evas_object_table_class_get (void) |
#define | EVAS_OBJ_TABLE_CLASS evas_object_table_class_get() |
#define | EVAS_OBJ_TABLE_ID(sub_id) (EVAS_OBJ_TABLE_BASE_ID + sub_id) |
#define | evas_obj_table_add_to(ret) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ADD_TO), EO_TYPECHECK(Evas_Object **, ret) |
#define | evas_obj_table_homogeneous_set(homogeneous) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_HOMOGENEOUS_SET), EO_TYPECHECK(Evas_Object_Table_Homogeneous_Mode, homogeneous) |
#define | evas_obj_table_homogeneous_get(ret) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_HOMOGENEOUS_GET), EO_TYPECHECK(Evas_Object_Table_Homogeneous_Mode *, ret) |
#define | evas_obj_table_align_set(horizontal, vertical) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ALIGN_SET), EO_TYPECHECK(double, horizontal), EO_TYPECHECK(double, vertical) |
#define | evas_obj_table_align_get(horizontal, vertical) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ALIGN_GET), EO_TYPECHECK(double *, horizontal), EO_TYPECHECK(double *, vertical) |
#define | evas_obj_table_padding_set(horizontal, vertical) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_PADDING_SET), EO_TYPECHECK(Evas_Coord, horizontal), EO_TYPECHECK(Evas_Coord, vertical) |
#define | evas_obj_table_padding_get(horizontal, vertical) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_PADDING_GET), EO_TYPECHECK(Evas_Coord *, horizontal), EO_TYPECHECK(Evas_Coord *, vertical) |
#define | evas_obj_table_pack_get(child, col, row, colspan, rowspan, ret) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_PACK_GET), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(unsigned short *, col), EO_TYPECHECK(unsigned short *, row), EO_TYPECHECK(unsigned short *, colspan), EO_TYPECHECK(unsigned short *, rowspan), EO_TYPECHECK(Eina_Bool *, ret) |
#define | evas_obj_table_pack(child, col, row, colspan, rowspan, ret) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_PACK), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(unsigned short, col), EO_TYPECHECK(unsigned short, row), EO_TYPECHECK(unsigned short, colspan), EO_TYPECHECK(unsigned short, rowspan), EO_TYPECHECK(Eina_Bool *, ret) |
#define | evas_obj_table_unpack(child, ret) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_UNPACK), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Eina_Bool *, ret) |
#define | evas_obj_table_clear(clear) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_CLEAR), EO_TYPECHECK(Eina_Bool, clear) |
#define | evas_obj_table_col_row_size_get(cols, rows) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_COL_ROW_SIZE_GET), EO_TYPECHECK(int *, cols), EO_TYPECHECK(int *, rows) |
#define | evas_obj_table_iterator_new(ret) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ITERATOR_NEW), EO_TYPECHECK(Eina_Iterator **, ret) |
#define | evas_obj_table_accessor_new(ret) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ACCESSOR_NEW), EO_TYPECHECK(Eina_Accessor **, ret) |
#define | evas_obj_table_children_get(ret) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_CHILDREN_GET), EO_TYPECHECK(Eina_List **, ret) |
#define | evas_obj_table_mirrored_get(ret) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_MIRRORED_GET), EO_TYPECHECK(Eina_Bool *, ret) |
#define | evas_obj_table_mirrored_set(mirrored) EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_MIRRORED_SET), EO_TYPECHECK(Eina_Bool, mirrored) |
Eo_Op | EVAS_OBJ_TABLE_BASE_ID |
Evas_Object * | evas_object_table_add (Evas *evas) |
Create a new table. More... | |
Evas_Object * | evas_object_table_add_to (Evas_Object *parent) |
Create a table that is child of a given element parent. More... | |
void | evas_object_table_homogeneous_set (Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous) |
Set how this table should layout children. More... | |
Evas_Object_Table_Homogeneous_Mode | evas_object_table_homogeneous_get (const Evas_Object *o) |
Get the current layout homogeneous mode. More... | |
void | evas_object_table_padding_set (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) |
Set padding between cells. | |
void | evas_object_table_padding_get (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) |
Get padding between cells. | |
void | evas_object_table_align_set (Evas_Object *o, double horizontal, double vertical) |
Set the alignment of the whole bounding box of contents. | |
void | evas_object_table_align_get (const Evas_Object *o, double *horizontal, double *vertical) |
Get alignment of the whole bounding box of contents. | |
void | evas_object_table_mirrored_set (Evas_Object *o, Eina_Bool mirrored) |
Sets the mirrored mode of the table. More... | |
Eina_Bool | evas_object_table_mirrored_get (const Evas_Object *o) |
Gets the mirrored mode of the table. More... | |
Eina_Bool | evas_object_table_pack_get (const Evas_Object *o, Evas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan) |
Get packing location of a child of table. More... | |
Eina_Bool | evas_object_table_pack (Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) |
Add a new child to a table object or set its current packing. More... | |
Eina_Bool | evas_object_table_unpack (Evas_Object *o, Evas_Object *child) |
Remove child from table. More... | |
void | evas_object_table_clear (Evas_Object *o, Eina_Bool clear) |
Faster way to remove all child objects from a table object. More... | |
void | evas_object_table_col_row_size_get (const Evas_Object *o, int *cols, int *rows) |
Get the number of columns and rows this table takes. More... | |
Eina_Iterator * | evas_object_table_iterator_new (const Evas_Object *o) |
Get an iterator to walk the list of children for the table. More... | |
Eina_Accessor * | evas_object_table_accessor_new (const Evas_Object *o) |
Get an accessor to get random access to the list of children for the table. More... | |
Eina_List * | evas_object_table_children_get (const Evas_Object *o) |
Get the list of children for the table. More... | |
Evas_Object * | evas_object_table_child_get (const Evas_Object *o, unsigned short col, unsigned short row) |
Get the child of the table at the given coordinates. More... | |
Convenience smart object that packs children using a tabular layout using children size hints to define their size and alignment inside their cell space.
Table Smart Object example shows how to use this Evas_Object.
#define evas_obj_table_add_to | ( | ret | ) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ADD_TO), EO_TYPECHECK(Evas_Object **, ret) |
Create a table that is child of a given element parent.
[out] | ret |
Referenced by evas_object_table_add_to().
#define evas_obj_table_homogeneous_set | ( | homogeneous | ) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_HOMOGENEOUS_SET), EO_TYPECHECK(Evas_Object_Table_Homogeneous_Mode, homogeneous) |
Set how this table should layout children.
[in] | homogeneous |
Referenced by evas_object_table_homogeneous_set().
#define evas_obj_table_homogeneous_get | ( | ret | ) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_HOMOGENEOUS_GET), EO_TYPECHECK(Evas_Object_Table_Homogeneous_Mode *, ret) |
Get the current layout homogeneous mode.
[out] | ret |
#define evas_obj_table_align_set | ( | horizontal, | |
vertical | |||
) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ALIGN_SET), EO_TYPECHECK(double, horizontal), EO_TYPECHECK(double, vertical) |
Set the alignment of the whole bounding box of contents.
[in] | horizontal | |
[in] | vertical |
Referenced by evas_object_table_align_set().
#define evas_obj_table_align_get | ( | horizontal, | |
vertical | |||
) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ALIGN_GET), EO_TYPECHECK(double *, horizontal), EO_TYPECHECK(double *, vertical) |
Get alignment of the whole bounding box of contents.
[out] | horizontal | |
[out] | vertical |
Referenced by evas_object_table_align_get().
#define evas_obj_table_padding_set | ( | horizontal, | |
vertical | |||
) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_PADDING_SET), EO_TYPECHECK(Evas_Coord, horizontal), EO_TYPECHECK(Evas_Coord, vertical) |
Set padding between cells.
[in] | horizontal | |
[in] | vertical |
Referenced by evas_object_table_padding_set().
#define evas_obj_table_padding_get | ( | horizontal, | |
vertical | |||
) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_PADDING_GET), EO_TYPECHECK(Evas_Coord *, horizontal), EO_TYPECHECK(Evas_Coord *, vertical) |
Get padding between cells.
[out] | horizontal | |
[out] | vertical |
Referenced by evas_object_table_padding_get().
#define evas_obj_table_pack_get | ( | child, | |
col, | |||
row, | |||
colspan, | |||
rowspan, | |||
ret | |||
) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_PACK_GET), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(unsigned short *, col), EO_TYPECHECK(unsigned short *, row), EO_TYPECHECK(unsigned short *, colspan), EO_TYPECHECK(unsigned short *, rowspan), EO_TYPECHECK(Eina_Bool *, ret) |
Get packing location of a child of table
[in] | child | |
[out] | col | |
[out] | row | |
[out] | colspan | |
[out] | rowspan | |
[out] | ret |
Referenced by evas_object_table_pack_get().
#define evas_obj_table_pack | ( | child, | |
col, | |||
row, | |||
colspan, | |||
rowspan, | |||
ret | |||
) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_PACK), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(unsigned short, col), EO_TYPECHECK(unsigned short, row), EO_TYPECHECK(unsigned short, colspan), EO_TYPECHECK(unsigned short, rowspan), EO_TYPECHECK(Eina_Bool *, ret) |
Add a new child to a table object or set its current packing.
[in] | child | |
[in] | col | |
[in] | row | |
[in] | colspan | |
[in] | rowspan | |
[out] | ret |
Referenced by evas_object_table_pack().
#define evas_obj_table_unpack | ( | child, | |
ret | |||
) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_UNPACK), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Eina_Bool *, ret) |
Remove child from table.
[in] | child | |
[out] | ret |
Referenced by evas_object_table_unpack().
#define evas_obj_table_clear | ( | clear | ) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_CLEAR), EO_TYPECHECK(Eina_Bool, clear) |
Faster way to remove all child objects from a table object.
[in] | clear |
Referenced by evas_object_table_clear().
#define evas_obj_table_col_row_size_get | ( | cols, | |
rows | |||
) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_COL_ROW_SIZE_GET), EO_TYPECHECK(int *, cols), EO_TYPECHECK(int *, rows) |
Get the number of columns and rows this table takes.
[out] | cols | |
[out] | rows |
Referenced by evas_object_table_col_row_size_get().
#define evas_obj_table_iterator_new | ( | ret | ) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ITERATOR_NEW), EO_TYPECHECK(Eina_Iterator **, ret) |
Get an iterator to walk the list of children for the table.
[out] | ret |
Referenced by evas_object_table_iterator_new().
#define evas_obj_table_accessor_new | ( | ret | ) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_ACCESSOR_NEW), EO_TYPECHECK(Eina_Accessor **, ret) |
Get an accessor to get random access to the list of children for the table.
[out] | ret |
Referenced by evas_object_table_accessor_new().
#define evas_obj_table_children_get | ( | ret | ) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_CHILDREN_GET), EO_TYPECHECK(Eina_List **, ret) |
Get the list of children for the table.
[out] | ret |
Referenced by evas_object_table_children_get().
#define evas_obj_table_mirrored_get | ( | ret | ) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_MIRRORED_GET), EO_TYPECHECK(Eina_Bool *, ret) |
Gets the mirrored mode of the table.
[out] | ret |
Referenced by evas_object_table_mirrored_get().
#define evas_obj_table_mirrored_set | ( | mirrored | ) | EVAS_OBJ_TABLE_ID(EVAS_OBJ_TABLE_SUB_ID_MIRRORED_SET), EO_TYPECHECK(Eina_Bool, mirrored) |
Sets the mirrored mode of the table. In mirrored mode the table items go
[in] | mirrored |
Referenced by evas_object_table_mirrored_set().
How to pack items into cells in a table.
How to pack items into cells in a table.
Evas_Object* evas_object_table_add | ( | Evas * | evas | ) |
Create a new table.
evas | Canvas in which table will be added. |
Referenced by evas_object_table_add_to().
Evas_Object* evas_object_table_add_to | ( | Evas_Object * | parent | ) |
Create a table that is child of a given element parent.
References EAPI, evas_obj_table_add_to, evas_object_evas_get(), evas_object_smart_member_add(), and evas_object_table_add().
void evas_object_table_homogeneous_set | ( | Evas_Object * | o, |
Evas_Object_Table_Homogeneous_Mode | homogeneous | ||
) |
Set how this table should layout children.
EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE
should balance weight.WIDTH
and COLUMNS
, each cell will get WIDTH / COLUMNS
pixels. If children have minimum size that is larger than this amount (including padding), then it will overflow and be aligned respecting the alignment hint, possible overlapping sibling cells. Weight hint is used as a boolean, if greater than zero it will make the child expand in that axis, taking as much space as possible (bounded to maximum size hint). Negative alignment will be considered as 0.5.References EAPI, evas_obj_table_homogeneous_set, and evas_object_smart_changed().
Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get | ( | const Evas_Object * | o | ) |
Get the current layout homogeneous mode.
void evas_object_table_mirrored_set | ( | Evas_Object * | o, |
Eina_Bool | mirrored | ||
) |
Sets the mirrored mode of the table.
In mirrored mode the table items go from right to left instead of left to right. That is, 1,1 is top right, not top left.
o | The table object. |
mirrored | the mirrored mode to set |
References evas_obj_smart_calculate, and evas_obj_table_mirrored_set.
Eina_Bool evas_object_table_mirrored_get | ( | const Evas_Object * | o | ) |
Gets the mirrored mode of the table.
o | The table object. |
EINA_TRUE
if it's a mirrored table, EINA_FALSE
otherwise. References EAPI, EINA_FALSE, and evas_obj_table_mirrored_get.
Eina_Bool evas_object_table_pack_get | ( | const Evas_Object * | o, |
Evas_Object * | child, | ||
unsigned short * | col, | ||
unsigned short * | row, | ||
unsigned short * | colspan, | ||
unsigned short * | rowspan | ||
) |
Get packing location of a child of table.
o | The given table object. |
child | The child object to add. |
col | pointer to store relative-horizontal position to place child. |
row | pointer to store relative-vertical position to place child. |
colspan | pointer to store how many relative-horizontal position to use for this child. |
rowspan | pointer to store how many relative-vertical position to use for this child. |
References EAPI, EINA_FALSE, EINA_TRUE, and evas_obj_table_pack_get.
Eina_Bool evas_object_table_pack | ( | Evas_Object * | o, |
Evas_Object * | child, | ||
unsigned short | col, | ||
unsigned short | row, | ||
unsigned short | colspan, | ||
unsigned short | rowspan | ||
) |
Add a new child to a table object or set its current packing.
o | The given table object. |
child | The child object to add. |
col | relative-horizontal position to place child. |
row | relative-vertical position to place child. |
colspan | how many relative-horizontal position to use for this child. |
rowspan | how many relative-vertical position to use for this child. |
Note that columns and rows only guarantee 16bit unsigned values at best. That means that col + colspan AND row + rowspan must fit inside 16bit unsigned values cleanly. You will be warned once values exceed 15bit storage, and attempting to use values not able to fit in 16bits will result in failure.
References EINA_FALSE, and evas_obj_table_pack.
Referenced by edje_object_update_hints_get().
Eina_Bool evas_object_table_unpack | ( | Evas_Object * | o, |
Evas_Object * | child | ||
) |
Remove child from table.
References EINA_FALSE, evas_obj_table_unpack, and evas_object_smart_parent_get().
Referenced by edje_object_update_hints_get().
void evas_object_table_clear | ( | Evas_Object * | o, |
Eina_Bool | clear | ||
) |
Faster way to remove all child objects from a table object.
o | The given table object. |
clear | if true, it will delete just removed children. |
References EAPI, EINA_LIST_FREE, evas_obj_table_clear, evas_object_del(), evas_object_smart_changed(), and evas_object_smart_member_del().
void evas_object_table_col_row_size_get | ( | const Evas_Object * | o, |
int * | cols, | ||
int * | rows | ||
) |
Get the number of columns and rows this table takes.
References EAPI, and evas_obj_table_col_row_size_get.
Eina_Iterator* evas_object_table_iterator_new | ( | const Evas_Object * | o | ) |
Get an iterator to walk the list of children for the table.
References EAPI, eina_list_iterator_new(), EINA_MAGIC_SET, evas_obj_table_iterator_new, FUNC_ITERATOR_FREE, FUNC_ITERATOR_GET_CONTAINER, and FUNC_ITERATOR_NEXT.
Eina_Accessor* evas_object_table_accessor_new | ( | const Evas_Object * | o | ) |
Get an accessor to get random access to the list of children for the table.
References EAPI, eina_list_accessor_new(), EINA_MAGIC_SET, evas_obj_table_accessor_new, FUNC_ACCESSOR_FREE, FUNC_ACCESSOR_GET_AT, and FUNC_ACCESSOR_GET_CONTAINER.
Eina_List* evas_object_table_children_get | ( | const Evas_Object * | o | ) |
Get the list of children for the table.
References eina_list_append(), EINA_LIST_FOREACH, and evas_obj_table_children_get.
Referenced by edje_object_update_hints_get().
Evas_Object* evas_object_table_child_get | ( | const Evas_Object * | o, |
unsigned short | col, | ||
unsigned short | row | ||
) |
Get the child of the table at the given coordinates.
References EAPI, and EINA_LIST_FOREACH.