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