Tizen Native API  5.0
Flip Selector

flipselector_inheritance_tree.png

A flip selector is a widget to show a set of text items, one at a time, with the same sheet switching style as the clock widget, when one changes the current displaying sheet (thus, the "flip" in the name).

User clicks to flip sheets which are held for some time will make the flip selector to flip continuously and automatically for the user. The interval between flips will keep growing in time, so that it helps the user to reach an item which is distant from the current selection.

This widget inherits from the Layout one, so that all the functions acting on it also work for flip selector objects.

This widget emits the following signals, besides the ones sent from Layout:

  • "selected" - when the widget's selected text item is changed. The event_info parameter is the item that was selected.
  • "overflowed" - when the widget's current selection is changed from the first item in its list to the last
  • "underflowed" - when the widget's current selection is changed from the last item in its list to the first
  • "focused" - When the flip selector has received focus. (since 1.8)
  • "unfocused" - When the flip selector has lost focus. (since 1.8)
  • "language,changed" - the program's language changed (since 1.9)

Available styles for it:

  • "default"

Default text parts of the flipselector items that you can use for are:

  • "default" - A label of the flipselector item

Supported elm_object common APIs.

Supported elm_object_item common APIs.

Here is an example on its usage:

Functions

const Eina_Listelm_flipselector_items_get (const Elm_Flipselector *obj)
 Get the internal list of items in a given flip selector widget.
Elm_Widget_Itemelm_flipselector_first_item_get (const Elm_Flipselector *obj)
 Get the first item in the given flip selector widget's list of items.
Elm_Widget_Itemelm_flipselector_last_item_get (const Elm_Flipselector *obj)
 Get the last item in the given flip selector widget's list of items.
Elm_Widget_Itemelm_flipselector_selected_item_get (const Elm_Flipselector *obj)
 Get the currently selected item in a flip selector widget.
void elm_flipselector_first_interval_set (Elm_Flipselector *obj, double interval)
 Set the interval on time updates for a user mouse button hold on a flip selector widget.
double elm_flipselector_first_interval_get (const Elm_Flipselector *obj)
 Get the interval on time updates for an user mouse button hold on a flip selector widget.
Elm_Widget_Itemelm_flipselector_item_prepend (Elm_Flipselector *obj, const char *label, Evas_Smart_Cb func, void *data)
 Prepend a (text) item to a flip selector widget.
void elm_flipselector_flip_next (Elm_Flipselector *obj)
 Programmatically select the next item of a flip selector widget.
Elm_Widget_Itemelm_flipselector_item_append (Elm_Flipselector *obj, const char *label, Evas_Smart_Cb func, const void *data)
 Append a (text) item to a flip selector widget.
void elm_flipselector_flip_prev (Elm_Flipselector *obj)
 Programmatically select the previous item of a flip selector widget.
Evas_Objectelm_flipselector_add (Evas_Object *parent)

Function Documentation

Add a new flip selector widget to the given parent Elementary (container) widget

Parameters:
parentThe parent object
Returns:
a new flip selector widget handle or NULL, on errors

This function inserts a new flip selector widget on the canvas.

Since :
2.4
Examples:
flipselector_example.c.
double elm_flipselector_first_interval_get ( const Elm_Flipselector *  obj)

Get the interval on time updates for an user mouse button hold on a flip selector widget.

See also elm_flipselector_first_interval_set for more details.

Parameters:
[in]objThe object.
Returns:
The (first) interval value in seconds.
Since :
2.4
void elm_flipselector_first_interval_set ( Elm_Flipselector *  obj,
double  interval 
)

Set the interval on time updates for a user mouse button hold on a flip selector widget.

This interval value is decreased while the user holds the mouse pointer either flipping up or flipping down a given flip selector.

This helps the user to get to a given item distant from the current one easier/faster, as it will start to flip quicker and quicker on mouse button holds.

The calculation for the next flip interval value, starting from the one set with this call, is the previous interval divided by 1.05, so it decreases a little bit.

The default starting interval value for automatic flips is 0.85 seconds.

See also elm_flipselector_first_interval_get.

Parameters:
[in]objThe object.
[in]intervalThe (first) interval value in seconds.
Since :
2.4
Elm_Widget_Item* elm_flipselector_first_item_get ( const Elm_Flipselector *  obj)

Get the first item in the given flip selector widget's list of items.

See also elm_flipselector_item_append, elm_flipselector_last_item_get.

Parameters:
[in]objThe object.
Returns:
The first item or null, if it has no items (and on errors).
Since :
2.4
Examples:
flipselector_example.c.
void elm_flipselector_flip_next ( Elm_Flipselector *  obj)

Programmatically select the next item of a flip selector widget.

Note:
The selection will be animated. Also, if it reaches the end of its list of member items, it will continue with the first one onwards.
Parameters:
[in]objThe object.
Since :
2.4
Examples:
flipselector_example.c.
void elm_flipselector_flip_prev ( Elm_Flipselector *  obj)

Programmatically select the previous item of a flip selector widget.

Note:
The selection will be animated. Also, if it reaches the beginning of its list of member items, it will continue with the last one backwards.
Parameters:
[in]objThe object.
Since :
2.4
Examples:
flipselector_example.c.
Elm_Widget_Item* elm_flipselector_item_append ( Elm_Flipselector *  obj,
const char *  label,
Evas_Smart_Cb  func,
const void *  data 
)

Append a (text) item to a flip selector widget.

The widget's list of labels to show will be appended with the given value. If the user wishes so, a callback function pointer can be passed, which will get called when this same item is selected.

Note:
The current selection won't be modified by appending an element to the list.
The maximum length of the text label is going to be determined by the widget's theme. Strings larger than that value are going to be truncated.
Parameters:
[in]objThe object.
[in]labelThe (text) label of the new item.
[in]funcConvenience callback function to take place when item is selected.
[in]dataData passed to func, above.
Returns:
New widget item
Since :
2.4
Examples:
flipselector_example.c.
Elm_Widget_Item* elm_flipselector_item_prepend ( Elm_Flipselector *  obj,
const char *  label,
Evas_Smart_Cb  func,
void *  data 
)

Prepend a (text) item to a flip selector widget.

The widget's list of labels to show will be prepended with the given value. If the user wishes so, a callback function pointer can be passed, which will get called when this same item is selected.

Note:
The current selection won't be modified by prepending an element to the list.
The maximum length of the text label is going to be determined by the widget's theme. Strings larger than that value are going to be truncated.
Parameters:
[in]objThe object.
[in]labelThe (text) label of the new item.
[in]funcConvenience callback function to take place when item is selected.
[in]dataData passed to func, above.
Returns:
New widget item
Since :
2.4
const Eina_List* elm_flipselector_items_get ( const Elm_Flipselector *  obj)

Get the internal list of items in a given flip selector widget.

This list is not to be modified in any way and must not be freed. Use the list members with functions like elm_object_item_text_set, elm_object_item_text_get, elm_object_item_del, elm_flipselector_item_selected_get, elm_flipselector_item_selected_set.

Warning:
This list is only valid until obj object's internal items list is changed. It should be fetched again with another call to this function when changes happen.
Parameters:
[in]objThe object.
Returns:
List of items
Since :
2.4
Elm_Widget_Item* elm_flipselector_last_item_get ( const Elm_Flipselector *  obj)

Get the last item in the given flip selector widget's list of items.

See also elm_flipselector_item_prepend, elm_flipselector_first_item_get.

Parameters:
[in]objThe object.
Returns:
The last item or null, if it has no items (and on errors).
Since :
2.4
Examples:
flipselector_example.c.
Elm_Widget_Item* elm_flipselector_selected_item_get ( const Elm_Flipselector *  obj)

Get the currently selected item in a flip selector widget.

Parameters:
[in]objThe object.
Returns:
The selected item or null, if the widget has no items (and on errors).
Since :
2.4
Examples:
flipselector_example.c.