[Genlist][Nabi:S1-1013] bug fix, Abnormality is displayed when selecting Type while...
[framework/uifw/elementary.git] / src / lib / elm_table.h
1 /**
2  * @defgroup Table Table
3  *
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).
7  *
8  * The row and column count is not fixed. The table widget adjusts itself when
9  * subobjects are added to it dynamically.
10  *
11  * The most common way to use a table is:
12  * @code
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);
19  * @endcode
20  *
21  * The following are examples of how to use a table:
22  * @li @ref tutorial_table_01
23  * @li @ref tutorial_table_02
24  *
25  * @{
26  */
27
28 /**
29  * @brief Add a new table to the parent
30  *
31  * @param parent The parent object
32  * @return The new object or NULL if it cannot be created
33  */
34 EAPI Evas_Object *elm_table_add(Evas_Object *parent);
35
36 /**
37  * @brief Set the homogeneous layout in the table
38  *
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)
42  */
43 EAPI void      elm_table_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
44
45 /**
46  * @brief Get the current table homogeneous mode.
47  *
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)
51  */
52 EAPI Eina_Bool elm_table_homogeneous_get(const Evas_Object *obj);
53
54 /**
55  * @brief Set padding between cells.
56  *
57  * @param obj The layout object.
58  * @param horizontal set the horizontal padding.
59  * @param vertical set the vertical padding.
60  *
61  * Default value is 0.
62  */
63 EAPI void      elm_table_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical);
64
65 /**
66  * @brief Get padding between cells.
67  *
68  * @param obj The layout object.
69  * @param horizontal set the horizontal padding.
70  * @param vertical set the vertical padding.
71  */
72 EAPI void      elm_table_padding_get(const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical);
73
74 /**
75  * @brief Add a subobject on the table with the coordinates passed
76  *
77  * @param obj The table object
78  * @param subobj The subobject to be added to the table
79  * @param x Row number
80  * @param y Column number
81  * @param w colspan
82  * @param h rowspan
83  *
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.
87  */
88 EAPI void      elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h);
89
90 /**
91  * @brief Remove child from table.
92  *
93  * @param obj The table object
94  * @param subobj The subobject
95  */
96 EAPI void      elm_table_unpack(Evas_Object *obj, Evas_Object *subobj);
97
98 /**
99  * @brief Faster way to remove all child objects from a table object.
100  *
101  * @param obj The table object
102  * @param clear If true, will delete children, else just remove from table.
103  */
104 EAPI void      elm_table_clear(Evas_Object *obj, Eina_Bool clear);
105
106 /**
107  * @brief Set the packing location of an existing child of the table
108  *
109  * @param subobj The subobject to be modified in the table
110  * @param x Row number
111  * @param y Column number
112  * @param w rowspan
113  * @param h colspan
114  *
115  * Modifies the position of an object already in the table.
116  *
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.
120  */
121 EAPI void      elm_table_pack_set(Evas_Object *subobj, int x, int y, int w, int h);
122
123 /**
124  * @brief Get 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  * @see elm_table_pack_set()
133  */
134 EAPI void      elm_table_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h);
135
136 /**
137  * @}
138  */