Add missing documentation for elm_panes EAPIs and some comments. One API needs renaming.
[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 widget adds a draggable 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 are:
27  * @li "left" - A leftside content of the panes
28  * @li "right" - A rightside content of the panes
29  *
30  * If panes are displayed vertically, left content will be displayed on
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                 *elm_panes_add(Evas_Object *parent);
54
55 /**
56  * Set the left pane content object of the panes object. 
57  *
58  * @param obj The panes object.
59  * @param left_content The left content object.
60  *
61  * This function sets the left pane contents of a panes widgets.
62  *
63  * @ingroup Panes
64  */
65 EAPI void elm_panes_content_left_set(Evas_Object *obj, Evas_Object *left_content);
66
67 /**
68  * Get the left pane content object of the panes object. 
69  *
70  * @param obj The panes object.
71  * @return the left pane widget handle or @c NULL, on errors.
72  *
73  * This function gets the left pane contents of a panes widget.
74  *
75  * @ingroup Panes
76  */
77 EAPI Evas_Object * elm_panes_content_left_get(const Evas_Object *obj);
78
79 /**
80  * Unset the left pane content object of the panes object. 
81  *
82  * @param obj The panes object.
83  * @return the left pane widget handle or @c NULL, on errors.
84  *
85  * This function unsets the left pane contents of a panes widget and makes
86  * the left pane empty.
87  *
88  * @ingroup Panes
89  */
90 EAPI Evas_Object * elm_panes_content_left_unset(Evas_Object *obj);
91
92 /**
93  * Set the right pane content object of the panes object. 
94  *
95  * @param obj The panes object.
96  * @param right_content The right content object.
97  *
98  * This function sets the right pane contents of a panes widgets.
99  *
100  * @ingroup Panes
101  */
102 EAPI void elm_panes_content_right_set(Evas_Object *obj, Evas_Object *right_content);
103
104 /**
105  * Get the right pane content object of the panes object. 
106  *
107  * @param obj The panes object.
108  * @return the right pane widget handle or @c NULL, on errors.
109  *
110  * This function gets the right pane contents of a panes widget.
111  *
112  * @ingroup Panes
113  */
114 EAPI Evas_Object * elm_panes_content_right_get(const Evas_Object *obj);
115
116 /**
117  * Unset the right pane content object of the panes object. 
118  *
119  * @param obj The panes object.
120  * @return the right pane widget handle or @c NULL, on errors.
121  *
122  * This function unsets the right pane contents of a panes widget and makes
123  * the right pane empty.
124  *
125  * @ingroup Panes
126  */
127 EAPI Evas_Object * elm_panes_content_right_unset(Evas_Object *obj);
128
129 /**
130  * Set whether the left and right panes resize homogenously or not.
131  *
132  * @param obj The panes object.
133  * @param fixed Use @c EINA_TRUE to make @p obj to be
134  * resize the left and right panes @b homogenously.
135  * Use @c EINA_FALSE to make use of the values specified in 
136  * elm_panes_content_left_size_set() and
137  * elm_panes_content_right_size_set()
138  * to resize the left and right panes.
139  *
140  * By default panes are resized homogenously.
141  *
142  * @see elm_panes_fixed_get()
143  * @see elmpanes_content_left_size_set()
144  * @see elm_panes_content_right_size_set()
145  *
146  * @ingroup Panes
147  */
148 EAPI void                         elm_panes_fixed_set(Evas_Object *obj, Eina_Bool fixed);
149
150 /**
151  * Retrieve the resize mode for the panes of a given panes widget.
152  *
153  * @param obj The panes object.
154  * @return @c EINA_TRUE, if @p obj is set to be resized @b homogenously,
155  *
156  * @see elm_panes_fixed_set() for more details.
157  * @see elmpanes_content_left_size_get()
158  * @see elm_panes_content_right_size_get()
159  *
160  * @ingroup Panes
161  */
162 EAPI Eina_Bool                    elm_panes_fixed_get(const Evas_Object *obj);
163
164 /**
165  * Get the size proportion of panes widget's left side.
166  *
167  * @param obj The panes object.
168  * @return float value between 0.0 and 1.0 representing size proportion
169  * of left side.
170  *
171  * @see elm_panes_content_left_size_set() for more details.
172  *
173  * @ingroup Panes
174  */
175 EAPI double                       elm_panes_content_left_size_get(const Evas_Object *obj);
176
177 /**
178  * Set the size proportion of panes widget's left side.
179  *
180  * @param obj The panes object.
181  * @param size Value between 0.0 and 1.0 representing size proportion
182  * of left side.
183  *
184  * By default it's homogeneous, i.e., both sides have the same size.
185  *
186  * If something different is required, it can be set with this function.
187  * For example, if the left content should be displayed over
188  * 75% of the panes size, @p size should be passed as @c 0.75.
189  * This way, right content will be resized to 25% of panes size.
190  *
191  * If displayed vertically, left content is displayed at top, and
192  * right content at bottom.
193  *
194  * @note This proportion will change when user drags the panes bar.
195  *
196  * @see elm_panes_content_left_size_get()
197  *
198  * @ingroup Panes
199  */
200 EAPI void                         elm_panes_content_left_size_set(Evas_Object *obj, double size);
201
202 /**
203  * Get the size proportion of panes widget's right side.
204  *
205  * @param obj The panes object.
206  * @return float value between 0.0 and 1.0 representing size proportion
207  * of right side.
208  *
209  * @see elm_panes_content_right_size_set() for more details.
210  *
211  * @ingroup Panes
212  */
213 EAPI double                       elm_panes_content_right_size_get(const Evas_Object *obj);
214
215 /**
216  * Set the size proportion of panes widget's right side.
217  *
218  * @param obj The panes object.
219  * @param size Value between 0.0 and 1.0 representing size proportion
220  * of right side.
221  *
222  * By default it's homogeneous, i.e., both sides have the same size.
223  *
224  * If something different is required, it can be set with this function.
225  * For example, if the right content should be displayed over
226  * 75% of the panes size, @p size should be passed as @c 0.75.
227  * This way, right content will be resized to 25% of panes size.
228  *
229  * If displayed vertically, right content is displayed at top, and
230  * right content at bottom.
231  *
232  * @note This proportion will change when user drags the panes bar.
233  *
234  * @see elm_panes_content_right_size_get()
235  *
236  * @ingroup Panes
237  */
238 EAPI void                         elm_panes_content_right_size_set(Evas_Object *obj, double size);
239
240
241 /**
242  * Set the orientation of a given panes widget.
243  *
244  * @param obj The panes object.
245  * @param horizontal Use @c EINA_TRUE to make @p obj to be
246  * @b horizontal, @c EINA_FALSE to make it @b vertical.
247  *
248  * Use this function to change how your panes is to be
249  * disposed: vertically or horizontally.
250  *
251  * By default it's displayed horizontally.
252  *
253  * @see elm_panes_horizontal_get()
254  *
255  * @ingroup Panes
256  */
257 EAPI void                         elm_panes_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
258
259 /**
260  * Retrieve the orientation of a given panes widget.
261  *
262  * @param obj The panes object.
263  * @return @c EINA_TRUE, if @p obj is set to be @b horizontal,
264  * @c EINA_FALSE if it's @b vertical (and on errors).
265  *
266  * @see elm_panes_horizontal_set() for more details.
267  *
268  * @ingroup Panes
269  */
270 EAPI Eina_Bool                    elm_panes_horizontal_get(const Evas_Object *obj);
271
272 /**
273  * @}
274  */