efl.evas.Table
Class¶efl.evas.
Table
(Canvas canvas, **kwargs)¶Bases: efl.evas.Object
canvas (Canvas
) – Evas canvas for this object
**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
add_to
(cls, parent)¶Create a table that is child of a given parent.
parent (Object
) –
align
¶Set the alignment of the whole bounding box of contents.
(double horizontal, double vertical)
align_get
¶align_set
¶child_get
¶Get the child of the table at the given coordinates
col (int) –
row (int) –
Note
This does not take into account col/row spanning
children_get
¶Get the list of children for the table.
list of Objects
clear
¶Faster way to remove all child objects from a table object.
clear – if True, it will delete just removed children.
col_row_size
¶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 padding will be accounted proportionally.
col_row_size_get
¶homogeneous
¶Set how this table should layout children.
consider aspect hint and respect it.
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. This is the default.
EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE should balance weight.
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.
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.
Evas_Object_Table_Homogeneous_Mode
homogeneous_get
¶homogeneous_set
¶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.
bool
mirrored_get
¶mirrored_set
¶pack
¶Add a new child to a table object or set its current packing.
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.
RuntimeError – when the child cannot be packed to the table.
pack_get
¶Get packing location of a child of table
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.
RuntimeError – when the packing location cannot be fetched.
padding
¶Padding between cells.
(int horizontal, int vertical)
padding_get
¶padding_set
¶unpack
¶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.
RuntimeError – when the child cannot be removed from the table.