2 * @defgroup Table Table
4 * A container widget to arrange other widgets in a table where items can
5 * span multiple columns or rows - even overlap (and then be raised or
6 * lowered accordingly to adjust stacking if they do overlap).
8 * The row and column count is not fixed. The table widget adjusts itself when
9 * subobjects are added to it dynamically.
11 * The most common way to use a table is:
13 * table = elm_table_add(win);
14 * evas_object_show(table);
15 * elm_table_padding_set(table, space_between_columns, space_between_rows);
16 * elm_table_pack(table, table_content_object, x_coord, y_coord, colspan, rowspan);
17 * elm_table_pack(table, table_content_object, next_x_coord, next_y_coord, colspan, rowspan);
18 * elm_table_pack(table, table_content_object, other_x_coord, other_y_coord, colspan, rowspan);
21 * The following are examples of how to use a table:
22 * @li @ref tutorial_table_01
23 * @li @ref tutorial_table_02
29 * @brief Add a new table to the parent
31 * @param parent The parent object
32 * @return The new object or NULL if it cannot be created
34 EAPI Evas_Object *elm_table_add(Evas_Object *parent);
37 * @brief Set the homogeneous layout in the table
39 * @param obj The layout object
40 * @param homogeneous A boolean to set if the layout is homogeneous in the
41 * table (EINA_TRUE = homogeneous, EINA_FALSE = no homogeneous)
43 EAPI void elm_table_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
46 * @brief Get the current table homogeneous mode.
48 * @param obj The table object
49 * @return A boolean to indicating if the layout is homogeneous in the table
50 * (EINA_TRUE = homogeneous, EINA_FALSE = no homogeneous)
52 EAPI Eina_Bool elm_table_homogeneous_get(const Evas_Object *obj);
55 * @brief Set padding between cells.
57 * @param obj The layout object.
58 * @param horizontal set the horizontal padding.
59 * @param vertical set the vertical padding.
63 EAPI void elm_table_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical);
66 * @brief Get padding between cells.
68 * @param obj The layout object.
69 * @param horizontal set the horizontal padding.
70 * @param vertical set the vertical padding.
72 EAPI void elm_table_padding_get(const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical);
75 * @brief Add a subobject on the table with the coordinates passed
77 * @param obj The table object
78 * @param subobj The subobject to be added to the table
80 * @param y Column number
84 * @note All positioning inside the table is relative to rows and columns, so
85 * a value of 0 for x and y, means the top left cell of the table, and a
86 * value of 1 for w and h means @p subobj only takes that 1 cell.
88 EAPI void elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h);
91 * @brief Remove child from table.
93 * @param obj The table object
94 * @param subobj The subobject
96 EAPI void elm_table_unpack(Evas_Object *obj, Evas_Object *subobj);
99 * @brief Faster way to remove all child objects from a table object.
101 * @param obj The table object
102 * @param clear If true, will delete children, else just remove from table.
104 EAPI void elm_table_clear(Evas_Object *obj, Eina_Bool clear);
107 * @brief Set the packing location of an existing child of the table
109 * @param subobj The subobject to be modified in the table
110 * @param x Row number
111 * @param y Column number
115 * Modifies the position of an object already in the table.
117 * @note All positioning inside the table is relative to rows and columns, so
118 * a value of 0 for x and y, means the top left cell of the table, and a
119 * value of 1 for w and h means @p subobj only takes that 1 cell.
121 EAPI void elm_table_pack_set(Evas_Object *subobj, int x, int y, int w, int h);
124 * @brief Get the packing location of an existing child of the table
126 * @param subobj The subobject to be modified in the table
127 * @param x Row number
128 * @param y Column number
132 * @see elm_table_pack_set()
134 EAPI void elm_table_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h);