The separator is not a real item. So it shouldn't be counted.
[framework/uifw/elementary.git] / src / lib / elm_table.h
1 /**
2  * @defgroup Table Table
3  * @ingroup Elementary
4  *
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).
8  *
9  * The row and column count is not fixed. The table widget adjusts itself when
10  * subobjects are added to it dynamically.
11  *
12  * The most common way to use a table is:
13  * @code
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);
20  * @endcode
21  *
22  * The following are examples of how to use a table:
23  * @li @ref tutorial_table_01
24  * @li @ref tutorial_table_02
25  *
26  * @{
27  */
28
29 /**
30  * @brief Add a new table to the parent
31  *
32  * @param parent The parent object
33  * @return The new object or NULL if it cannot be created
34  *
35  * @ingroup Table
36  */
37 EAPI Evas_Object *elm_table_add(Evas_Object *parent);
38
39 /**
40  * @brief Set the homogeneous layout in the table
41  *
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)
45  *
46  * @ingroup Table
47  */
48 EAPI void      elm_table_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
49
50 /**
51  * @brief Get the current table homogeneous mode.
52  *
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)
56  *
57  * @ingroup Table
58  */
59 EAPI Eina_Bool elm_table_homogeneous_get(const Evas_Object *obj);
60
61 /**
62  * @brief Set padding between cells.
63  *
64  * @param obj The layout object.
65  * @param horizontal set the horizontal padding.
66  * @param vertical set the vertical padding.
67  *
68  * Default value is 0.
69  *
70  * @ingroup Table
71  */
72 EAPI void      elm_table_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical);
73
74 /**
75  * @brief Get padding between cells.
76  *
77  * @param obj The layout object.
78  * @param horizontal set the horizontal padding.
79  * @param vertical set the vertical padding.
80  *
81  * @ingroup Table
82  */
83 EAPI void      elm_table_padding_get(const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical);
84
85 /**
86  * @brief Add a subobject on the table with the coordinates passed
87  *
88  * @param obj The table object
89  * @param subobj The subobject to be added to the table
90  * @param x Row number
91  * @param y Column number
92  * @param w colspan
93  * @param h rowspan
94  *
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.
98  *
99  * @ingroup Table
100  */
101 EAPI void      elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h);
102
103 /**
104  * @brief Remove child from table.
105  *
106  * @param obj The table object
107  * @param subobj The subobject
108  *
109  * @ingroup Table
110  */
111 EAPI void      elm_table_unpack(Evas_Object *obj, Evas_Object *subobj);
112
113 /**
114  * @brief Faster way to remove all child objects from a table object.
115  *
116  * @param obj The table object
117  * @param clear If true, will delete children, else just remove from table.
118  *
119  * @ingroup Table
120  */
121 EAPI void      elm_table_clear(Evas_Object *obj, Eina_Bool clear);
122
123 /**
124  * @brief Set the packing location of an existing child of the table
125  *
126  * @param subobj The subobject to be modified in the table
127  * @param x Row number
128  * @param y Column number
129  * @param w rowspan
130  * @param h colspan
131  *
132  * Modifies the position of an object already in the table.
133  *
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.
137  *
138  * @ingroup Table
139  */
140 EAPI void      elm_table_pack_set(Evas_Object *subobj, int x, int y, int w, int h);
141
142 /**
143  * @brief Get the packing location of an existing child of the table
144  *
145  * @param subobj The subobject to be modified in the table
146  * @param x Row number
147  * @param y Column number
148  * @param w rowspan
149  * @param h colspan
150  *
151  * @see elm_table_pack_set()
152  *
153  * @ingroup Table
154  */
155 EAPI void      elm_table_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h);
156
157 /**
158  * @}
159  */