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

Macros | Functions
Spinner

## Macros
#define | elm_obj_spinner_label_format_set(fmt) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_LABEL_FORMAT_SET), EO_TYPECHECK(const char *, fmt)
#define | elm_obj_spinner_label_format_get(ret) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_LABEL_FORMAT_GET), EO_TYPECHECK(const char **, ret)
#define | elm_obj_spinner_min_max_set(min, max) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_MIN_MAX_SET), EO_TYPECHECK(double, min), EO_TYPECHECK(double, max)
#define | elm_obj_spinner_min_max_get(min, max) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_MIN_MAX_GET), EO_TYPECHECK(double *, min), EO_TYPECHECK(double *, max)
#define | elm_obj_spinner_step_set(step) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_STEP_SET), EO_TYPECHECK(double, step)
#define | elm_obj_spinner_step_get(ret) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_STEP_GET), EO_TYPECHECK(double *, ret)
#define | elm_obj_spinner_value_set(val) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_VALUE_SET), EO_TYPECHECK(double, val)
#define | elm_obj_spinner_value_get(ret) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_VALUE_GET), EO_TYPECHECK(double *, ret)
#define | elm_obj_spinner_wrap_set(wrap) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_WRAP_SET), EO_TYPECHECK(Eina_Bool, wrap)
#define | elm_obj_spinner_wrap_get(ret) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_WRAP_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_spinner_special_value_add(value, label) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_SPECIAL_VALUE_ADD), EO_TYPECHECK(double, value), EO_TYPECHECK(const char *, label)
#define | elm_obj_spinner_editable_set(editable) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_EDITABLE_SET), EO_TYPECHECK(Eina_Bool, editable)
#define | elm_obj_spinner_editable_get(ret) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_EDITABLE_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_spinner_interval_set(interval) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_INTERVAL_SET), EO_TYPECHECK(double, interval)
#define | elm_obj_spinner_interval_get(ret) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_INTERVAL_GET), EO_TYPECHECK(double *, ret)
#define | elm_obj_spinner_base_set(base) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_BASE_SET), EO_TYPECHECK(double, base)
#define | elm_obj_spinner_base_get(ret) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_BASE_GET), EO_TYPECHECK(double *, ret)
#define | elm_obj_spinner_round_set(rnd) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_ROUND_SET), EO_TYPECHECK(int, rnd)
#define | elm_obj_spinner_round_get(ret) ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_ROUND_GET), EO_TYPECHECK(int *, ret)

## Functions
Evas_Object * | elm_spinner_add (Evas_Object *parent)
| Add a new spinner widget to the given parent Elementary (container) object. More...
void | elm_spinner_special_value_del (Evas_Object *obj, double value)
| Delete the special string display in the place of the numerical value. More...
const char * | elm_spinner_special_value_get (Evas_Object *obj, double value)
| Get the special string display in the place of the numerical value. More...
void | elm_spinner_label_format_set (Evas_Object *obj, const char *fmt)
| Set the format string of the displayed label. More...
const char * | elm_spinner_label_format_get (const Evas_Object *obj)
| Get the label format of the spinner. More...
void | elm_spinner_min_max_set (Evas_Object *obj, double min, double max)
| Set the minimum and maximum values for the spinner. More...
void | elm_spinner_min_max_get (const Evas_Object *obj, double *min, double *max)
| Get the minimum and maximum values of the spinner. More...
void | elm_spinner_step_set (Evas_Object *obj, double step)
| Set the step used to increment or decrement the spinner value. More...
double | elm_spinner_step_get (const Evas_Object *obj)
| Get the step used to increment or decrement the spinner value. More...
void | elm_spinner_value_set (Evas_Object *obj, double val)
| Set the value the spinner displays. More...
double | elm_spinner_value_get (const Evas_Object *obj)
| Get the value displayed by the spinner. More...
void | elm_spinner_wrap_set (Evas_Object *obj, Eina_Bool wrap)
| Set whether the spinner should wrap when it reaches its minimum or maximum value. More...
Eina_Bool | elm_spinner_wrap_get (const Evas_Object *obj)
| Get whether the spinner should wrap when it reaches its minimum or maximum value. More...
void | elm_spinner_special_value_add (Evas_Object *obj, double value, const char *label)
| Set a special string to display in the place of the numerical value. More...
void | elm_spinner_editable_set (Evas_Object *obj, Eina_Bool editable)
| Set whether the spinner can be directly edited by the user or not. More...
Eina_Bool | elm_spinner_editable_get (const Evas_Object *obj)
| Get whether the spinner can be directly edited by the user or not. More...
void | elm_spinner_interval_set (Evas_Object *obj, double interval)
| Set the interval on time updates for an user mouse button hold on spinner widgets' arrows. More...
double | elm_spinner_interval_get (const Evas_Object *obj)
| Get the interval on time updates for an user mouse button hold on spinner widgets' arrows. More...
void | elm_spinner_base_set (Evas_Object *obj, double base)
| Set the base for rounding. More...
double | elm_spinner_base_get (const Evas_Object *obj)
| Get the base for rounding. More...
void | elm_spinner_round_set (Evas_Object *obj, int rnd)
| Set the round value for rounding. More...
int | elm_spinner_round_get (const Evas_Object *obj)
| Get the round value for rounding. More...

## Detailed Description

A spinner is a widget which allows the user to increase or decrease numeric values using arrow buttons, or edit values directly, clicking over it and typing the new value.

By default the spinner will not wrap and has a label of "%.0f" (just showing the integer value of the double).

A spinner has a label that is formatted with floating point values and thus accepts a printf-style format string, like “%1.2f units”.

It also allows specific values to be replaced by pre-defined labels.

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

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

- `"changed"` - Whenever the spinner value is changed.
- `"delay,changed"` - A short time after the value is changed by the user. This will be called only when the user stops dragging for a very short period or when they release their finger/mouse, so it avoids possibly expensive reactions to the value change.
- `"language,changed"` - the program's language changed
- `"focused"` - When the spinner has received focus. (since 1.8)
- `"unfocused"` - When the spinner has lost focus. (since 1.8)
- `"spinner,drag,start"` - When dragging has started. (since 1.8)
- `"spinner,drag,stop"` - When dragging has stopped. (since 1.8)

Available styles for it:

- `"default"`;
- `"vertical"`: up/down buttons at the right side and text left aligned.

Supported elm_object common APIs.

- elm_object_signal_emit
- elm_object_signal_callback_add
- elm_object_signal_callback_del
- elm_object_disabled_set
- elm_object_disabled_get

Here is an example on its usage: Spinner widget example

## Macro Definition Documentation

#define elm_obj_spinner_base_get | ( |  | ret | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_BASE_GET), EO_TYPECHECK(double *, ret)

Since
  1.8

Get the base for rounding

Parameters

  [out] | ret |

See Also
  elm_spinner_base_get

Referenced by elm_spinner_base_get().

#define elm_obj_spinner_base_set | ( |  | base | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_BASE_SET), EO_TYPECHECK(double, base)

Since
  1.8

Set the base for rounding

Parameters

  [in] | base |

See Also
  elm_spinner_base_set

Referenced by elm_spinner_base_set().

#define elm_obj_spinner_editable_get | ( |  | ret | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_EDITABLE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get whether the spinner can be directly edited by the user or not.

Parameters

  [out] | ret |

See Also
  elm_spinner_editable_get

Referenced by elm_spinner_editable_get().

#define elm_obj_spinner_editable_set | ( |  | editable | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_EDITABLE_SET), EO_TYPECHECK(Eina_Bool, editable)

Since
  1.8

Set whether the spinner can be directly edited by the user or not.

Parameters

  [in] | editable |

See Also
  elm_spinner_editable_set

Referenced by elm_spinner_editable_set().

#define elm_obj_spinner_interval_get | ( |  | ret | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_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_spinner_interval_get

Referenced by elm_spinner_interval_get().

#define elm_obj_spinner_interval_set | ( |  | interval | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_INTERVAL_SET), EO_TYPECHECK(double, interval)

Since
  1.8

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

Parameters

  [in] | interval |

See Also
  elm_spinner_interval_set

Referenced by elm_spinner_interval_set().

#define elm_obj_spinner_label_format_get | ( |  | ret | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_LABEL_FORMAT_GET), EO_TYPECHECK(const char **, ret)

Since
  1.8

Get the label format of the spinner.

Parameters

  [out] | ret |

See Also
  elm_spinner_label_format_get

Referenced by elm_spinner_label_format_get().

#define elm_obj_spinner_label_format_set | ( |  | fmt | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_LABEL_FORMAT_SET), EO_TYPECHECK(const char *, fmt)

Since
  1.8

Set the format string of the displayed label.

Parameters

  [in] | fmt |

See Also
  elm_spinner_label_format_set

Referenced by elm_spinner_label_format_set().

#define elm_obj_spinner_min_max_get | ( |  | min,
|  |  | max
| ) |  | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_MIN_MAX_GET), EO_TYPECHECK(double *, min), EO_TYPECHECK(double *, max)

Since
  1.8

Get the minimum and maximum values of the spinner.

Parameters

  [out] | min |
  [out] | max |

See Also
  elm_spinner_min_max_get

Referenced by elm_spinner_min_max_get().

#define elm_obj_spinner_min_max_set | ( |  | min,
|  |  | max
| ) |  | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_MIN_MAX_SET), EO_TYPECHECK(double, min), EO_TYPECHECK(double, max)

Since
  1.8

Set the minimum and maximum values for the spinner.

Parameters

  [in] | min |
  [in] | max |

See Also
  elm_spinner_min_max_set

Referenced by elm_spinner_min_max_set().

#define elm_obj_spinner_round_get | ( |  | ret | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_ROUND_GET), EO_TYPECHECK(int *, ret)

Since
  1.8

Get the round value for rounding

Parameters

  [out] | ret |

See Also
  elm_spinner_round_get

Referenced by elm_spinner_round_get().

#define elm_obj_spinner_round_set | ( |  | rnd | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_ROUND_SET), EO_TYPECHECK(int, rnd)

Since
  1.8

Set the round value for rounding

Parameters

  [in] | rnd |

See Also
  elm_spinner_round_set

Referenced by elm_spinner_round_set().

#define elm_obj_spinner_special_value_add | ( |  | value,
|  |  | label
| ) |  | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_SPECIAL_VALUE_ADD), EO_TYPECHECK(double, value), EO_TYPECHECK(const char *, label)

Since
  1.8

Set a special string to display in the place of the numerical value.

Parameters

  [in] | value |
  [in] | label |

See Also
  elm_spinner_special_value_add

Referenced by elm_spinner_special_value_add().

#define elm_obj_spinner_step_get | ( |  | ret | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_STEP_GET), EO_TYPECHECK(double *, ret)

Since
  1.8

Get the step used to increment or decrement the spinner value.

Parameters

  [out] | ret |

See Also
  elm_spinner_step_get

Referenced by elm_spinner_step_get().

#define elm_obj_spinner_step_set | ( |  | step | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_STEP_SET), EO_TYPECHECK(double, step)

Since
  1.8

Set the step used to increment or decrement the spinner value.

Parameters

  [in] | step |

See Also
  elm_spinner_step_set

Referenced by elm_spinner_step_set().

#define elm_obj_spinner_value_get | ( |  | ret | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_VALUE_GET), EO_TYPECHECK(double *, ret)

Since
  1.8

Get the value displayed by the spinner.

Parameters

  [out] | ret |

See Also
  elm_spinner_value_get

Referenced by elm_spinner_value_get().

#define elm_obj_spinner_value_set | ( |  | val | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_VALUE_SET), EO_TYPECHECK(double, val)

Since
  1.8

Set the value the spinner displays.

Parameters

  [in] | val |

See Also
  elm_spinner_value_set

Referenced by elm_spinner_value_set().

#define elm_obj_spinner_wrap_get | ( |  | ret | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_WRAP_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get whether the spinner should wrap when it reaches its

Parameters

  [out] | ret |

See Also
  elm_spinner_wrap_get

Referenced by elm_spinner_wrap_get().

#define elm_obj_spinner_wrap_set | ( |  | wrap | ) | ELM_OBJ_SPINNER_ID(ELM_OBJ_SPINNER_SUB_ID_WRAP_SET), EO_TYPECHECK(Eina_Bool, wrap)

Since
  1.8

Set whether the spinner should wrap when it reaches its

Parameters

  [in] | wrap |

See Also
  elm_spinner_wrap_set

Referenced by elm_spinner_wrap_set().

## Function Documentation

Evas_Object* elm_spinner_add | ( | Evas_Object * | parent | ) |

Add a new spinner widget to the given parent Elementary (container) object.

Parameters

  parent | The parent object.

Returns
  a new spinner widget handle or `NULL`, on errors.

This function inserts a new spinner widget on the canvas.

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

Get the base for rounding.

Parameters

  obj | The spinner object

Returns
  The base rounding value

This returns the base for rounding.

See Also
  elm_spinner_round_set() too.
  elm_spinner_base_set() too.

References elm_obj_spinner_base_get.

void elm_spinner_base_set | ( | Evas_Object * | obj,
|  | double | base
| ) |  |

Set the base for rounding.

Parameters

  obj | The spinner object
  base | The base value

Rounding works as follows:

rounded_val = base + (double)(((value - base) / round) * round)

Where rounded_val, value and base are doubles, and round is an integer.

This means that things will be rounded to increments (or decrements) of "round" starting from value `base`. The default base for rounding is 0.

Example: round = 3, base = 2 Values: ..., -2, 0, 2, 5, 8, 11, 14, ...

Example: round = 2, base = 5.5 Values: ..., -0.5, 1.5, 3.5, 5.5, 7.5, 9.5, 11.5, ...

See Also
  elm_spinner_round_get()
  elm_spinner_base_get() too.

References elm_obj_spinner_base_set.

Eina_Bool elm_spinner_editable_get | ( | const Evas_Object * | obj | ) |

Get whether the spinner can be directly edited by the user or not.

Parameters

  obj | The spinner object.

Returns
  `EINA_TRUE` means edition is enabled. `EINA_FALSE` indicates it's disabled. If `obj` is `NULL`, `EINA_FALSE` is returned.

See Also
  elm_spinner_editable_set() for details.

References elm_obj_spinner_editable_get.

void elm_spinner_editable_set | ( | Evas_Object * | obj,
|  | Eina_Bool | editable
| ) |  |

Set whether the spinner can be directly edited by the user or not.

Parameters

  obj | The spinner object.
  editable | `EINA_TRUE` to allow users to edit it or `EINA_FALSE` to don't allow users to edit it directly.

Spinner objects can have edition disabled, in which state they will be changed only by arrows. Useful for contexts where you don't want your users to interact with it writing the value. Specially when using special values, the user can see real value instead of special label on edition.

It's enabled by default.

See Also
  elm_spinner_editable_get()

References elm_obj_spinner_editable_set.

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

Get the interval on time updates for an user mouse button hold on spinner widgets' arrows.

Parameters

  obj | The spinner object.

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

See Also
  elm_spinner_interval_set() for more details.

References elm_obj_spinner_interval_get.

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

Set the interval on time updates for an user mouse button hold on spinner widgets' arrows.

Parameters

  obj | The spinner object.
  interval | The (first) interval value in seconds.

This interval value is decreased while the user holds the mouse pointer either incrementing or decrementing spinner's value.

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

The calculation for the next change 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 changes is `0.85` seconds.

See Also
  elm_spinner_interval_get()

References elm_obj_spinner_interval_set.

const char* elm_spinner_label_format_get | ( | const Evas_Object * | obj | ) |

Get the label format of the spinner.

Parameters

  obj | The spinner object.

Returns
  The text label format string in UTF-8.

See Also
  elm_spinner_label_format_set() for details.

References elm_obj_spinner_label_format_get.

void elm_spinner_label_format_set | ( | Evas_Object * | obj,
|  | const char * | fmt
| ) |  |

Set the format string of the displayed label.

Parameters

  obj | The spinner object.
  fmt | The format string for the label display.

If `NULL`, this sets the format to "%.0f". If not it sets the format string for the label text. The label text is provided a floating point value, so the label text can display up to 1 floating point value. Note that this is optional.

Use a format string such as "%1.2f meters" for example, and it will display values like: "3.14 meters" for a value equal to 3.14159.

Default is "%0.f".

See Also
  elm_spinner_label_format_get()

References elm_obj_spinner_label_format_set.

void elm_spinner_min_max_get | ( | const Evas_Object * | obj,
|  | double * | min,
|  | double * | max
| ) |  |

Get the minimum and maximum values of the spinner.

Parameters

  obj | The spinner object.
  min | Pointer to store the minimum value.
  max | Pointer to store the maximum value.

Note
  If only one value is needed, the other pointer can be passed as `NULL`.

See Also
  elm_spinner_min_max_set() for details.

References elm_obj_spinner_min_max_get.

void elm_spinner_min_max_set | ( | Evas_Object * | obj,
|  | double | min,
|  | double | max
| ) |  |

Set the minimum and maximum values for the spinner.

Parameters

  obj | The spinner object.
  min | The minimum value.
  max | The maximum value.

Define the allowed range of values to be selected by the user.

If actual value is less than `min`, it will be updated to `min`. If it is bigger then `max`, will be updated to `max`. Actual value can be get with elm_spinner_value_get().

By default, min is equal to 0, and max is equal to 100.

Warning
  Maximum must be greater than minimum.

See Also
  elm_spinner_min_max_get()

References elm_obj_spinner_min_max_set.

int elm_spinner_round_get | ( | const Evas_Object * | obj | ) |

Get the round value for rounding.

Parameters

  obj | The spinner object

Returns
  The rounding value

This returns the round value for rounding.

See Also
  elm_spinner_round_set() too.
  elm_spinner_base_set() too.

References elm_obj_spinner_round_get.

void elm_spinner_round_set | ( | Evas_Object * | obj,
|  | int | rnd
| ) |  |

Set the round value for rounding.

Parameters

  obj | The spinner object
  rnd | The rounding value

Sets the rounding value used for value rounding in the spinner.

See Also
  elm_spinner_round_get()
  elm_spinner_base_set()

References elm_obj_spinner_round_set.

void elm_spinner_special_value_add | ( | Evas_Object * | obj,
|  | double | value,
|  | const char * | label
| ) |  |

Set a special string to display in the place of the numerical value.

Parameters

  obj | The spinner object.
  value | The value to be replaced.
  label | The label to be used.

It's useful for cases when a user should select an item that is better indicated by a label than a value. For example, weekdays or months.

E.g.:

sp = elm_spinner_add(win);
elm_spinner_min_max_set(sp, 1, 3);
elm_spinner_special_value_add(sp, 1, "January");
elm_spinner_special_value_add(sp, 2, "February");
elm_spinner_special_value_add(sp, 3, "March");
evas_object_show(sp);

Note
  If another label was previously set to `value`, it will be replaced by the new label.

See Also
  elm_spinner_special_value_get().
  elm_spinner_special_value_del().

References elm_obj_spinner_special_value_add.

void elm_spinner_special_value_del | ( | Evas_Object * | obj,
|  | double | value
| ) |  |

Delete the special string display in the place of the numerical value.

Parameters

  obj | The spinner object.
  value | The replaced value.

It will remove a previously added special value. After this, the spinner will display the value itself instead of a label.

See Also
  elm_spinner_special_value_add() for more details.

Since
  1.8

const char* elm_spinner_special_value_get | ( | Evas_Object * | obj,
|  | double | value
| ) |  |

Get the special string display in the place of the numerical value.

Parameters

  obj | The spinner object.
  value | The replaced value.

Returns
  The used label.

See Also
  elm_spinner_special_value_add() for more details.

Since
  1.8

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

Get the step used to increment or decrement the spinner value.

Parameters

  obj | The spinner object.

Returns
  The step value.

See Also
  elm_spinner_step_get() for more details.

References elm_obj_spinner_step_get.

void elm_spinner_step_set | ( | Evas_Object * | obj,
|  | double | step
| ) |  |

Set the step used to increment or decrement the spinner value.

Parameters

  obj | The spinner object.
  step | The step value.

This value will be incremented or decremented to the displayed value. It will be incremented while the user keep right or top arrow pressed, and will be decremented while the user keep left or bottom arrow pressed.

The interval to increment / decrement can be set with elm_spinner_interval_set().

By default step value is equal to 1.

See Also
  elm_spinner_step_get()

References elm_obj_spinner_step_set.

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

Get the value displayed by the spinner.

Parameters

  obj | The spinner object.

Returns
  The value displayed.

See Also
  elm_spinner_value_set() for details.

References elm_obj_spinner_value_get.

void elm_spinner_value_set | ( | Evas_Object * | obj,
|  | double | val
| ) |  |

Set the value the spinner displays.

Parameters

  obj | The spinner object.
  val | The value to be displayed.

Value will be presented on the label following format specified with elm_spinner_format_set().

Warning
  The value must to be between min and max values. This values are set by elm_spinner_min_max_set().

See Also
  elm_spinner_value_get().
  elm_spinner_format_set().
  elm_spinner_min_max_set().

References elm_obj_spinner_value_set.

Eina_Bool elm_spinner_wrap_get | ( | const Evas_Object * | obj | ) |

Get whether the spinner should wrap when it reaches its minimum or maximum value.

Parameters

  obj | The spinner object

Returns
  `EINA_TRUE` means wrap is enabled. `EINA_FALSE` indicates it's disabled. If `obj` is `NULL`, `EINA_FALSE` is returned.

See Also
  elm_spinner_wrap_set() for details.

References elm_obj_spinner_wrap_get.

void elm_spinner_wrap_set | ( | Evas_Object * | obj,
|  | Eina_Bool | wrap
| ) |  |

Set whether the spinner should wrap when it reaches its minimum or maximum value.

Parameters

  obj | The spinner object.
  wrap | `EINA_TRUE` to enable wrap or `EINA_FALSE` to disable it.

Disabled by default. If disabled, when the user tries to increment the value, but displayed value plus step value is bigger than maximum value, the new value will be the maximum value. The same happens when the user tries to decrement it, but the value less step is less than minimum value. In this case, the new displayed value will be the minimum value.

When wrap is enabled, when the user tries to increment the value, but displayed value plus step value is bigger than maximum value, the new value will be the minimum value. When the the user tries to decrement it, but the value less step is less than minimum value, the new displayed value will be the maximum value.

E.g.:

- min value = 10
- max value = 50
- step value = 20
- displayed value = 20

When the user decrement value (using left or bottom arrow), it will displays `50`.

See Also
  elm_spinner_wrap_get().

References elm_obj_spinner_wrap_set.

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