- Elementary
- Main
- Authors
- Examples
- Files
- Pages
- Types
- Modules

Macros | Functions
Table

## Macros
#define | elm_obj_table_homogeneous_set(homogeneous) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_HOMOGENEOUS_SET), EO_TYPECHECK(Eina_Bool, homogeneous)
| Set the homogeneous layout in the table. More...
#define | elm_obj_table_homogeneous_get(ret) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_HOMOGENEOUS_GET), EO_TYPECHECK(Eina_Bool *, ret)
| Get the current table homogeneous mode. More...
#define | elm_obj_table_padding_set(horizontal, vertical) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PADDING_SET), EO_TYPECHECK(Evas_Coord, horizontal), EO_TYPECHECK(Evas_Coord, vertical)
| Set padding between cells. More...
#define | elm_obj_table_padding_get(horizontal, vertical) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PADDING_GET), EO_TYPECHECK(Evas_Coord *, horizontal), EO_TYPECHECK(Evas_Coord *, vertical)
| Get padding between cells. More...
#define | elm_obj_table_pack(subobj, column, row, colspan, rowspan) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PACK), EO_TYPECHECK(Evas_Object *, subobj), EO_TYPECHECK(int, column), EO_TYPECHECK(int, row), EO_TYPECHECK(int, colspan), EO_TYPECHECK(int, rowspan)
| Add a subobject on the table with the coordinates passed. More...
#define | elm_obj_table_unpack(subobj) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_UNPACK), EO_TYPECHECK(Evas_Object *, subobj)
| Remove child from table. More...
#define | elm_obj_table_pack_set(subobj, column, row, colspan, rowspan) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PACK_SET), EO_TYPECHECK(Evas_Object *, subobj), EO_TYPECHECK(int, column), EO_TYPECHECK(int, row), EO_TYPECHECK(int, colspan), EO_TYPECHECK(int, rowspan)
| Set the packing location of an existing child of the table. More...
#define | elm_obj_table_pack_get(subobj, column, row, colspan, rowspan) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PACK_GET), EO_TYPECHECK(Evas_Object *, subobj), EO_TYPECHECK(int *, column), EO_TYPECHECK(int *, row), EO_TYPECHECK(int *, colspan), EO_TYPECHECK(int *, rowspan)
| Get the packing location of an existing child of the table. More...
#define | elm_obj_table_clear(clear) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_CLEAR), EO_TYPECHECK(Eina_Bool, clear)
| Faster way to remove all child objects from a table object. More...
#define | elm_obj_table_child_get(col, row, ret) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_CHILD_GET), EO_TYPECHECK(int, col), EO_TYPECHECK(int, row), EO_TYPECHECK(Evas_Object **, ret)
| Get child object of table at given coordinates. More...

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

## Detailed Description

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, column, row, colspan, rowspan);
elm_table_pack(table, table_content_object, next_column, next_row, colspan, rowspan);
elm_table_pack(table, table_content_object, other_column, other_row, colspan, rowspan);

The following are examples of how to use a table:

- tutorial_table_01
- tutorial_table_02

## Macro Definition Documentation

#define elm_obj_table_child_get | ( |  | col,
|  |  | row,
|  |  | ret
| ) |  | ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_CHILD_GET), EO_TYPECHECK(int, col), EO_TYPECHECK(int, row), EO_TYPECHECK(Evas_Object **, ret)

Get child object of table at given coordinates.

Since
  1.8

Parameters

  [in] | col | column number of child object
  [in] | row | row number of child object
  [out] | ret | object at given col and row

#define elm_obj_table_clear | ( |  | clear | ) | ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_CLEAR), EO_TYPECHECK(Eina_Bool, clear)

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

Since
  1.8

Parameters

  [in] | clear |

See Also
  elm_table_clear

Referenced by elm_table_clear().

#define elm_obj_table_homogeneous_get | ( |  | ret | ) | ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_HOMOGENEOUS_GET), EO_TYPECHECK(Eina_Bool *, ret)

Get the current table homogeneous mode.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_table_homogeneous_get

Referenced by elm_table_homogeneous_get().

#define elm_obj_table_homogeneous_set | ( |  | homogeneous | ) | ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_HOMOGENEOUS_SET), EO_TYPECHECK(Eina_Bool, homogeneous)

Set the homogeneous layout in the table.

Since
  1.8

Parameters

  [in] | homogeneous |

See Also
  elm_table_homogeneous_set

Referenced by elm_table_homogeneous_set().

#define elm_obj_table_pack | ( |  | subobj,
|  |  | column,
|  |  | row,
|  |  | colspan,
|  |  | rowspan
| ) |  | ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PACK), EO_TYPECHECK(Evas_Object *, subobj), EO_TYPECHECK(int, column), EO_TYPECHECK(int, row), EO_TYPECHECK(int, colspan), EO_TYPECHECK(int, rowspan)

Add a subobject on the table with the coordinates passed.

Since
  1.8

Parameters

  [in] | subobj |
  [in] | column |
  [in] | row |
  [in] | colspan |
  [in] | rowspan |

See Also
  elm_table_pack

Referenced by elm_table_pack().

#define elm_obj_table_pack_get | ( |  | subobj,
|  |  | column,
|  |  | row,
|  |  | colspan,
|  |  | rowspan
| ) |  | ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PACK_GET), EO_TYPECHECK(Evas_Object *, subobj), EO_TYPECHECK(int *, column), EO_TYPECHECK(int *, row), EO_TYPECHECK(int *, colspan), EO_TYPECHECK(int *, rowspan)

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

Since
  1.8

Parameters

  [in] | subobj |
  [out] | column |
  [out] | row |
  [out] | colspan |
  [out] | rowspan |

See Also
  elm_table_pack_get

Referenced by elm_table_pack_get().

#define elm_obj_table_pack_set | ( |  | subobj,
|  |  | column,
|  |  | row,
|  |  | colspan,
|  |  | rowspan
| ) |  | ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PACK_SET), EO_TYPECHECK(Evas_Object *, subobj), EO_TYPECHECK(int, column), EO_TYPECHECK(int, row), EO_TYPECHECK(int, colspan), EO_TYPECHECK(int, rowspan)

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

Since
  1.8

Parameters

  [in] | subobj |
  [in] | column |
  [in] | row |
  [in] | colspan |
  [in] | rowspan |

See Also
  elm_table_pack_set

Referenced by elm_table_pack_set().

#define elm_obj_table_padding_get | ( |  | horizontal,
|  |  | vertical
| ) |  | ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PADDING_GET), EO_TYPECHECK(Evas_Coord *, horizontal), EO_TYPECHECK(Evas_Coord *, vertical)

Get padding between cells.

Since
  1.8

Parameters

  [out] | horizontal |
  [out] | vertical |

See Also
  elm_table_padding_get

Referenced by elm_table_padding_get().

#define elm_obj_table_padding_set | ( |  | horizontal,
|  |  | vertical
| ) |  | ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PADDING_SET), EO_TYPECHECK(Evas_Coord, horizontal), EO_TYPECHECK(Evas_Coord, vertical)

Set padding between cells.

Since
  1.8

Parameters

  [in] | horizontal |
  [in] | vertical |

See Also
  elm_table_padding_set

Referenced by elm_table_padding_set().

#define elm_obj_table_unpack | ( |  | subobj | ) | ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_UNPACK), EO_TYPECHECK(Evas_Object *, subobj)

Remove child from table.

Since
  1.8

Parameters

  [in] | subobj |

See Also
  elm_table_unpack

Referenced by elm_table_unpack().

## Function Documentation

Evas_Object* elm_table_add | ( | Evas_Object * | parent | ) |

Add a new table to the parent.

Parameters

  parent | The 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

  obj | The table object
  clear | If true, will delete children, else just remove from table.

References elm_obj_table_clear.

Eina_Bool elm_table_homogeneous_get | ( | const Evas_Object * | obj | ) |

Get the current table homogeneous mode.

Parameters

  obj | The table object

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

References elm_obj_table_homogeneous_get.

void elm_table_homogeneous_set | ( | Evas_Object * | obj,
|  | Eina_Bool | homogeneous
| ) |  |

Set the homogeneous layout in the table.

Parameters

  obj | The layout object
  homogeneous | A boolean to set if the layout is homogeneous in the table (EINA_TRUE = homogeneous, EINA_FALSE = no homogeneous)

References elm_obj_table_homogeneous_set.

void elm_table_pack | ( | Evas_Object * | obj,
|  | Evas_Object * | subobj,
|  | int | col,
|  | int | row,
|  | int | colspan,
|  | int | rowspan
| ) |  |

Add a subobject on the table with the coordinates passed.

Parameters

  obj | The table object
  subobj | The subobject to be added to the table
  col | Column number
  row | Row number
  colspan | colspan
  rowspan | rowspan

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.

Note that columns and rows only guarantee 16bit unsigned values at best. That means that col + colspan AND row + rowspan must fit inside 16bit unsigned values cleanly. You will be warned once values exceed 15bit storage, and attempting to use values not able to fit in 16bits will result in failure.

References elm_obj_table_pack.

void elm_table_pack_get | ( | Evas_Object * | subobj,
|  | int * | col,
|  | int * | row,
|  | int * | colspan,
|  | int * | rowspan
| ) |  |

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

Parameters

  subobj | The subobject to be modified in the table
  col | Column number
  row | Row number
  colspan | colspan
  rowspan | rowspan

See Also
  elm_table_pack_set()

References elm_obj_table_pack_get.

void elm_table_pack_set | ( | Evas_Object * | subobj,
|  | int | col,
|  | int | row,
|  | int | colspan,
|  | int | rowspan
| ) |  |

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

Parameters

  subobj | The subobject to be modified in the table
  col | Column number
  row | Row number
  colspan | colspan
  rowspan | rowspan

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 col and row, means the top left cell of the table, and a value of 1 for colspan and rowspan means `subobj` only takes that 1 cell.

References elm_obj_table_pack_set.

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

Get padding between cells.

Parameters

  obj | The layout object.
  horizontal | set the horizontal padding.
  vertical | set the vertical padding.

References elm_obj_table_padding_get.

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

Set padding between cells.

Parameters

  obj | The layout object.
  horizontal | set the horizontal padding.
  vertical | set the vertical padding.

Default value is 0.

References elm_obj_table_padding_set.

void elm_table_unpack | ( | Evas_Object * | obj,
|  | Evas_Object * | subobj
| ) |  |

Remove child from table.

Parameters

  obj | The table object
  subobj | The subobject

References elm_obj_table_unpack.

Copyright ©2000-2014 Enlightenment.org - Samsung Electronics supports the EFL Documentation Project - Generated Wed Jan 8 2014 20:51:14