elm panes: Added some review for un-implemented APIs. Pointed out by Jeremy Zurcher.
[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 content 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  * Supported elm_object common APIs.
34  * @li elm_object_part_content_set
35  * @li elm_object_part_content_get
36  * @li elm_object_part_content_unset
37  *
38  * Here is an example on its usage:
39  * @li @ref panes_example
40  */
41
42 /**
43  * @addtogroup Panes
44  * @{
45  */
46
47 /**
48  * Add a new panes widget to the given parent Elementary
49  * (container) object.
50  *
51  * @param parent The parent object.
52  * @return a new panes widget handle or @c NULL, on errors.
53  *
54  * This function inserts a new panes widget on the canvas.
55  *
56  * @ingroup Panes
57  */
58 EAPI Evas_Object                 *elm_panes_add(Evas_Object *parent);
59
60 /**
61  * Set whether the left and right panes resize homogeneously or not.
62  *
63  * @param obj The panes object.
64  * @param fixed Use @c EINA_TRUE to make @p obj to be
65  * resize the left and right panes @b homogeneously.
66  * Use @c EINA_FALSE to make use of the values specified in 
67  * elm_panes_content_left_size_set() and
68  * elm_panes_content_right_size_set()
69  * to resize the left and right panes.
70  *
71  * By default panes are resized homogeneously.
72  *
73  * @see elm_panes_fixed_get()
74  * @see elmpanes_content_left_size_set()
75  * @see elm_panes_content_right_size_set()
76  *
77  * @ingroup Panes
78  */
79 EAPI void                         elm_panes_fixed_set(Evas_Object *obj, Eina_Bool fixed);
80
81 /**
82  * Retrieve the resize mode for the panes of a given panes widget.
83  *
84  * @param obj The panes object.
85  * @return @c EINA_TRUE, if @p obj is set to be resized @b homogeneously,
86  *
87  * @see elm_panes_fixed_set() for more details.
88  * @see elmpanes_content_left_size_get()
89  * @see elm_panes_content_right_size_get()
90  *
91  * @ingroup Panes
92  */
93 EAPI Eina_Bool                    elm_panes_fixed_get(const Evas_Object *obj);
94
95 /**
96  * Get the size proportion of panes widget's left side.
97  *
98  * @param obj The panes object.
99  * @return float value between 0.0 and 1.0 representing size proportion
100  * of left side.
101  *
102  * @see elm_panes_content_left_size_set() for more details.
103  *
104  * @ingroup Panes
105  */
106 EAPI double                       elm_panes_content_left_size_get(const Evas_Object *obj);
107
108 /**
109  * Set the size proportion of panes widget's left side.
110  *
111  * @param obj The panes object.
112  * @param size Value between 0.0 and 1.0 representing size proportion
113  * of left side.
114  *
115  * By default it's homogeneous, i.e., both sides have the same size.
116  *
117  * If something different is required, it can be set with this function.
118  * For example, if the left content should be displayed over
119  * 75% of the panes size, @p size should be passed as @c 0.75.
120  * This way, right content will be resized to 25% of panes size.
121  *
122  * If displayed vertically, left content is displayed at top, and
123  * right content at bottom.
124  *
125  * @note This proportion will change when user drags the panes bar.
126  *
127  * @see elm_panes_content_left_size_get()
128  *
129  * @ingroup Panes
130  */
131 EAPI void                         elm_panes_content_left_size_set(Evas_Object *obj, double size);
132
133 /**
134  * Get the size proportion of panes widget's right side.
135  *
136  * @param obj The panes object.
137  * @return float value between 0.0 and 1.0 representing size proportion
138  * of right side.
139  *
140  * @see elm_panes_content_right_size_set() for more details.
141  *
142  * @ingroup Panes
143  */
144 // XXX: no implementation for this api?
145 EAPI double                       elm_panes_content_right_size_get(const Evas_Object *obj);
146
147 /**
148  * Set the size proportion of panes widget's right side.
149  *
150  * @param obj The panes object.
151  * @param size Value between 0.0 and 1.0 representing size proportion
152  * of right side.
153  *
154  * By default it's homogeneous, i.e., both sides have the same size.
155  *
156  * If something different is required, it can be set with this function.
157  * For example, if the right content should be displayed over
158  * 75% of the panes size, @p size should be passed as @c 0.75.
159  * This way, right content will be resized to 25% of panes size.
160  *
161  * If displayed vertically, right content is displayed at top, and
162  * right content at bottom.
163  *
164  * @note This proportion will change when user drags the panes bar.
165  *
166  * @see elm_panes_content_right_size_get()
167  *
168  * @ingroup Panes
169  */
170 // XXX: no implementation for this api?
171 EAPI void                         elm_panes_content_right_size_set(Evas_Object *obj, double size);
172
173
174 /**
175  * Set the orientation of a given panes widget.
176  *
177  * @param obj The panes object.
178  * @param horizontal Use @c EINA_TRUE to make @p obj to be
179  * @b horizontal, @c EINA_FALSE to make it @b vertical.
180  *
181  * Use this function to change how your panes is to be
182  * disposed: vertically or horizontally.
183  *
184  * By default it's displayed horizontally.
185  *
186  * @see elm_panes_horizontal_get()
187  *
188  * @ingroup Panes
189  */
190 EAPI void                         elm_panes_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
191
192 /**
193  * Retrieve the orientation of a given panes widget.
194  *
195  * @param obj The panes object.
196  * @return @c EINA_TRUE, if @p obj is set to be @b horizontal,
197  * @c EINA_FALSE if it's @b vertical (and on errors).
198  *
199  * @see elm_panes_horizontal_set() for more details.
200  *
201  * @ingroup Panes
202  */
203 EAPI Eina_Bool                    elm_panes_horizontal_get(const Evas_Object *obj);
204
205 /**
206  * @}
207  */