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... | |
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.
Here is an example on its usage: Spinner widget example
Evas_Object* elm_spinner_add | ( | Evas_Object * | parent | ) |
Add a new spinner widget to the given parent Elementary (container) object.
parent | The parent object. |
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.
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.
const char* elm_spinner_special_value_get | ( | Evas_Object * | obj, |
double | value | ||
) |
Get the special string display in the place of the numerical value.
obj | The spinner object. |
value | The replaced value. |