Tizen Native API

This group provides functions for table smart objects.

Remarks:
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

Functions

Evas_Objectevas_object_table_add (Evas *evas)
 Creates a new table.
Evas_Objectevas_object_table_add_to (Evas_Object *parent)
 Creates a table that is child of a given element parent.
void evas_object_table_homogeneous_set (Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous)
 Sets how this table should layout children.
Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get (const Evas_Object *o)
 Gets the current layout homogeneous mode.
void evas_object_table_padding_set (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical)
 Sets padding between cells.
void evas_object_table_padding_get (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical)
 Gets padding between cells.
void evas_object_table_align_set (Evas_Object *o, double horizontal, double vertical)
 Sets the alignment of the whole bounding box of contents.
void evas_object_table_align_get (const Evas_Object *o, double *horizontal, double *vertical)
 Gets the 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.
Eina_Bool evas_object_table_mirrored_get (const Evas_Object *o)
 Gets the mirrored mode of the table.
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)
 Gets packing location of a child of table.
Eina_Bool evas_object_table_pack (Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
 Adds a new child to a table object or set its current packing.
Eina_Bool evas_object_table_unpack (Evas_Object *o, Evas_Object *child)
 Removes child from table.
void evas_object_table_clear (Evas_Object *o, Eina_Bool clear)
 Removes all child objects from a table object.
void evas_object_table_col_row_size_get (const Evas_Object *o, int *cols, int *rows)
 Gets the number of columns and rows this table takes.
Eina_Iteratorevas_object_table_iterator_new (const Evas_Object *o)
 Gets an iterator to walk through the list of children for the table.
Eina_Accessorevas_object_table_accessor_new (const Evas_Object *o)
 Gets an accessor to get random access to the list of children for the table.
Eina_Listevas_object_table_children_get (const Evas_Object *o)
 Gets the list of children for the table.
Evas_Objectevas_object_table_child_get (const Evas_Object *o, unsigned short col, unsigned short row)
 Gets the child of the table at the given coordinates.

Typedefs

typedef enum
_Evas_Object_Table_Homogeneous_Mode 
Evas_Object_Table_Homogeneous_Mode
 Enumeration for modes of packing items into cells in a table.

Typedef Documentation

Enumeration for modes of packing items into cells in a table.

See also:
evas_object_table_homogeneous_set() for an explanation of the function of each one. Table cell pack mode

Enumeration Type Documentation

Enumeration for modes of packing items into cells in a table.

See also:
evas_object_table_homogeneous_set() for an explanation of the function of each one.

Function Documentation

Gets an accessor to get random access to the list of children for the table.

Since :
2.3.1
Remarks:
Do not remove or delete objects while walking the list.
Parameters:
[in]oThe table object
Returns:
An accessor on o's child objects,
otherwise NULL in case of errors

Creates a new table.

Since :
2.3.1
Parameters:
[in]evasThe canvas in which table are added
Returns:
The new table object

Creates a table that is child of a given element parent.

Since :
2.3.1
Parameters:
[in]parentThe parent element
Returns:
The new table object
See also:
evas_object_table_add()
void evas_object_table_align_get ( const Evas_Object o,
double *  horizontal,
double *  vertical 
)

Gets the alignment of the whole bounding box of contents.

Since :
2.3.1
Parameters:
[in]oThe table object
[out]horizontalThe horizontal alignment that is obtained
[out]verticalThe vertical alignment that is obtained
void evas_object_table_align_set ( Evas_Object o,
double  horizontal,
double  vertical 
)

Sets the alignment of the whole bounding box of contents.

Since :
2.3.1
Parameters:
[in]oThe table object
[in]horizontalThe horizontal alignment to set
[in]verticalThe vertical alignment to set
Evas_Object* evas_object_table_child_get ( const Evas_Object o,
unsigned short  col,
unsigned short  row 
)

Gets the child of the table at the given coordinates.

Since :
2.3.1
Remarks:
This does not take into account col or row spanning.
Parameters:
[in]oThe table object
[in]colThe number of columns
[in]rowThe number of rows
Returns:
A child of the table object

Gets the list of children for the table.

Since :
2.3.1
Remarks:
This is a duplicate of the list kept by the table internally. It is up to the user to destroy it when it no longer needs it. It is possible to remove objects from the table when walking this list, but these removals are not reflected on it.
Parameters:
[in]oThe table object
Returns:
The list of the children,
otherwise NULL in case of errors
void evas_object_table_clear ( Evas_Object o,
Eina_Bool  clear 
)

Removes all child objects from a table object.

Since :
2.3.1
Remarks:
This is a faster way to remove the child objects.
Parameters:
[in]oThe given table object
[in]clearSet EINA_TRUE to delete the just removed children,
otherwise set EINA_FALSE to not delete the removed children
void evas_object_table_col_row_size_get ( const Evas_Object o,
int *  cols,
int *  rows 
)

Gets the number of columns and rows this table takes.

Since :
2.3.1
Remarks:
The 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 are accounted proportionally.
Parameters:
[in]oThe table object
[out]colsThe number of columns
[out]rowsThe number of rows

Gets the current layout homogeneous mode.

Since :
2.3.1
Parameters:
[in]oThe table object
Returns:
The homogeneous mode
See also:
evas_object_table_homogeneous_set()

Sets how this table should layout children.

EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE
If table does not use homogeneous mode then columns and rows are 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 is considered as 0.5. This is the default.
EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE
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 gets WIDTH / COLUMNS pixels. If children have minimum size that is larger than this amount (including padding), then it overflows and is aligned respecting the alignment hint, possible overlapping sibling cells. Weight hint is used as a boolean, if greater than zero it makes the child expand in that axis, taking as much space as possible (bounded to maximum size hint). Negative alignment is considered as 0.5.
EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM
When homogeneous is relative to item, it means the greatest minimum cell size is used. That is, if no element is set to expand, the table has its contents to a minimum size, the bounding box of all these children is 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 keep their size and the bounding box overflows the box area, still respecting the alignment. Weight hint is used as a boolean, if greater than zero it makes 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 overflows and items do not overlap siblings. If no minimum size is provided at all then the table fallsback to expand mode as well.
Since :
2.3.1
Parameters:
[in]oThe table object
[in]homogeneousThe homogeneous mode

Gets an iterator to walk through the list of children for the table.

Since :
2.3.1
Remarks:
Do not remove or delete objects while walking the list.
Parameters:
[in]oThe table object
Returns:
An iterator to walk through the children of the object,
otherwise NULL in case of errors

Gets the mirrored mode of the table.

Since (EFL) :
1.1
Since :
2.3.1
Parameters:
[in]oThe table object
Returns:
EINA_TRUE if it is a mirrored table,
otherwise EINA_FALSE if it is not a mirrored table
See also:
evas_object_table_mirrored_set()

Sets the mirrored mode of the table.

Since (EFL) :
1.1
Since :
2.3.1

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

Parameters:
[in]oThe table object
[in]mirroredThe mirrored mode to set
Eina_Bool evas_object_table_pack ( Evas_Object o,
Evas_Object child,
unsigned short  col,
unsigned short  row,
unsigned short  colspan,
unsigned short  rowspan 
)

Adds a new child to a table object or set its current packing.

Since :
2.3.1
Parameters:
[in]oThe given table object
[in]childThe child object to add
[in]colThe relative-horizontal position to place the child
[in]rowThe relative-vertical position to place the child
[in]colspanThe number of relative-horizontal position to use for this child
[in]rowspanThe number of relative-vertical position to use for this child
Returns:
EINA_TRUE if the new child is added successfully,
otherwise EINA_FALSE on failure
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 
)

Gets packing location of a child of table.

Since (EFL) :
1.1
Since :
2.3.1
Parameters:
[in]oThe given table object
[in]childThe child object to add
[out]colThe pointer to store relative-horizontal position to place child
[out]rowThe pointer to store relative-vertical position to place child
[out]colspanThe pointer to store how many relative-horizontal position to use for this child
[out]rowspanThe pointer to store how many relative-vertical position to use for this child
Returns:
EINA_TRUE if the packing location is obtained successfully,
otherwise EINA_FALSE on failure
void evas_object_table_padding_get ( const Evas_Object o,
Evas_Coord horizontal,
Evas_Coord vertical 
)

Gets padding between cells.

Since :
2.3.1
Parameters:
[in]oThe table object
[out]horizontalThe horizontal padding that is obtained
[out]verticalThe vertical padding that is obtained
void evas_object_table_padding_set ( Evas_Object o,
Evas_Coord  horizontal,
Evas_Coord  vertical 
)

Sets padding between cells.

Since :
2.3.1
Parameters:
[in]oThe table object
[in]horizontalThe horizontal padding to set
[in]verticalThe vertical padding to set

Removes child from table.

Since :
2.3.1
Remarks:
Removing a child immediately calls a walk over children in order to recalculate the numbers of columns and rows. If you plan to remove all children, use evas_object_table_clear() instead.
Parameters:
[in]oThe given table object
[in]childThe child object to remove
Returns:
EINA_TRUE if the child is removed successfully,
otherwise EINA_FALSE on failure