Spinner

- Main Page
- Related Pages
- Data Structures
- Files
- Examples

Functions
Spinner

## 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...

## 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

## 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.

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