2 * @defgroup Panes Panes
5 * @image html panes_inheritance_tree.png
6 * @image latex panes_inheritance_tree.eps
8 * @image html img/widget/panes/preview-00.png
9 * @image latex img/widget/panes/preview-00.eps width=\textwidth
11 * @image html img/panes.png
12 * @image latex img/panes.eps width=\textwidth
14 * The panes widget adds a draggable bar between two contents. When dragged
15 * this bar will resize contents' size.
17 * Panes can be displayed vertically or horizontally, and contents
18 * size proportion can be customized (homogeneous by default).
20 * This widget inherits from the @ref Layout one, so that all the
21 * functions acting on it also work for panes objects.
23 * This widget emits the following signals, besides the ones sent from
25 * - @c "press" - The panes has been pressed (button wasn't released yet).
26 * - @c "unpressed" - The panes was released after being pressed.
27 * - @c "clicked" - The panes has been clicked>
28 * - @c "clicked,double" - The panes has been double clicked
30 * Available styles for it:
33 * Default content parts of the panes widget that you can use are:
34 * @li "left" - A leftside content of the panes
35 * @li "right" - A rightside content of the panes
37 * If panes are displayed vertically, left content will be displayed on
40 * Supported elm_object common APIs.
41 * @li @ref elm_object_part_content_set
42 * @li @ref elm_object_part_content_get
43 * @li @ref elm_object_part_content_unset
45 * Here is an example on its usage:
46 * @li @ref panes_example
55 * Add a new panes widget to the given parent Elementary
58 * @param parent The parent object.
59 * @return a new panes widget handle or @c NULL, on errors.
61 * This function inserts a new panes widget on the canvas.
65 EAPI Evas_Object *elm_panes_add(Evas_Object *parent);
68 * Set whether the left and right panes resize homogeneously or not.
70 * @param obj The panes object.
71 * @param fixed Use @c EINA_TRUE to make @p obj to be
72 * resize the left and right panes @b homogeneously.
73 * Use @c EINA_FALSE to make use of the values specified in
74 * elm_panes_content_left_size_set() and
75 * elm_panes_content_right_size_set()
76 * to resize the left and right panes.
78 * By default panes are resized homogeneously.
80 * @see elm_panes_fixed_get()
81 * @see elm_panes_content_left_size_set()
82 * @see elm_panes_content_right_size_set()
86 EAPI void elm_panes_fixed_set(Evas_Object *obj, Eina_Bool fixed);
89 * Retrieve the resize mode for the panes of a given panes widget.
91 * @param obj The panes object.
92 * @return @c EINA_TRUE, if @p obj is set to be resized @b homogeneously,
94 * @see elm_panes_fixed_set() for more details.
95 * @see elm_panes_content_left_size_get()
96 * @see elm_panes_content_right_size_get()
100 EAPI Eina_Bool elm_panes_fixed_get(const Evas_Object *obj);
103 * Get the size proportion of panes widget's left side.
105 * @param obj The panes object.
106 * @return float value between 0.0 and 1.0 representing size proportion
109 * @see elm_panes_content_left_size_set() for more details.
113 EAPI double elm_panes_content_left_size_get(const Evas_Object *obj);
116 * Set the size proportion of panes widget's left side.
118 * @param obj The panes object.
119 * @param size Value between 0.0 and 1.0 representing size proportion
122 * By default it's homogeneous, i.e., both sides have the same size.
124 * If something different is required, it can be set with this function.
125 * For example, if the left content should be displayed over
126 * 75% of the panes size, @p size should be passed as @c 0.75.
127 * This way, right content will be resized to 25% of panes size.
129 * If displayed vertically, left content is displayed at top, and
130 * right content at bottom.
132 * @note This proportion will change when user drags the panes bar.
134 * @see elm_panes_content_left_size_get()
138 EAPI void elm_panes_content_left_size_set(Evas_Object *obj, double size);
141 * Get the size proportion of panes widget's right side.
143 * @param obj The panes object.
144 * @return float value between 0.0 and 1.0 representing size proportion
147 * @see elm_panes_content_right_size_set() for more details.
151 EAPI double elm_panes_content_right_size_get(const Evas_Object *obj);
154 * Set the size proportion of panes widget's right side.
156 * @param obj The panes object.
157 * @param size Value between 0.0 and 1.0 representing size proportion
160 * By default it's homogeneous, i.e., both sides have the same size.
162 * If something different is required, it can be set with this function.
163 * For example, if the right content should be displayed over
164 * 75% of the panes size, @p size should be passed as @c 0.75.
165 * This way, left content will be resized to 25% of panes size.
167 * If displayed vertically, left content is displayed at top, and
168 * right content at bottom.
170 * @note This proportion will change when user drags the panes bar.
172 * @see elm_panes_content_right_size_get()
176 EAPI void elm_panes_content_right_size_set(Evas_Object *obj, double size);
180 * Set the orientation of a given panes widget.
182 * @param obj The panes object.
183 * @param horizontal Use @c EINA_TRUE to make @p obj to be
184 * @b horizontal, @c EINA_FALSE to make it @b vertical.
186 * Use this function to change how your panes is to be
187 * disposed: vertically or horizontally.
189 * By default it's displayed horizontally.
191 * @see elm_panes_horizontal_get()
195 EAPI void elm_panes_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
198 * Retrieve the orientation of a given panes widget.
200 * @param obj The panes object.
201 * @return @c EINA_TRUE, if @p obj is set to be @b horizontal,
202 * @c EINA_FALSE if it's @b vertical (and on errors).
204 * @see elm_panes_horizontal_set() for more details.
208 EAPI Eina_Bool elm_panes_horizontal_get(const Evas_Object *obj);