2 * @defgroup Table Table
5 * @image html table_inheritance_tree.png
6 * @image latex table_inheritance_tree.eps
8 * A container widget to arrange other widgets in a table where items can
9 * span multiple columns or rows - even overlap (and then be raised or
10 * lowered accordingly to adjust stacking if they do overlap).
12 * The row and column count is not fixed. The table widget adjusts itself when
13 * subobjects are added to it dynamically.
15 * The most common way to use a table is:
17 * table = elm_table_add(win);
18 * evas_object_show(table);
19 * elm_table_padding_set(table, space_between_columns, space_between_rows);
20 * elm_table_pack(table, table_content_object, x_coord, y_coord, colspan, rowspan);
21 * elm_table_pack(table, table_content_object, next_x_coord, next_y_coord, colspan, rowspan);
22 * elm_table_pack(table, table_content_object, other_x_coord, other_y_coord, colspan, rowspan);
25 * The following are examples of how to use a table:
26 * @li @ref tutorial_table_01
27 * @li @ref tutorial_table_02
33 * @brief Add a new table to the parent
35 * @param parent The parent object
36 * @return The new object or NULL if it cannot be created
40 EAPI Evas_Object *elm_table_add(Evas_Object *parent);
43 * @brief Set the homogeneous layout in the table
45 * @param obj The layout object
46 * @param homogeneous A boolean to set if the layout is homogeneous in the
47 * table (EINA_TRUE = homogeneous, EINA_FALSE = no homogeneous)
51 EAPI void elm_table_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
54 * @brief Get the current table homogeneous mode.
56 * @param obj The table object
57 * @return A boolean to indicating if the layout is homogeneous in the table
58 * (EINA_TRUE = homogeneous, EINA_FALSE = no homogeneous)
62 EAPI Eina_Bool elm_table_homogeneous_get(const Evas_Object *obj);
65 * @brief Set padding between cells.
67 * @param obj The layout object.
68 * @param horizontal set the horizontal padding.
69 * @param vertical set the vertical padding.
75 EAPI void elm_table_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical);
78 * @brief Get padding between cells.
80 * @param obj The layout object.
81 * @param horizontal set the horizontal padding.
82 * @param vertical set the vertical padding.
86 EAPI void elm_table_padding_get(const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical);
89 * @brief Add a subobject on the table with the coordinates passed
91 * @param obj The table object
92 * @param subobj The subobject to be added to the table
94 * @param y Column number
98 * @note All positioning inside the table is relative to rows and columns, so
99 * a value of 0 for x and y, means the top left cell of the table, and a
100 * value of 1 for w and h means @p subobj only takes that 1 cell.
104 EAPI void elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h);
107 * @brief Remove child from table.
109 * @param obj The table object
110 * @param subobj The subobject
114 EAPI void elm_table_unpack(Evas_Object *obj, Evas_Object *subobj);
117 * @brief Faster way to remove all child objects from a table object.
119 * @param obj The table object
120 * @param clear If true, will delete children, else just remove from table.
124 EAPI void elm_table_clear(Evas_Object *obj, Eina_Bool clear);
127 * @brief Set the packing location of an existing child of the table
129 * @param subobj The subobject to be modified in the table
130 * @param x Row number
131 * @param y Column number
135 * Modifies the position of an object already in the table.
137 * @note All positioning inside the table is relative to rows and columns, so
138 * a value of 0 for x and y, means the top left cell of the table, and a
139 * value of 1 for w and h means @p subobj only takes that 1 cell.
143 EAPI void elm_table_pack_set(Evas_Object *subobj, int x, int y, int w, int h);
146 * @brief Get the packing location of an existing child of the table
148 * @param subobj The subobject to be modified in the table
149 * @param x Row number
150 * @param y Column number
154 * @see elm_table_pack_set()
158 EAPI void elm_table_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h);