Table

Functions

Evas_Object * elm_table_add (Evas_Object *parent)
 Add a new table to the parent.
void elm_table_homogeneous_set (Evas_Object *obj, Eina_Bool homogeneous)
 Set the homogeneous layout in the table.
Eina_Bool elm_table_homogeneous_get (const Evas_Object *obj)
 Get the current table homogeneous mode.
void elm_table_padding_set (Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical)
 Set padding between cells.
void elm_table_padding_get (const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical)
 Get padding between cells.
void elm_table_pack (Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h)
 Add a subobject on the table with the coordinates passed.
void elm_table_unpack (Evas_Object *obj, Evas_Object *subobj)
 Remove child from table.
void elm_table_clear (Evas_Object *obj, Eina_Bool clear)
 Faster way to remove all child objects from a table object.
void elm_table_pack_set (Evas_Object *subobj, int x, int y, int w, int h)
 Set the packing location of an existing child of the table.
void elm_table_pack_get (Evas_Object *subobj, int *x, int *y, int *w, int *h)
 Get the packing location of an existing child of the table.

Detailed Description

table_inheritance_tree.png

A container widget to arrange other widgets in a table where items can span multiple columns or rows - even overlap (and then be raised or lowered accordingly to adjust stacking if they do overlap).

The row and column count is not fixed. The table widget adjusts itself when subobjects are added to it dynamically.

The most common way to use a table is:

 table = elm_table_add(win);
 evas_object_show(table);
 elm_table_padding_set(table, space_between_columns, space_between_rows);
 elm_table_pack(table, table_content_object, x_coord, y_coord, colspan, rowspan);
 elm_table_pack(table, table_content_object, next_x_coord, next_y_coord, colspan, rowspan);
 elm_table_pack(table, table_content_object, other_x_coord, other_y_coord, colspan, rowspan);

The following are examples of how to use a table:


Function Documentation

Evas_Object* elm_table_add ( Evas_Object *  parent)

Add a new table to the parent.

Parameters:
parentThe parent object
Returns:
The new object or NULL if it cannot be created
void elm_table_clear ( Evas_Object *  obj,
Eina_Bool  clear 
)

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

Parameters:
objThe table object
clearIf true, will delete children, else just remove from table.

References ELM_WIDGET_DATA.

Eina_Bool elm_table_homogeneous_get ( const Evas_Object *  obj)

Get the current table homogeneous mode.

Parameters:
objThe table object
Returns:
A boolean to indicating if the layout is homogeneous in the table (EINA_TRUE = homogeneous, EINA_FALSE = no homogeneous)

References ELM_WIDGET_DATA.

void elm_table_homogeneous_set ( Evas_Object *  obj,
Eina_Bool  homogeneous 
)

Set the homogeneous layout in the table.

Parameters:
objThe layout object
homogeneousA boolean to set if the layout is homogeneous in the table (EINA_TRUE = homogeneous, EINA_FALSE = no homogeneous)

References ELM_WIDGET_DATA.

void elm_table_pack ( Evas_Object *  obj,
Evas_Object *  subobj,
int  x,
int  y,
int  w,
int  h 
)

Add a subobject on the table with the coordinates passed.

Parameters:
objThe table object
subobjThe subobject to be added to the table
xRow number
yColumn number
wcolspan
hrowspan
Note:
All positioning inside the table is relative to rows and columns, so a value of 0 for x and y, means the top left cell of the table, and a value of 1 for w and h means subobj only takes that 1 cell.

References ELM_WIDGET_DATA.

void elm_table_pack_get ( Evas_Object *  subobj,
int *  x,
int *  y,
int *  w,
int *  h 
)

Get the packing location of an existing child of the table.

Parameters:
subobjThe subobject to be modified in the table
xRow number
yColumn number
wrowspan
hcolspan
See also:
elm_table_pack_set()

References ELM_WIDGET_DATA.

void elm_table_pack_set ( Evas_Object *  subobj,
int  x,
int  y,
int  w,
int  h 
)

Set the packing location of an existing child of the table.

Parameters:
subobjThe subobject to be modified in the table
xRow number
yColumn number
wrowspan
hcolspan

Modifies the position of an object already in the table.

Note:
All positioning inside the table is relative to rows and columns, so a value of 0 for x and y, means the top left cell of the table, and a value of 1 for w and h means subobj only takes that 1 cell.

References ELM_WIDGET_DATA.

void elm_table_padding_get ( const Evas_Object *  obj,
Evas_Coord *  horizontal,
Evas_Coord *  vertical 
)

Get padding between cells.

Parameters:
objThe layout object.
horizontalset the horizontal padding.
verticalset the vertical padding.

References ELM_WIDGET_DATA.

void elm_table_padding_set ( Evas_Object *  obj,
Evas_Coord  horizontal,
Evas_Coord  vertical 
)

Set padding between cells.

Parameters:
objThe layout object.
horizontalset the horizontal padding.
verticalset the vertical padding.

Default value is 0.

References ELM_WIDGET_DATA.

void elm_table_unpack ( Evas_Object *  obj,
Evas_Object *  subobj 
)

Remove child from table.

Parameters:
objThe table object
subobjThe subobject

References ELM_WIDGET_DATA.