2 * @defgroup Panes Panes
5 * @image html img/widget/panes/preview-00.png
6 * @image latex img/widget/panes/preview-00.eps width=\textwidth
8 * @image html img/panes.png
9 * @image latex img/panes.eps width=\textwidth
11 * The panes widget adds a draggable bar between two contents. When dragged
12 * this bar will resize contents' size.
14 * Panes can be displayed vertically or horizontally, and contents
15 * size proportion can be customized (homogeneous by default).
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
23 * Available styles for it:
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
30 * If panes are displayed vertically, left content will be displayed on
33 * Here is an example on its usage:
34 * @li @ref panes_example
43 * Add a new panes widget to the given parent Elementary
46 * @param parent The parent object.
47 * @return a new panes widget handle or @c NULL, on errors.
49 * This function inserts a new panes widget on the canvas.
53 EAPI Evas_Object *elm_panes_add(Evas_Object *parent);
56 * Set the left pane content object of the panes object.
58 * @param obj The panes object.
59 * @param left_content The left content object.
61 * This function sets the left pane contents of a panes widgets.
65 EAPI void elm_panes_content_left_set(Evas_Object *obj, Evas_Object *left_content);
68 * Get the left pane content object of the panes object.
70 * @param obj The panes object.
71 * @return the left pane widget handle or @c NULL, on errors.
73 * This function gets the left pane contents of a panes widget.
77 EAPI Evas_Object * elm_panes_content_left_get(const Evas_Object *obj);
80 * Unset the left pane content object of the panes object.
82 * @param obj The panes object.
83 * @return the left pane widget handle or @c NULL, on errors.
85 * This function unsets the left pane contents of a panes widget and makes
86 * the left pane empty.
90 EAPI Evas_Object * elm_panes_content_left_unset(Evas_Object *obj);
93 * Set the right pane content object of the panes object.
95 * @param obj The panes object.
96 * @param right_content The right content object.
98 * This function sets the right pane contents of a panes widgets.
102 EAPI void elm_panes_content_right_set(Evas_Object *obj, Evas_Object *right_content);
105 * Get the right pane content object of the panes object.
107 * @param obj The panes object.
108 * @return the right pane widget handle or @c NULL, on errors.
110 * This function gets the right pane contents of a panes widget.
114 EAPI Evas_Object * elm_panes_content_right_get(const Evas_Object *obj);
117 * Unset the right pane content object of the panes object.
119 * @param obj The panes object.
120 * @return the right pane widget handle or @c NULL, on errors.
122 * This function unsets the right pane contents of a panes widget and makes
123 * the right pane empty.
127 EAPI Evas_Object * elm_panes_content_right_unset(Evas_Object *obj);
130 * Set whether the left and right panes resize homogenously or not.
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.
140 * By default panes are resized homogenously.
142 * @see elm_panes_fixed_get()
143 * @see elmpanes_content_left_size_set()
144 * @see elm_panes_content_right_size_set()
148 EAPI void elm_panes_fixed_set(Evas_Object *obj, Eina_Bool fixed);
151 * Retrieve the resize mode for the panes of a given panes widget.
153 * @param obj The panes object.
154 * @return @c EINA_TRUE, if @p obj is set to be resized @b homogenously,
156 * @see elm_panes_fixed_set() for more details.
157 * @see elmpanes_content_left_size_get()
158 * @see elm_panes_content_right_size_get()
162 EAPI Eina_Bool elm_panes_fixed_get(const Evas_Object *obj);
165 * Get the size proportion of panes widget's left side.
167 * @param obj The panes object.
168 * @return float value between 0.0 and 1.0 representing size proportion
171 * @see elm_panes_content_left_size_set() for more details.
175 EAPI double elm_panes_content_left_size_get(const Evas_Object *obj);
178 * Set the size proportion of panes widget's left side.
180 * @param obj The panes object.
181 * @param size Value between 0.0 and 1.0 representing size proportion
184 * By default it's homogeneous, i.e., both sides have the same size.
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.
191 * If displayed vertically, left content is displayed at top, and
192 * right content at bottom.
194 * @note This proportion will change when user drags the panes bar.
196 * @see elm_panes_content_left_size_get()
200 EAPI void elm_panes_content_left_size_set(Evas_Object *obj, double size);
203 * Get the size proportion of panes widget's right side.
205 * @param obj The panes object.
206 * @return float value between 0.0 and 1.0 representing size proportion
209 * @see elm_panes_content_right_size_set() for more details.
213 EAPI double elm_panes_content_right_size_get(const Evas_Object *obj);
216 * Set the size proportion of panes widget's right side.
218 * @param obj The panes object.
219 * @param size Value between 0.0 and 1.0 representing size proportion
222 * By default it's homogeneous, i.e., both sides have the same size.
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.
229 * If displayed vertically, right content is displayed at top, and
230 * right content at bottom.
232 * @note This proportion will change when user drags the panes bar.
234 * @see elm_panes_content_right_size_get()
238 EAPI void elm_panes_content_right_size_set(Evas_Object *obj, double size);
242 * Set the orientation of a given panes widget.
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.
248 * Use this function to change how your panes is to be
249 * disposed: vertically or horizontally.
251 * By default it's displayed horizontally.
253 * @see elm_panes_horizontal_get()
257 EAPI void elm_panes_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
260 * Retrieve the orientation of a given panes widget.
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).
266 * @see elm_panes_horizontal_set() for more details.
270 EAPI Eina_Bool elm_panes_horizontal_get(const Evas_Object *obj);