Evas_Object_Table

Langue: en

Version: 373293 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

Table Smart Object. -

Convenience smart object that packs children using a tabular layout using children size hints to define their size and alignment inside their cell space.

Typedefs


typedef enum _Evas_Object_Table_Homogeneous_Mode Evas_Object_Table_Homogeneous_Mode
How to pack items into cells in a table.

Enumerations


enum _Evas_Object_Table_Homogeneous_Mode
How to pack items into cells in a table.

Functions


EAPI Evas_Object * evas_object_table_add (Evas *evas)
Create a new table.
EAPI Evas_Object * evas_object_table_add_to (Evas_Object *parent)
Create a table that is child of a given element parent.
EAPI void evas_object_table_homogeneous_set (Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous)
Set how this table should layout children.
EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get (const Evas_Object *o)
Get the current layout homogeneous mode.
EAPI void evas_object_table_align_set (Evas_Object *o, double horizontal, double vertical)
Set the alignment of the whole bounding box of contents.
EAPI void evas_object_table_align_get (const Evas_Object *o, double *horizontal, double *vertical)
Get alignment of the whole bounding box of contents.
EAPI void evas_object_table_padding_set (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical)
Set padding between cells.
EAPI void evas_object_table_padding_get (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical)
Get padding between cells.
EAPI 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.
EAPI Eina_Bool evas_object_table_unpack (Evas_Object *o, Evas_Object *child)
Remove child from table.
EAPI void evas_object_table_clear (Evas_Object *o, Eina_Bool clear)
Faster way to remove all child objects from a table object.
EAPI 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.
EAPI Eina_Iterator * evas_object_table_iterator_new (const Evas_Object *o)
Get an iterator to walk the list of children for the table.
EAPI 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.
EAPI Eina_List * evas_object_table_children_get (const Evas_Object *o)
Get the list of children for the table.
Evas_Object * evas_object_table_child_get (const Evas_Object *o, unsigned short col, unsigned short row)
Get a child from the table using its coordinates.

Detailed Description

Convenience smart object that packs children using a tabular layout using children size hints to define their size and alignment inside their cell space.

See also:

Size Hints

Typedef Documentation

typedef enum _Evas_Object_Table_Homogeneous_Mode Evas_Object_Table_Homogeneous_Mode

How to pack items into cells in a table. Table cell pack mode.

Function Documentation

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

Do not remove or delete objects while walking the list.

EAPI Evas_Object* evas_object_table_add (Evas * evas)

Create a new table. It's set to non-homogeneous by default, add children with evas_object_table_pack().

References evas_object_smart_add().

Referenced by evas_object_table_add_to().

EAPI Evas_Object* evas_object_table_add_to (Evas_Object * parent)

Create a table that is child of a given element parent. See also:

evas_object_table_add()

References evas_object_evas_get(), evas_object_smart_member_add(), and evas_object_table_add().

Evas_Object* evas_object_table_child_get (const Evas_Object * o, unsigned short col, unsigned short row)

Get a child from the table using its coordinates. Note:

This does not take into account col/row spanning

EAPI Eina_List* evas_object_table_children_get (const Evas_Object * o)

Get the list of children for the table. Note:

This is a duplicate of the list kept by the table internally. It's up to the user to destroy it when it no longer needs it. It's possible to remove objects from the table when walking this list, but these removals won't be reflected on it.

EAPI void evas_object_table_clear (Evas_Object * o, Eina_Bool clear)

Faster way to remove all child objects from a table object. Parameters:

o The given table object.
clear if true, it will delete just removed children.

References evas_object_del(), evas_object_smart_changed(), and evas_object_smart_member_del().

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

columns and rows are virtual entities, one can specify a table with a single object that takes 4 columns and 5 rows. The only difference for a single cell table is that paddings will be accounted proportionally.

EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get (const Evas_Object * o)

Get the current layout homogeneous mode. See also:

evas_object_table_homogeneous_set()

EAPI void evas_object_table_homogeneous_set (Evas_Object * o, Evas_Object_Table_Homogeneous_Mode homogeneous)

Set how this table should layout children. Todo

consider aspect hint and respect it.

EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE.RS 4 If table does not use homogeneous mode then columns and rows will be calculated based on hints of individual cells. This operation mode is more flexible, but more complex and heavy to calculate as well. Weight properties are handled as a boolean expand. Negative alignment will be considered as 0.5.

Todo

EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE should balance weight.

EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE.RS 4 When homogeneous is relative to table the own table size is divided equally among children, filling the whole table area. That is, if table has 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.

EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM.RS 4 When homogeneous is relative to item it means the greatest minimum cell size will be used. That is, if no element is set to expand, the table will have its contents to a minimum size, the bounding box of all these children will be aligned relatively to the table object using evas_object_table_align_get(). If the table area is too small to hold this minimum bounding box, then the objects will keep their size and the bounding box will overflow the box area, still respecting the alignment. Weight hint is used as a boolean, if greater than zero it will make that cell expand in that axis, toggling the expand mode, which makes the table behave much like EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE, except that the bounding box will overflow and items will not overlap siblings. If no minimum size is provided at all then the table will fallback to expand mode as well.

References evas_object_smart_changed().

EAPI Eina_Iterator* evas_object_table_iterator_new (const Evas_Object * o)

Get an iterator to walk the list of children for the table. Note:

Do not remove or delete objects while walking the list.

EAPI 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. Parameters:

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.

Returns:

1 on success, 0 on failure.

References evas_object_smart_changed(), and evas_object_smart_member_add().

EAPI Eina_Bool evas_object_table_unpack (Evas_Object * o, Evas_Object * child)

Remove child from table. Note:

removing a child will immediately call a walk over children in order to recalculate numbers of columns and rows. If you plan to remove all children, use evas_object_table_clear() instead.

Returns:

1 on success, 0 on failure.

References evas_object_smart_changed(), evas_object_smart_member_del(), and evas_object_smart_parent_get().

Author

Generated automatically by Doxygen for Evas from the source code.