fomatting of headers -> fixup. and documentation fixing.
[framework/uifw/elementary.git] / src / lib / elm_panes.h
1 /**
2  * @defgroup Panes Panes
3  * @ingroup Elementary
4  *
5  * @image html img/widget/panes/preview-00.png
6  * @image latex img/widget/panes/preview-00.eps width=\textwidth
7  *
8  * @image html img/panes.png
9  * @image latex img/panes.eps width=\textwidth
10  *
11  * The panes adds a dragable bar between two contents. When dragged
12  * this bar will resize contents size.
13  *
14  * Panes can be displayed vertically or horizontally, and contents
15  * size proportion can be customized (homogeneous by default).
16  *
17  * Smart callbacks one can listen to:
18  * - "press" - The panes has been pressed (button wasn't released yet).
19  * - "unpressed" - The panes was released after being pressed.
20  * - "clicked" - The panes has been clicked>
21  * - "clicked,double" - The panes has been double clicked
22  *
23  * Available styles for it:
24  * - @c "default"
25  *
26  * Default contents parts of the panes widget that you can use for are:
27  * @li "left" - A leftside content of the panes
28  * @li "right" - A rightside content of the panes
29  *
30  * If panes is displayed vertically, left content will be displayed at
31  * top.
32  *
33  * Here is an example on its usage:
34  * @li @ref panes_example
35  */
36
37 /**
38  * @addtogroup Panes
39  * @{
40  */
41
42 /**
43  * Add a new panes widget to the given parent Elementary
44  * (container) object.
45  *
46  * @param parent The parent object.
47  * @return a new panes widget handle or @c NULL, on errors.
48  *
49  * This function inserts a new panes widget on the canvas.
50  *
51  * @ingroup Panes
52  */
53 EAPI Evas_Object *
54                                   elm_panes_add(Evas_Object *parent)
55 EINA_ARG_NONNULL(1);
56
57 /**
58  * Set the left content of the panes widget.
59  *
60  * @param obj The panes object.
61  * @param content The new left content object.
62  *
63  * Once the content object is set, a previously set one will be deleted.
64  * If you want to keep that old content object, use the
65  * elm_panes_content_left_unset() function.
66  *
67  * If panes is displayed vertically, left content will be displayed at
68  * top.
69  *
70  * @see elm_panes_content_left_get()
71  * @see elm_panes_content_right_set() to set content on the other side.
72  *
73  * @deprecated use elm_object_part_content_set() instead
74  *
75  * @ingroup Panes
76  */
77 EINA_DEPRECATED EAPI void         elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
78
79 /**
80  * Set the right content of the panes widget.
81  *
82  * @param obj The panes object.
83  * @param content The new right content object.
84  *
85  * Once the content object is set, a previously set one will be deleted.
86  * If you want to keep that old content object, use the
87  * elm_panes_content_right_unset() function.
88  *
89  * If panes is displayed vertically, left content will be displayed at
90  * bottom.
91  *
92  * @see elm_panes_content_right_get()
93  * @see elm_panes_content_left_set() to set content on the other side.
94  *
95  * @deprecated use elm_object_part_content_set() instead
96  *
97  * @ingroup Panes
98  */
99 EINA_DEPRECATED EAPI void         elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
100
101 /**
102  * Get the left content of the panes.
103  *
104  * @param obj The panes object.
105  * @return The left content object that is being used.
106  *
107  * Return the left content object which is set for this widget.
108  *
109  * @see elm_panes_content_left_set() for details.
110  *
111  * @deprecated use elm_object_part_content_get() instead
112  *
113  * @ingroup Panes
114  */
115 EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_left_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
116
117 /**
118  * Get the right content of the panes.
119  *
120  * @param obj The panes object
121  * @return The right content object that is being used
122  *
123  * Return the right content object which is set for this widget.
124  *
125  * @see elm_panes_content_right_set() for details.
126  *
127  * @deprecated use elm_object_part_content_get() instead
128  *
129  * @ingroup Panes
130  */
131 EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_right_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
132
133 /**
134  * Unset the left content used for the panes.
135  *
136  * @param obj The panes object.
137  * @return The left content object that was being used.
138  *
139  * Unparent and return the left content object which was set for this widget.
140  *
141  * @see elm_panes_content_left_set() for details.
142  * @see elm_panes_content_left_get().
143  *
144  * @deprecated use elm_object_part_content_unset() instead
145  *
146  * @ingroup Panes
147  */
148 EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_left_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
149
150 /**
151  * Unset the right content used for the panes.
152  *
153  * @param obj The panes object.
154  * @return The right content object that was being used.
155  *
156  * Unparent and return the right content object which was set for this
157  * widget.
158  *
159  * @see elm_panes_content_right_set() for details.
160  * @see elm_panes_content_right_get().
161  *
162  * @deprecated use elm_object_part_content_unset() instead
163  *
164  * @ingroup Panes
165  */
166 EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_right_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
167
168 /**
169  * Get the size proportion of panes widget's left side.
170  *
171  * @param obj The panes object.
172  * @return float value between 0.0 and 1.0 representing size proportion
173  * of left side.
174  *
175  * @see elm_panes_content_left_size_set() for more details.
176  *
177  * @ingroup Panes
178  */
179 EAPI double                       elm_panes_content_left_size_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
180
181 /**
182  * Set the size proportion of panes widget's left side.
183  *
184  * @param obj The panes object.
185  * @param size Value between 0.0 and 1.0 representing size proportion
186  * of left side.
187  *
188  * By default it's homogeneous, i.e., both sides have the same size.
189  *
190  * If something different is required, it can be set with this function.
191  * For example, if the left content should be displayed over
192  * 75% of the panes size, @p size should be passed as @c 0.75.
193  * This way, right content will be resized to 25% of panes size.
194  *
195  * If displayed vertically, left content is displayed at top, and
196  * right content at bottom.
197  *
198  * @note This proportion will change when user drags the panes bar.
199  *
200  * @see elm_panes_content_left_size_get()
201  *
202  * @ingroup Panes
203  */
204 EAPI void                         elm_panes_content_left_size_set(Evas_Object *obj, double size) EINA_ARG_NONNULL(1);
205
206 /**
207  * Set the orientation of a given panes widget.
208  *
209  * @param obj The panes object.
210  * @param horizontal Use @c EINA_TRUE to make @p obj to be
211  * @b horizontal, @c EINA_FALSE to make it @b vertical.
212  *
213  * Use this function to change how your panes is to be
214  * disposed: vertically or horizontally.
215  *
216  * By default it's displayed horizontally.
217  *
218  * @see elm_panes_horizontal_get()
219  *
220  * @ingroup Panes
221  */
222 EAPI void                         elm_panes_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1);
223
224 /**
225  * Retrieve the orientation of a given panes widget.
226  *
227  * @param obj The panes object.
228  * @return @c EINA_TRUE, if @p obj is set to be @b horizontal,
229  * @c EINA_FALSE if it's @b vertical (and on errors).
230  *
231  * @see elm_panes_horizontal_set() for more details.
232  *
233  * @ingroup Panes
234  */
235 EAPI Eina_Bool                    elm_panes_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
236 EAPI void                         elm_panes_fixed_set(Evas_Object *obj, Eina_Bool fixed) EINA_ARG_NONNULL(1);
237 EAPI Eina_Bool                    elm_panes_fixed_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
238
239 /**
240  * @}
241  */