aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/elementary/src/lib/elm_panes.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libraries/elementary/src/lib/elm_panes.h205
1 files changed, 205 insertions, 0 deletions
diff --git a/libraries/elementary/src/lib/elm_panes.h b/libraries/elementary/src/lib/elm_panes.h
new file mode 100644
index 0000000..f0fa004
--- /dev/null
+++ b/libraries/elementary/src/lib/elm_panes.h
@@ -0,0 +1,205 @@
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 @ref elm_object_part_content_set
35 * @li @ref elm_object_part_content_get
36 * @li @ref 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 */
58EAPI 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 elm_panes_content_left_size_set()
75 * @see elm_panes_content_right_size_set()
76 *
77 * @ingroup Panes
78 */
79EAPI 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 elm_panes_content_left_size_get()
89 * @see elm_panes_content_right_size_get()
90 *
91 * @ingroup Panes
92 */
93EAPI 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 */
106EAPI 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 */
131EAPI 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 */
144EAPI double elm_panes_content_right_size_get(const Evas_Object *obj);
145
146/**
147 * Set the size proportion of panes widget's right side.
148 *
149 * @param obj The panes object.
150 * @param size Value between 0.0 and 1.0 representing size proportion
151 * of right side.
152 *
153 * By default it's homogeneous, i.e., both sides have the same size.
154 *
155 * If something different is required, it can be set with this function.
156 * For example, if the right content should be displayed over
157 * 75% of the panes size, @p size should be passed as @c 0.75.
158 * This way, left content will be resized to 25% of panes size.
159 *
160 * If displayed vertically, left content is displayed at top, and
161 * right content at bottom.
162 *
163 * @note This proportion will change when user drags the panes bar.
164 *
165 * @see elm_panes_content_right_size_get()
166 *
167 * @ingroup Panes
168 */
169EAPI void elm_panes_content_right_size_set(Evas_Object *obj, double size);
170
171
172/**
173 * Set the orientation of a given panes widget.
174 *
175 * @param obj The panes object.
176 * @param horizontal Use @c EINA_TRUE to make @p obj to be
177 * @b horizontal, @c EINA_FALSE to make it @b vertical.
178 *
179 * Use this function to change how your panes is to be
180 * disposed: vertically or horizontally.
181 *
182 * By default it's displayed horizontally.
183 *
184 * @see elm_panes_horizontal_get()
185 *
186 * @ingroup Panes
187 */
188EAPI void elm_panes_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
189
190/**
191 * Retrieve the orientation of a given panes widget.
192 *
193 * @param obj The panes object.
194 * @return @c EINA_TRUE, if @p obj is set to be @b horizontal,
195 * @c EINA_FALSE if it's @b vertical (and on errors).
196 *
197 * @see elm_panes_horizontal_set() for more details.
198 *
199 * @ingroup Panes
200 */
201EAPI Eina_Bool elm_panes_horizontal_get(const Evas_Object *obj);
202
203/**
204 * @}
205 */