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_Object * | evas_object_table_add (Evas *evas) |
Creates a new table. | |
Evas_Object * | evas_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_Iterator * | evas_object_table_iterator_new (const Evas_Object *o) |
Gets an iterator to walk through the list of children for the table. | |
Eina_Accessor * | evas_object_table_accessor_new (const Evas_Object *o) |
Gets an accessor to get random access to the list of children for the table. | |
Eina_List * | evas_object_table_children_get (const Evas_Object *o) |
Gets the list of children for the table. | |
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. | |
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
Eina_Accessor* evas_object_table_accessor_new | ( | const Evas_Object * | o | ) |
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] o The table object
- Returns:
- An accessor on o's child objects,
otherwiseNULL
in case of errors
Evas_Object* evas_object_table_add | ( | Evas * | evas | ) |
Creates a new table.
- Since :
- 2.3.1
- Parameters:
-
[in] evas The canvas in which table are added
- Returns:
- The new table object
Evas_Object* evas_object_table_add_to | ( | Evas_Object * | parent | ) |
Creates a table that is child of a given element parent.
- Since :
- 2.3.1
- Parameters:
-
[in] parent The 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] o The table object [out] horizontal The horizontal alignment that is obtained [out] vertical The 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] o The table object [in] horizontal The horizontal alignment to set [in] vertical The 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] o The table object [in] col The number of columns [in] row The number of rows
- Returns:
- A child of the table object
Eina_List* evas_object_table_children_get | ( | const Evas_Object * | o | ) |
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] o The table object
- Returns:
- The list of the children,
otherwiseNULL
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] o The given table object [in] clear Set 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] o The table object [out] cols The number of columns [out] rows The number of rows
Gets the current layout homogeneous mode.
- Since :
- 2.3.1
- Parameters:
-
[in] o The table object
- Returns:
- The homogeneous mode
- See also:
- evas_object_table_homogeneous_set()
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_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
andCOLUMNS
, each cell getsWIDTH / 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 as0.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] o The table object [in] homogeneous The homogeneous mode
Eina_Iterator* evas_object_table_iterator_new | ( | const Evas_Object * | o | ) |
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] o The table object
- Returns:
- An iterator to walk through the children of the object,
otherwiseNULL
in case of errors
Eina_Bool evas_object_table_mirrored_get | ( | const Evas_Object * | o | ) |
Gets the mirrored mode of the table.
- Since (EFL) :
- 1.1
- Since :
- 2.3.1
- Parameters:
-
[in] o The 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()
void evas_object_table_mirrored_set | ( | Evas_Object * | o, |
Eina_Bool | mirrored | ||
) |
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] o The table object [in] mirrored The 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] o The given table object [in] child The child object to add [in] col The relative-horizontal position to place the child [in] row The relative-vertical position to place the child [in] colspan The number of relative-horizontal position to use for this child [in] rowspan The 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] o The given table object [in] child The child object to add [out] col The pointer to store relative-horizontal position to place child [out] row The pointer to store relative-vertical position to place child [out] colspan The pointer to store how many relative-horizontal position to use for this child [out] rowspan The 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] o The table object [out] horizontal The horizontal padding that is obtained [out] vertical The 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] o The table object [in] horizontal The horizontal padding to set [in] vertical The vertical padding to set
Eina_Bool evas_object_table_unpack | ( | Evas_Object * | o, |
Evas_Object * | child | ||
) |
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] o The given table object [in] child The child object to remove
- Returns:
- EINA_TRUE if the child is removed successfully,
otherwise EINA_FALSE on failure