- Elementary
- Main
- Authors
- Examples
- Files
- Pages
- Types
- Modules

Macros | Functions
Flip Selector

## Macros
#define | elm_obj_flipselector_flip_next() ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FLIP_NEXT)
#define | elm_obj_flipselector_flip_prev() ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FLIP_PREV)
#define | elm_obj_flipselector_item_append(label, func, data, ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(flipselector_func_type, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Flipselector_Item **, ret)
#define | elm_obj_flipselector_item_prepend(label, func, data, ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEM_PREPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(flipselector_func_type, func), EO_TYPECHECK(void *, data), EO_TYPECHECK(Elm_Flipselector_Item **, ret)
#define | elm_obj_flipselector_items_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret)
#define | elm_obj_flipselector_first_item_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_flipselector_last_item_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_LAST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_flipselector_selected_item_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_SELECTED_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_flipselector_first_interval_set(interval) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_INTERVAL_SET), EO_TYPECHECK(double, interval)
#define | elm_obj_flipselector_first_interval_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_INTERVAL_GET), EO_TYPECHECK(double *, ret)

## Functions
void | elm_flipselector_item_selected_set (Elm_Object_Item *it, Eina_Bool selected)
| Set whether a given flip selector widget's item should be the currently selected one. More...
Eina_Bool | elm_flipselector_item_selected_get (const Elm_Object_Item *it)
| Get whether a given flip selector widget's item is the currently selected one. More...
Elm_Object_Item * | elm_flipselector_item_prev_get (const Elm_Object_Item *it)
| Get the item before `item` in a flip selector widget's internal list of items. More...
Elm_Object_Item * | elm_flipselector_item_next_get (const Elm_Object_Item *it)
| Get the item after `item` in a flip selector widget's internal list of items. More...
Evas_Object * | elm_flipselector_add (Evas_Object *parent)
| Add a new flip selector widget to the given parent Elementary (container) widget. More...
void | elm_flipselector_flip_next (Evas_Object *obj)
| Programmatically select the next item of a flip selector widget. More...
void | elm_flipselector_flip_prev (Evas_Object *obj)
| Programmatically select the previous item of a flip selector widget. More...
Elm_Object_Item * | elm_flipselector_item_append (Evas_Object *obj, const char *label, Evas_Smart_Cb func, const void *data)
| Append a (text) item to a flip selector widget. More...
Elm_Object_Item * | elm_flipselector_item_prepend (Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data)
| Prepend a (text) item to a flip selector widget. More...
const Eina_List * | elm_flipselector_items_get (const Evas_Object *obj)
| Get the internal list of items in a given flip selector widget. More...
Elm_Object_Item * | elm_flipselector_first_item_get (const Evas_Object *obj)
| Get the first item in the given flip selector widget's list of items. More...
Elm_Object_Item * | elm_flipselector_last_item_get (const Evas_Object *obj)
| Get the last item in the given flip selector widget's list of items. More...
Elm_Object_Item * | elm_flipselector_selected_item_get (const Evas_Object *obj)
| Get the currently selected item in a flip selector widget. More...
void | elm_flipselector_first_interval_set (Evas_Object *obj, double interval)
| Set the interval on time updates for a user mouse button hold on a flip selector widget. More...
double | elm_flipselector_first_interval_get (const Evas_Object *obj)
| Get the interval on time updates for an user mouse button hold on a flip selector widget. More...

## Detailed Description

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)

Available styles for it:

- `"default"`

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

- "default" - label of the flipselector item

Supported elm_object common APIs.

- elm_object_disabled_set
- elm_object_disabled_get

Supported elm_object_item common APIs.

- elm_object_item_del
- elm_object_item_part_text_set
- elm_object_item_part_text_get
- elm_object_item_signal_emit

Here is an example on its usage:

- Flip selector widget example

## Macro Definition Documentation

#define elm_obj_flipselector_first_interval_get | ( |  | ret | ) | ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_INTERVAL_GET), EO_TYPECHECK(double *, ret)

Since
  1.8

Get the interval on time updates for an user mouse button hold

Parameters

  [out] | ret |

See Also
  elm_flipselector_first_interval_get

Referenced by elm_flipselector_first_interval_get().

#define elm_obj_flipselector_first_interval_set | ( |  | interval | ) | ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_INTERVAL_SET), EO_TYPECHECK(double, interval)

Since
  1.8

Set the interval on time updates for a user mouse button hold

Parameters

  [in] | interval |

See Also
  elm_flipselector_first_interval_set

Referenced by elm_flipselector_first_interval_set().

#define elm_obj_flipselector_first_item_get | ( |  | ret | ) | ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

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

Parameters

  [out] | ret |

See Also
  elm_flipselector_first_item_get

Referenced by elm_flipselector_first_item_get().

#define elm_obj_flipselector_flip_next | ( |  | ) | ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FLIP_NEXT)

Since
  1.8

Programmatically select the next item of a flip selector widget

See Also
  elm_flipselector_flip_next

Referenced by elm_flipselector_flip_next().

#define elm_obj_flipselector_flip_prev | ( |  | ) | ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FLIP_PREV)

Since
  1.8

Programmatically select the previous item of a flip selector

See Also
  elm_flipselector_flip_prev

Referenced by elm_flipselector_flip_prev().

#define elm_obj_flipselector_item_append | ( |  | label,
|  |  | func,
|  |  | data,
|  |  | ret
| ) |  | ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(flipselector_func_type, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Flipselector_Item **, ret)

Since
  1.8

Append a (text) item to a flip selector widget

Parameters

  [in] | label |
  [in] | func |
  [in] | data |
  [out] | ret |

See Also
  elm_flipselector_item_append

#define elm_obj_flipselector_item_prepend | ( |  | label,
|  |  | func,
|  |  | data,
|  |  | ret
| ) |  | ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEM_PREPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(flipselector_func_type, func), EO_TYPECHECK(void *, data), EO_TYPECHECK(Elm_Flipselector_Item **, ret)

Since
  1.8

Prepend a (text) item to a flip selector widget

Parameters

  [in] | label |
  [in] | func |
  [in] | data |
  [out] | ret |

See Also
  elm_flipselector_item_prepend

#define elm_obj_flipselector_items_get | ( |  | ret | ) | ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret)

Since
  1.8

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

Parameters

  [out] | ret |

See Also
  elm_flipselector_items_get

Referenced by elm_flipselector_items_get().

#define elm_obj_flipselector_last_item_get | ( |  | ret | ) | ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_LAST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

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

Parameters

  [out] | ret |

See Also
  elm_flipselector_last_item_get

Referenced by elm_flipselector_last_item_get().

#define elm_obj_flipselector_selected_item_get | ( |  | ret | ) | ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_SELECTED_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Get the currently selected item in a flip selector widget.

Parameters

  [out] | ret |

See Also
  elm_flipselector_selected_item_get

Referenced by elm_flipselector_selected_item_get().

## Function Documentation

Evas_Object* elm_flipselector_add | ( | Evas_Object * | parent | ) |

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

Parameters

  parent | The parent object

Returns
  a new flip selector widget handle or `NULL`, on errors

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

double elm_flipselector_first_interval_get | ( | const Evas_Object * | obj | ) |

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

Parameters

  obj | The flip selector object

Returns
  The (first) interval value, in seconds, set on it

See Also
  elm_flipselector_first_interval_set() for more details

References elm_obj_flipselector_first_interval_get.

void elm_flipselector_first_interval_set | ( | Evas_Object * | obj,
|  | double | interval
| ) |  |

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

Parameters

  obj | The flip selector object
  interval | The (first) interval value in seconds

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()

References elm_obj_flipselector_first_interval_set.

Elm_Object_Item* elm_flipselector_first_item_get | ( | const Evas_Object * | obj | ) |

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

Parameters

  obj | The flipselector object

Returns
  The first item or `NULL`, if it has no items (and on errors)

See Also
  elm_flipselector_item_append()
  elm_flipselector_last_item_get()

References elm_obj_flipselector_first_item_get.

void elm_flipselector_flip_next | ( | Evas_Object * | obj | ) |

Programmatically select the next item of a flip selector widget.

Parameters

  obj | The flipselector object

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.

References elm_obj_flipselector_flip_next.

void elm_flipselector_flip_prev | ( | Evas_Object * | obj | ) |

Programmatically select the previous item of a flip selector widget.

Parameters

  obj | The flipselector object

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.

References elm_obj_flipselector_flip_prev.

Elm_Object_Item* elm_flipselector_item_append | ( | Evas_Object * | obj,
|  | const char * | label,
|  | Evas_Smart_Cb | func,
|  | const void * | data
| ) |  |

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

Parameters

  obj | The flipselector object
  label | The (text) label of the new item
  func | Convenience callback function to take place when item is selected
  data | Data passed to `func`, above

Returns
  A handle to the item added or `NULL`, on errors

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.

Examples:
  flipselector_example.c.

Elm_Object_Item* elm_flipselector_item_next_get | ( | const Elm_Object_Item * | it | ) |

Get the item after `item` in a flip selector widget's internal list of items.

Parameters

  it | The item to fetch next from

Returns
  The item after the `item`, in its parent's list. If there is no next item for `item` or there's an error, `NULL` is returned.

See Also
  elm_flipselector_item_prev_get()

Elm_Object_Item* elm_flipselector_item_prepend | ( | Evas_Object * | obj,
|  | const char * | label,
|  | Evas_Smart_Cb | func,
|  | void * | data
| ) |  |

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

Parameters

  obj | The flipselector object
  label | The (text) label of the new item
  func | Convenience callback function to take place when item is selected
  data | Data passed to `func`, above

Returns
  A handle to the item added or `NULL`, on errors

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.

Elm_Object_Item* elm_flipselector_item_prev_get | ( | const Elm_Object_Item * | it | ) |

Get the item before `item` in a flip selector widget's internal list of items.

Parameters

  it | The item to fetch previous from

Returns
  The item before the `item`, in its parent's list. If there is no previous item for `item` or there's an error, `NULL` is returned.

See Also
  elm_flipselector_item_next_get()

Eina_Bool elm_flipselector_item_selected_get | ( | const Elm_Object_Item * | it | ) |

Get whether a given flip selector widget's item is the currently selected one.

Parameters

  it | The flip selector item

Returns
  `EINA_TRUE`, if it's selected, `EINA_FALSE` otherwise (or on errors).

See Also
  elm_flipselector_item_selected_set()

void elm_flipselector_item_selected_set | ( | Elm_Object_Item * | it,
|  | Eina_Bool | selected
| ) |  |

Set whether a given flip selector widget's item should be the currently selected one.

Parameters

  it | The flip selector item
  selected | `EINA_TRUE` to select it, `EINA_FALSE` to unselect.

This sets whether `item` is or not the selected (thus, under display) one. If `item` is different than the one under display, the latter will be unselected. If the `item` is set to be unselected, on the other hand, the first item in the widget's internal members list will be the new selected one.

See Also
  elm_flipselector_item_selected_get()

const Eina_List* elm_flipselector_items_get | ( | const Evas_Object * | obj | ) |

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

Parameters

  obj | The flipselector object

Returns
  The list of items (Elm_Object_Item as data) or `NULL` on errors.

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.

References elm_obj_flipselector_items_get.

Elm_Object_Item* elm_flipselector_last_item_get | ( | const Evas_Object * | obj | ) |

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

Parameters

  obj | The flipselector object

Returns
  The last item or `NULL`, if it has no items (and on errors)

See Also
  elm_flipselector_item_prepend()
  elm_flipselector_first_item_get()

References elm_obj_flipselector_last_item_get.

Elm_Object_Item* elm_flipselector_selected_item_get | ( | const Evas_Object * | obj | ) |

Get the currently selected item in a flip selector widget.

Parameters

  obj | The flipselector object

Returns
  The selected item or `NULL`, if the widget has no items (and on errors)

References elm_obj_flipselector_selected_item_get.

Copyright ©2000-2014 Enlightenment.org - Samsung Electronics supports the EFL Documentation Project - Generated Wed Jan 8 2014 20:51:13