EFL migration revision 67547
[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  * also span multiple columns or rows - even overlap (and then be raised or
6  * lowered accordingly to adjust stacking if they do overlap).
7  *
8  * For a Table widget the row/column count is not fixed.
9  * The table widget adjusts itself when subobjects are added to it dynamically.
10  *
11  * The followin are examples of how to use a table:
12  * @li @ref tutorial_table_01
13  * @li @ref tutorial_table_02
14  *
15  * @{
16  */
17
18 /**
19  * @brief Add a new table to the parent
20  *
21  * @param parent The parent object
22  * @return The new object or NULL if it cannot be created
23  */
24 EAPI Evas_Object *elm_table_add(Evas_Object *parent);
25
26 /**
27  * @brief Set the homogeneous layout in the table
28  *
29  * @param obj The layout object
30  * @param homogeneous A boolean to set if the layout is homogeneous in the
31  * table (EINA_TRUE = homogeneous,  EINA_FALSE = no homogeneous)
32  */
33 EAPI void      elm_table_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
34
35 /**
36  * @brief Get the current table homogeneous mode.
37  *
38  * @param obj The table object
39  * @return A boolean to indicating if the layout is homogeneous in the table
40  * (EINA_TRUE = homogeneous,  EINA_FALSE = no homogeneous)
41  */
42 EAPI Eina_Bool elm_table_homogeneous_get(const Evas_Object *obj);
43
44 /**
45  * @brief Set padding between cells.
46  *
47  * @param obj The layout object.
48  * @param horizontal set the horizontal padding.
49  * @param vertical set the vertical padding.
50  *
51  * Default value is 0.
52  */
53 EAPI void      elm_table_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical);
54
55 /**
56  * @brief Get padding between cells.
57  *
58  * @param obj The layout object.
59  * @param horizontal set the horizontal padding.
60  * @param vertical set the vertical padding.
61  */
62 EAPI void      elm_table_padding_get(const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical);
63
64 /**
65  * @brief Add a subobject on the table with the coordinates passed
66  *
67  * @param obj The table object
68  * @param subobj The subobject to be added to the table
69  * @param x Row number
70  * @param y Column number
71  * @param w rowspan
72  * @param h colspan
73  *
74  * @note All positioning inside the table is relative to rows and columns, so
75  * a value of 0 for x and y, means the top left cell of the table, and a
76  * value of 1 for w and h means @p subobj only takes that 1 cell.
77  */
78 EAPI void      elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h);
79
80 /**
81  * @brief Remove child from table.
82  *
83  * @param obj The table object
84  * @param subobj The subobject
85  */
86 EAPI void      elm_table_unpack(Evas_Object *obj, Evas_Object *subobj);
87
88 /**
89  * @brief Faster way to remove all child objects from a table object.
90  *
91  * @param obj The table object
92  * @param clear If true, will delete children, else just remove from table.
93  */
94 EAPI void      elm_table_clear(Evas_Object *obj, Eina_Bool clear);
95
96 /**
97  * @brief Set the packing location of an existing child of the table
98  *
99  * @param subobj The subobject to be modified in the table
100  * @param x Row number
101  * @param y Column number
102  * @param w rowspan
103  * @param h colspan
104  *
105  * Modifies the position of an object already in the table.
106  *
107  * @note All positioning inside the table is relative to rows and columns, so
108  * a value of 0 for x and y, means the top left cell of the table, and a
109  * value of 1 for w and h means @p subobj only takes that 1 cell.
110  */
111 EAPI void      elm_table_pack_set(Evas_Object *subobj, int x, int y, int w, int h);
112
113 /**
114  * @brief Get the packing location of an existing child of the table
115  *
116  * @param subobj The subobject to be modified in the table
117  * @param x Row number
118  * @param y Column number
119  * @param w rowspan
120  * @param h colspan
121  *
122  * @see elm_table_pack_set()
123  */
124 EAPI void      elm_table_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h);
125
126 /**
127  * @}
128  */