2 * @defgroup Flipselector Flip Selector
4 * @image html img/widget/flipselector/preview-00.png
5 * @image latex img/widget/flipselector/preview-00.eps
7 * A flip selector is a widget to show a set of @b text items, one
8 * at a time, with the same sheet switching style as the @ref Clock
9 * "clock" widget, when one changes the current displaying sheet
10 * (thus, the "flip" in the name).
12 * User clicks to flip sheets which are @b held for some time will
14 * make the flip selector to flip continuosly and automatically for
16 * make the flip selector to flip continuously and automatically for
17 >>>>>>> remotes/origin/upstream
18 * the user. The interval between flips will keep growing in time,
19 * so that it helps the user to reach an item which is distant from
20 * the current selection.
22 * Smart callbacks one can register to:
23 * - @c "selected" - when the widget's selected text item is changed
24 * - @c "overflowed" - when the widget's current selection is changed
25 * from the first item in its list to the last
26 * - @c "underflowed" - when the widget's current selection is changed
27 * from the last item in its list to the first
29 * Available styles for it:
32 * Default text parts of the flipselector items that you can use for are:
33 * @li "default" - label of the flipselector item
37 * Supported elm_object common APIs.
38 * @li elm_object_disabled_set
39 * @li elm_object_disabled_get
41 >>>>>>> remotes/origin/upstream
42 * Supported elm_object_item common APIs.
43 * @li elm_object_item_text_set
44 * @li elm_object_item_part_text_set
45 * @li elm_object_item_signal_emit
47 * Here is an example on its usage:
48 * @li @ref flipselector_example
52 * @addtogroup Flipselector
57 * Add a new flip selector widget to the given parent Elementary
60 * @param parent The parent object
61 * @return a new flip selector widget handle or @c NULL, on errors
63 * This function inserts a new flip selector widget on the canvas.
65 * @ingroup Flipselector
67 EAPI Evas_Object *elm_flipselector_add(Evas_Object *parent);
70 * Programmatically select the next item of a flip selector widget
72 * @param obj The flipselector object
74 * @note The selection will be animated. Also, if it reaches the
75 * end of its list of member items, it will continue with the first
78 * @ingroup Flipselector
80 EAPI void elm_flipselector_flip_next(Evas_Object *obj);
83 * Programmatically select the previous item of a flip selector
86 * @param obj The flipselector object
88 * @note The selection will be animated. Also, if it reaches the
89 * beginning of its list of member items, it will continue with the
92 * @ingroup Flipselector
94 EAPI void elm_flipselector_flip_prev(Evas_Object *obj);
97 * Append a (text) item to a flip selector widget
99 * @param obj The flipselector object
100 * @param label The (text) label of the new item
101 * @param func Convenience callback function to take place when
103 * @param data Data passed to @p func, above
104 * @return A handle to the item added or @c NULL, on errors
106 * The widget's list of labels to show will be appended with the
107 * given value. If the user wishes so, a callback function pointer
108 * can be passed, which will get called when this same item is
111 * @note The current selection @b won't be modified by appending an
112 * element to the list.
114 * @note The maximum length of the text label is going to be
115 * determined <b>by the widget's theme</b>. Strings larger than
116 * that value are going to be @b truncated.
118 * @ingroup Flipselector
120 EAPI Elm_Object_Item *elm_flipselector_item_append(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data);
123 * Prepend a (text) item to a flip selector widget
125 * @param obj The flipselector object
126 * @param label The (text) label of the new item
127 * @param func Convenience callback function to take place when
129 * @param data Data passed to @p func, above
130 * @return A handle to the item added or @c NULL, on errors
132 * The widget's list of labels to show will be prepended with the
133 * given value. If the user wishes so, a callback function pointer
134 * can be passed, which will get called when this same item is
137 * @note The current selection @b won't be modified by prepending
138 * an element to the list.
140 * @note The maximum length of the text label is going to be
141 * determined <b>by the widget's theme</b>. Strings larger than
142 * that value are going to be @b truncated.
144 * @ingroup Flipselector
146 EAPI Elm_Object_Item *elm_flipselector_item_prepend(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data);
149 * Get the internal list of items in a given flip selector widget.
151 * @param obj The flipselector object
152 * @return The list of items (#Elm_Object_Item as data) or
155 * This list is @b not to be modified in any way and must not be
156 * freed. Use the list members with functions like
157 * elm_object_item_text_set(),
158 * elm_object_item_text_get(),
159 * elm_object_item_del(),
160 * elm_flipselector_item_selected_get(),
161 * elm_flipselector_item_selected_set().
163 * @warning This list is only valid until @p obj object's internal
164 * items list is changed. It should be fetched again with another
165 * call to this function when changes happen.
167 * @ingroup Flipselector
169 EAPI const Eina_List *elm_flipselector_items_get(const Evas_Object *obj);
172 * Get the first item in the given flip selector widget's list of
175 * @param obj The flipselector object
176 * @return The first item or @c NULL, if it has no items (and on
179 * @see elm_flipselector_item_append()
180 * @see elm_flipselector_last_item_get()
182 * @ingroup Flipselector
184 EAPI Elm_Object_Item *elm_flipselector_first_item_get(const Evas_Object *obj);
187 * Get the last item in the given flip selector widget's list of
190 * @param obj The flipselector object
191 * @return The last item or @c NULL, if it has no items (and on
194 * @see elm_flipselector_item_prepend()
195 * @see elm_flipselector_first_item_get()
197 * @ingroup Flipselector
199 EAPI Elm_Object_Item *elm_flipselector_last_item_get(const Evas_Object *obj);
202 * Get the currently selected item in a flip selector widget.
204 * @param obj The flipselector object
205 * @return The selected item or @c NULL, if the widget has no items
210 >>>>>>> remotes/origin/upstream
212 * @ingroup Flipselector
214 EAPI Elm_Object_Item *elm_flipselector_selected_item_get(const Evas_Object *obj);
217 * Set whether a given flip selector widget's item should be the
218 * currently selected one.
220 * @param it The flip selector item
221 * @param selected @c EINA_TRUE to select it, @c EINA_FALSE to unselect.
223 * This sets whether @p item is or not the selected (thus, under
225 * display) one. If @p item is different than one under display,
227 * display) one. If @p item is different than the one under display,
228 >>>>>>> remotes/origin/upstream
229 * the latter will be unselected. If the @p item is set to be
230 * unselected, on the other hand, the @b first item in the widget's
231 * internal members list will be the new selected one.
233 * @see elm_flipselector_item_selected_get()
235 * @ingroup Flipselector
237 EAPI void elm_flipselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
240 * Get whether a given flip selector widget's item is the currently
243 * @param it The flip selector item
244 * @return @c EINA_TRUE, if it's selected, @c EINA_FALSE otherwise
247 * @see elm_flipselector_item_selected_set()
249 * @ingroup Flipselector
252 EAPI Eina_Bool elm_flipselector_item_selected_get(const Elm_Object_Item *it);
255 * Gets the item before @p item in a flip selector widget's
256 * internal list of items.
258 * @param it The item to fetch previous from
259 * @return The item before the @p item, in its parent's list. If
260 * there is no previous item for @p item or there's an
261 * error, @c NULL is returned.
263 EAPI Eina_Bool elm_flipselector_item_selected_get(const Elm_Object_Item *it);
266 * Gets the item before @p item in a flip selector widget's internal list of
269 * @param it The item to fetch previous from
270 * @return The item before the @p item, in its parent's list. If there is no
271 * previous item for @p item or there's an error, @c NULL is returned.
272 >>>>>>> remotes/origin/upstream
274 * @see elm_flipselector_item_next_get()
276 * @ingroup Flipselector
279 EAPI Elm_Object_Item *elm_flipselector_item_prev_get(Elm_Object_Item *it);
281 EAPI Elm_Object_Item *elm_flipselector_item_prev_get(const Elm_Object_Item *it);
282 >>>>>>> remotes/origin/upstream
285 * Gets the item after @p item in a flip selector widget's
286 * internal list of items.
288 * @param it The item to fetch next from
290 * @return The item after the @p item, in its parent's list. If
291 * there is no next item for @p item or there's an
292 * error, @c NULL is returned.
294 * @see elm_flipselector_item_next_get()
296 * @ingroup Flipselector
298 EAPI Elm_Object_Item *elm_flipselector_item_next_get(Elm_Object_Item *it);
301 * Set the interval on time updates for an user mouse button hold
303 * @return The item after the @p item, in its parent's list. If there is no next
304 * item for @p item or there's an error, @c NULL is returned.
306 * @see elm_flipselector_item_prev_get()
308 * @ingroup Flipselector
310 EAPI Elm_Object_Item *elm_flipselector_item_next_get(const Elm_Object_Item *it);
313 * Set the interval on time updates for a user mouse button hold
314 >>>>>>> remotes/origin/upstream
315 * on a flip selector widget.
317 * @param obj The flip selector object
318 * @param interval The (first) interval value in seconds
320 * This interval value is @b decreased while the user holds the
322 * mouse pointer either flipping up or flipping doww a given flip
324 * mouse pointer either flipping up or flipping down a given flip
325 >>>>>>> remotes/origin/upstream
328 * This helps the user to get to a given item distant from the
329 * current one easier/faster, as it will start to flip quicker and
330 * quicker on mouse button holds.
332 * The calculation for the next flip interval value, starting from
333 * the one set with this call, is the previous interval divided by
334 * 1.05, so it decreases a little bit.
336 * The default starting interval value for automatic flips is
340 * @see elm_flipselector_interval_get()
342 * @ingroup Flipselector
344 EAPI void elm_flipselector_interval_set(Evas_Object *obj, double interval);
346 * @see elm_flipselector_first_interval_get()
348 * @ingroup Flipselector
350 EAPI void elm_flipselector_first_interval_set(Evas_Object *obj, double interval);
351 >>>>>>> remotes/origin/upstream
354 * Get the interval on time updates for an user mouse button hold
355 * on a flip selector widget.
357 * @param obj The flip selector object
358 * @return The (first) interval value, in seconds, set on it
361 * @see elm_flipselector_interval_set() for more details
363 * @ingroup Flipselector
365 EAPI double elm_flipselector_interval_get(const Evas_Object *obj);
367 * @see elm_flipselector_first_interval_set() for more details
369 * @ingroup Flipselector
371 EAPI double elm_flipselector_first_interval_get(const Evas_Object *obj);
373 >>>>>>> remotes/origin/upstream