2 * @defgroup Table Table
5 * A container widget to arrange other widgets in a table where items can
6 * span multiple columns or rows - even overlap (and then be raised or
7 * lowered accordingly to adjust stacking if they do overlap).
9 * The row and column count is not fixed. The table widget adjusts itself when
10 * subobjects are added to it dynamically.
12 * The most common way to use a table is:
14 * table = elm_table_add(win);
15 * evas_object_show(table);
16 * elm_table_padding_set(table, space_between_columns, space_between_rows);
17 * elm_table_pack(table, table_content_object, x_coord, y_coord, colspan, rowspan);
18 * elm_table_pack(table, table_content_object, next_x_coord, next_y_coord, colspan, rowspan);
19 * elm_table_pack(table, table_content_object, other_x_coord, other_y_coord, colspan, rowspan);
22 * The following are examples of how to use a table:
23 * @li @ref tutorial_table_01
24 * @li @ref tutorial_table_02
30 * @brief Add a new table to the parent
32 * @param parent The parent object
33 * @return The new object or NULL if it cannot be created
37 EAPI Evas_Object *elm_table_add(Evas_Object *parent);
40 * @brief Set the homogeneous layout in the table
42 * @param obj The layout object
43 * @param homogeneous A boolean to set if the layout is homogeneous in the
44 * table (EINA_TRUE = homogeneous, EINA_FALSE = no homogeneous)
48 EAPI void elm_table_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
51 * @brief Get the current table homogeneous mode.
53 * @param obj The table object
54 * @return A boolean to indicating if the layout is homogeneous in the table
55 * (EINA_TRUE = homogeneous, EINA_FALSE = no homogeneous)
59 EAPI Eina_Bool elm_table_homogeneous_get(const Evas_Object *obj);
62 * @brief Set padding between cells.
64 * @param obj The layout object.
65 * @param horizontal set the horizontal padding.
66 * @param vertical set the vertical padding.
72 EAPI void elm_table_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical);
75 * @brief Get padding between cells.
77 * @param obj The layout object.
78 * @param horizontal set the horizontal padding.
79 * @param vertical set the vertical padding.
83 EAPI void elm_table_padding_get(const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical);
86 * @brief Add a subobject on the table with the coordinates passed
88 * @param obj The table object
89 * @param subobj The subobject to be added to the table
91 * @param y Column number
95 * @note All positioning inside the table is relative to rows and columns, so
96 * a value of 0 for x and y, means the top left cell of the table, and a
97 * value of 1 for w and h means @p subobj only takes that 1 cell.
101 EAPI void elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h);
104 * @brief Remove child from table.
106 * @param obj The table object
107 * @param subobj The subobject
111 EAPI void elm_table_unpack(Evas_Object *obj, Evas_Object *subobj);
114 * @brief Faster way to remove all child objects from a table object.
116 * @param obj The table object
117 * @param clear If true, will delete children, else just remove from table.
121 EAPI void elm_table_clear(Evas_Object *obj, Eina_Bool clear);
124 * @brief Set 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 * Modifies the position of an object already in the table.
134 * @note All positioning inside the table is relative to rows and columns, so
135 * a value of 0 for x and y, means the top left cell of the table, and a
136 * value of 1 for w and h means @p subobj only takes that 1 cell.
140 EAPI void elm_table_pack_set(Evas_Object *subobj, int x, int y, int w, int h);
143 * @brief Get the packing location of an existing child of the table
145 * @param subobj The subobject to be modified in the table
146 * @param x Row number
147 * @param y Column number
151 * @see elm_table_pack_set()
155 EAPI void elm_table_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h);