Functions
Spinner

Functions

EOAPI void elm_obj_spinner_min_max_set (double min, double max)
 Set the minimum and maximum values for the spinner. More...
 
EOAPI void elm_obj_spinner_min_max_get (double *min, double *max)
 Get the minimum and maximum values of the spinner. More...
 
EOAPI void elm_obj_spinner_step_set (double step)
 Set the step used to increment or decrement the spinner value. More...
 
EOAPI double elm_obj_spinner_step_get (void)
 Get the step used to increment or decrement the spinner value. More...
 
EOAPI void elm_obj_spinner_wrap_set (Eina_Bool wrap)
 Set whether the spinner should wrap when it reaches its minimum or maximum value. More...
 
EOAPI Eina_Bool elm_obj_spinner_wrap_get (void)
 Get whether the spinner should wrap when it reaches its minimum or maximum value. More...
 
EOAPI void elm_obj_spinner_interval_set (double interval)
 Set the interval on time updates for an user mouse button hold on spinner widgets' arrows. More...
 
EOAPI double elm_obj_spinner_interval_get (void)
 Get the interval on time updates for an user mouse button hold on spinner widgets' arrows. More...
 
EOAPI void elm_obj_spinner_round_set (int rnd)
 Set the round value for rounding. More...
 
EOAPI int elm_obj_spinner_round_get (void)
 Get the round value for rounding. More...
 
EOAPI void elm_obj_spinner_editable_set (Eina_Bool editable)
 Set whether the spinner can be directly edited by the user or not. More...
 
EOAPI Eina_Bool elm_obj_spinner_editable_get (void)
 Get whether the spinner can be directly edited by the user or not. More...
 
EOAPI void elm_obj_spinner_base_set (double base)
 Set the base for rounding. More...
 
EOAPI double elm_obj_spinner_base_get (void)
 Get the base for rounding. More...
 
EOAPI void elm_obj_spinner_value_set (double val)
 Set the value the spinner displays. More...
 
EOAPI double elm_obj_spinner_value_get (void)
 Get the value displayed by the spinner. More...
 
EOAPI void elm_obj_spinner_label_format_set (const char *fmt)
 Set the format string of the displayed label. More...
 
EOAPI const char * elm_obj_spinner_label_format_get (void)
 Get the label format of the spinner. More...
 
EOAPI void elm_obj_spinner_special_value_add (double value, const char *label)
 Set a special string to display in the place of the numerical value. More...
 
void elm_spinner::special_value_add (double value_, std::string label_) const
 Set a special string to display in the place of the numerical value. More...
 
void elm_spinner::min_max_get (double *min_, double *max_) const
 Get the minimum and maximum values of the spinner. More...
 
void elm_spinner::min_max_set (double min_, double max_) const
 Get the minimum and maximum values of the spinner. More...
 
double elm_spinner::step_get () const
 Get the step used to increment or decrement the spinner value. More...
 
void elm_spinner::step_set (double step_) const
 Get the step used to increment or decrement the spinner value. More...
 
bool elm_spinner::wrap_get () const
 Get whether the spinner should wrap when it reaches its minimum or maximum value. More...
 
void elm_spinner::wrap_set (bool wrap_) const
 Get whether the spinner should wrap when it reaches its minimum or maximum value. More...
 
double elm_spinner::interval_get () const
 Get the interval on time updates for an user mouse button hold on spinner widgets' arrows. More...
 
void elm_spinner::interval_set (double interval_) const
 Get the interval on time updates for an user mouse button hold on spinner widgets' arrows. More...
 
int elm_spinner::round_get () const
 Get the round value for rounding. More...
 
void elm_spinner::round_set (int rnd_) const
 Get the round value for rounding. More...
 
bool elm_spinner::editable_get () const
 Get whether the spinner can be directly edited by the user or not. More...
 
void elm_spinner::editable_set (bool editable_) const
 Get whether the spinner can be directly edited by the user or not. More...
 
double elm_spinner::base_get () const
 Get the base for rounding. More...
 
void elm_spinner::base_set (double base_) const
 Get the base for rounding. More...
 
double elm_spinner::value_get () const
 Get the value displayed by the spinner. More...
 
void elm_spinner::value_set (double val_) const
 Get the value displayed by the spinner. More...
 
std::string elm_spinner::label_format_get () const
 Get the label format of the spinner. More...
 
void elm_spinner::label_format_set (std::string fmt_) const
 Get the label format of the spinner. More...
 
void elm_spinner_min_max_set (Elm_Spinner *obj, double min, double max)
 Set the minimum and maximum values for the spinner. More...
 
void elm_spinner_min_max_get (const Elm_Spinner *obj, double *min, double *max)
 Get the minimum and maximum values of the spinner. More...
 
void elm_spinner_step_set (Elm_Spinner *obj, double step)
 Set the step used to increment or decrement the spinner value. More...
 
double elm_spinner_step_get (const Elm_Spinner *obj)
 Get the step used to increment or decrement the spinner value. More...
 
void elm_spinner_wrap_set (Elm_Spinner *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 Elm_Spinner *obj)
 Get whether the spinner should wrap when it reaches its minimum or maximum value. More...
 
void elm_spinner_interval_set (Elm_Spinner *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 Elm_Spinner *obj)
 Get the interval on time updates for an user mouse button hold on spinner widgets' arrows. More...
 
void elm_spinner_round_set (Elm_Spinner *obj, int rnd)
 Set the round value for rounding. More...
 
int elm_spinner_round_get (const Elm_Spinner *obj)
 Get the round value for rounding. More...
 
void elm_spinner_editable_set (Elm_Spinner *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 Elm_Spinner *obj)
 Get whether the spinner can be directly edited by the user or not. More...
 
void elm_spinner_base_set (Elm_Spinner *obj, double base)
 Set the base for rounding. More...
 
double elm_spinner_base_get (const Elm_Spinner *obj)
 Get the base for rounding. More...
 
void elm_spinner_value_set (Elm_Spinner *obj, double val)
 Set the value the spinner displays. More...
 
double elm_spinner_value_get (const Elm_Spinner *obj)
 Get the value displayed by the spinner. More...
 
void elm_spinner_label_format_set (Elm_Spinner *obj, const char *fmt)
 Set the format string of the displayed label. More...
 
const char * elm_spinner_label_format_get (const Elm_Spinner *obj)
 Get the label format of the spinner. More...
 
void elm_spinner_special_value_add (Elm_Spinner *obj, double value, const char *label)
 Set a special string to display in the place of the numerical value. More...
 
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

spinner_inheritance_tree.png
preview-00.png

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:

Available styles for it:

Supported elm_object common APIs.

Here is an example on its usage: Spinner widget example

Function Documentation

double elm_spinner::base_get ( ) const
inline

Get the base for rounding.

Returns
The base rounding value

This returns the base for rounding.

See also
elm_spinner_round_set() too.
elm_spinner_base_set() too.
Parameters
baseThe base value

References elm_obj_spinner_base_get().

void elm_spinner::base_set ( double  base_) const
inline

Get the base for rounding.

Returns
The base rounding value

This returns the base for rounding.

See also
elm_spinner_round_set() too.
elm_spinner_base_set() too.
Parameters
baseThe base value

References elm_obj_spinner_base_set().

bool elm_spinner::editable_get ( ) const
inline

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

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.
Parameters
editableEINA_TRUE to allow users to edit it or EINA_FALSE to don't allow users to edit it directly.

References elm_obj_spinner_editable_get().

void elm_spinner::editable_set ( bool  editable_) const
inline

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

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.
Parameters
editableEINA_TRUE to allow users to edit it or EINA_FALSE to don't allow users to edit it directly.

References elm_obj_spinner_editable_set().

EOAPI double elm_obj_spinner_base_get ( void  )

Get the base for rounding.

Returns
The base rounding value

This returns the base for rounding.

See also
elm_spinner_round_set() too.
elm_spinner_base_set() too.

Referenced by elm_spinner::base_get(), and elm_spinner_base_get().

EOAPI void elm_obj_spinner_base_set ( double  base)

Set the base for rounding.

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.
Parameters
[in]baseThe base value

Referenced by elm_spinner::base_set(), and elm_spinner_base_set().

EOAPI Eina_Bool elm_obj_spinner_editable_get ( void  )

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

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.

Referenced by elm_spinner::editable_get(), and elm_spinner_editable_get().

EOAPI void elm_obj_spinner_editable_set ( Eina_Bool  editable)

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

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()
Parameters
[in]editableEINA_TRUE to allow users to edit it or EINA_FALSE to don't allow users to edit it directly.

Referenced by elm_spinner::editable_set(), and elm_spinner_editable_set().

EOAPI double elm_obj_spinner_interval_get ( void  )

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

Returns
The (first) interval value, in seconds, set on it.
See also
elm_spinner_interval_set() for more details.

Referenced by elm_spinner_interval_get(), and elm_spinner::interval_get().

EOAPI void elm_obj_spinner_interval_set ( double  interval)

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

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()
Parameters
[in]intervalThe (first) interval value in seconds.

Referenced by elm_spinner_interval_set(), and elm_spinner::interval_set().

EOAPI const char* elm_obj_spinner_label_format_get ( void  )

Get the label format of the spinner.

Returns
The text label format string in UTF-8.
See also
elm_spinner_label_format_set() for details.

Referenced by elm_spinner_label_format_get(), and elm_spinner::label_format_get().

EOAPI void elm_obj_spinner_label_format_set ( const char *  fmt)

Set the format string of the displayed label.

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()
Parameters
[in]fmtThe format string for the label display.

Referenced by elm_spinner_label_format_set(), and elm_spinner::label_format_set().

EOAPI void elm_obj_spinner_min_max_get ( double *  min,
double *  max 
)

Get the minimum and maximum values of the spinner.

Note
If only one value is needed, the other pointer can be passed as NULL.
See also
elm_spinner_min_max_set() for details.
Parameters
[out]minThe minimum value.
[out]maxThe maximum value.

Referenced by elm_spinner_min_max_get(), and elm_spinner::min_max_get().

EOAPI void elm_obj_spinner_min_max_set ( double  min,
double  max 
)

Set the minimum and maximum values for the spinner.

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()
Parameters
[in]minThe minimum value.
[in]maxThe maximum value.

Referenced by elm_spinner_min_max_set(), and elm_spinner::min_max_set().

EOAPI int elm_obj_spinner_round_get ( void  )

Get the round value for rounding.

Returns
The rounding value

This returns the round value for rounding.

See also
elm_spinner_round_set() too.
elm_spinner_base_set() too.

Referenced by elm_spinner_round_get(), and elm_spinner::round_get().

EOAPI void elm_obj_spinner_round_set ( int  rnd)

Set the round value for rounding.

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

See also
elm_spinner_round_get()
elm_spinner_base_set()
Parameters
[in]rndThe rounding value

Referenced by elm_spinner_round_set(), and elm_spinner::round_set().

EOAPI void elm_obj_spinner_special_value_add ( double  value,
const char *  label 
)

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

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

1 sp = elm_spinner_add(win);
2 elm_spinner_min_max_set(sp, 1, 3);
3 elm_spinner_special_value_add(sp, 1, "January");
4 elm_spinner_special_value_add(sp, 2, "February");
5 elm_spinner_special_value_add(sp, 3, "March");
6 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().
Parameters
[in]valueThe value to be replaced.
[in]labelThe label to be used.

Referenced by elm_spinner_special_value_add(), and elm_spinner::special_value_add().

EOAPI double elm_obj_spinner_step_get ( void  )

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

Returns
The step value.
See also
elm_spinner_step_get() for more details.

Referenced by elm_spinner_step_get(), and elm_spinner::step_get().

EOAPI void elm_obj_spinner_step_set ( double  step)

Set the step used to increment or decrement the spinner 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()
Parameters
[in]stepThe step value.

Referenced by elm_spinner_step_set(), and elm_spinner::step_set().

EOAPI double elm_obj_spinner_value_get ( void  )

Get the value displayed by the spinner.

Returns
The value displayed.
See also
elm_spinner_value_set() for details.

Referenced by elm_spinner_value_get(), and elm_spinner::value_get().

EOAPI void elm_obj_spinner_value_set ( double  val)

Set the value the spinner displays.

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().
Parameters
[in]valThe value to be displayed.

Referenced by elm_spinner_value_set(), and elm_spinner::value_set().

EOAPI Eina_Bool elm_obj_spinner_wrap_get ( void  )

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

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.

Referenced by elm_spinner_wrap_get(), and elm_spinner::wrap_get().

EOAPI void elm_obj_spinner_wrap_set ( Eina_Bool  wrap)

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

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().
Parameters
[in]wrapEINA_TRUE to enable wrap or EINA_FALSE to disable it.

Referenced by elm_spinner_wrap_set(), and elm_spinner::wrap_set().

Evas_Object* elm_spinner_add ( Evas_Object *  parent)

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

Parameters
parentThe 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 Elm_Spinner *  obj)

Get the base for rounding.

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 ( Elm_Spinner *  obj,
double  base 
)

Set the base for rounding.

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.
Parameters
[in]baseThe base value

References elm_obj_spinner_base_set().

Eina_Bool elm_spinner_editable_get ( const Elm_Spinner *  obj)

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

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 ( Elm_Spinner *  obj,
Eina_Bool  editable 
)

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

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()
Parameters
[in]editableEINA_TRUE to allow users to edit it or EINA_FALSE to don't allow users to edit it directly.

References elm_obj_spinner_editable_set().

double elm_spinner_interval_get ( const Elm_Spinner *  obj)

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

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 ( Elm_Spinner *  obj,
double  interval 
)

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

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()
Parameters
[in]intervalThe (first) interval value in seconds.

References elm_obj_spinner_interval_set().

const char* elm_spinner_label_format_get ( const Elm_Spinner *  obj)

Get the label format of the spinner.

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 ( Elm_Spinner *  obj,
const char *  fmt 
)

Set the format string of the displayed label.

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()
Parameters
[in]fmtThe format string for the label display.

References elm_obj_spinner_label_format_set().

void elm_spinner_min_max_get ( const Elm_Spinner *  obj,
double *  min,
double *  max 
)

Get the minimum and maximum values of the spinner.

Note
If only one value is needed, the other pointer can be passed as NULL.
See also
elm_spinner_min_max_set() for details.
Parameters
[out]minThe minimum value.
[out]maxThe maximum value.

References elm_obj_spinner_min_max_get().

void elm_spinner_min_max_set ( Elm_Spinner *  obj,
double  min,
double  max 
)

Set the minimum and maximum values for the spinner.

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()
Parameters
[in]minThe minimum value.
[in]maxThe maximum value.

References elm_obj_spinner_min_max_set().

int elm_spinner_round_get ( const Elm_Spinner *  obj)

Get the round value for rounding.

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 ( Elm_Spinner *  obj,
int  rnd 
)

Set the round value for rounding.

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

See also
elm_spinner_round_get()
elm_spinner_base_set()
Parameters
[in]rndThe rounding value

References elm_obj_spinner_round_set().

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

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

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

1 sp = elm_spinner_add(win);
2 elm_spinner_min_max_set(sp, 1, 3);
3 elm_spinner_special_value_add(sp, 1, "January");
4 elm_spinner_special_value_add(sp, 2, "February");
5 elm_spinner_special_value_add(sp, 3, "March");
6 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().
Parameters
[in]valueThe value to be replaced.
[in]labelThe label to be used.

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
objThe spinner object.
valueThe 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
objThe spinner object.
valueThe 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 Elm_Spinner *  obj)

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

Returns
The step value.
See also
elm_spinner_step_get() for more details.

References elm_obj_spinner_step_get().

void elm_spinner_step_set ( Elm_Spinner *  obj,
double  step 
)

Set the step used to increment or decrement the spinner 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()
Parameters
[in]stepThe step value.

References elm_obj_spinner_step_set().

double elm_spinner_value_get ( const Elm_Spinner *  obj)

Get the value displayed by the spinner.

Returns
The value displayed.
See also
elm_spinner_value_set() for details.

References elm_obj_spinner_value_get().

void elm_spinner_value_set ( Elm_Spinner *  obj,
double  val 
)

Set the value the spinner displays.

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().
Parameters
[in]valThe value to be displayed.

References elm_obj_spinner_value_set().

Eina_Bool elm_spinner_wrap_get ( const Elm_Spinner *  obj)

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

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 ( Elm_Spinner *  obj,
Eina_Bool  wrap 
)

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

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().
Parameters
[in]wrapEINA_TRUE to enable wrap or EINA_FALSE to disable it.

References elm_obj_spinner_wrap_set().

double elm_spinner::interval_get ( ) const
inline

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

Returns
The (first) interval value, in seconds, set on it.
See also
elm_spinner_interval_set() for more details.
Parameters
intervalThe (first) interval value in seconds.

References elm_obj_spinner_interval_get().

void elm_spinner::interval_set ( double  interval_) const
inline

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

Returns
The (first) interval value, in seconds, set on it.
See also
elm_spinner_interval_set() for more details.
Parameters
intervalThe (first) interval value in seconds.

References elm_obj_spinner_interval_set().

std::string elm_spinner::label_format_get ( ) const
inline

Get the label format of the spinner.

Returns
The text label format string in UTF-8.
See also
elm_spinner_label_format_set() for details.
Parameters
fmtThe format string for the label display.

References elm_obj_spinner_label_format_get().

void elm_spinner::label_format_set ( std::string  fmt_) const
inline

Get the label format of the spinner.

Returns
The text label format string in UTF-8.
See also
elm_spinner_label_format_set() for details.
Parameters
fmtThe format string for the label display.

References elm_obj_spinner_label_format_set().

void elm_spinner::min_max_get ( double *  min_,
double *  max_ 
) const
inline

Get the minimum and maximum values of the spinner.

Note
If only one value is needed, the other pointer can be passed as NULL.
See also
elm_spinner_min_max_set() for details.
Parameters
minThe minimum value.
maxThe maximum value.

References elm_obj_spinner_min_max_get().

void elm_spinner::min_max_set ( double  min_,
double  max_ 
) const
inline

Get the minimum and maximum values of the spinner.

Note
If only one value is needed, the other pointer can be passed as NULL.
See also
elm_spinner_min_max_set() for details.
Parameters
minThe minimum value.
maxThe maximum value.

References elm_obj_spinner_min_max_set().

int elm_spinner::round_get ( ) const
inline

Get the round value for rounding.

Returns
The rounding value

This returns the round value for rounding.

See also
elm_spinner_round_set() too.
elm_spinner_base_set() too.
Parameters
rndThe rounding value

References elm_obj_spinner_round_get().

void elm_spinner::round_set ( int  rnd_) const
inline

Get the round value for rounding.

Returns
The rounding value

This returns the round value for rounding.

See also
elm_spinner_round_set() too.
elm_spinner_base_set() too.
Parameters
rndThe rounding value

References elm_obj_spinner_round_set().

void elm_spinner::special_value_add ( double  value_,
std::string  label_ 
) const
inline

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

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_special_value_add(sp, 2, "February");
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().
Parameters
valueThe value to be replaced.
labelThe label to be used.

References elm_obj_spinner_special_value_add().

double elm_spinner::step_get ( ) const
inline

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

Returns
The step value.
See also
elm_spinner_step_get() for more details.
Parameters
stepThe step value.

References elm_obj_spinner_step_get().

void elm_spinner::step_set ( double  step_) const
inline

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

Returns
The step value.
See also
elm_spinner_step_get() for more details.
Parameters
stepThe step value.

References elm_obj_spinner_step_set().

double elm_spinner::value_get ( ) const
inline

Get the value displayed by the spinner.

Returns
The value displayed.
See also
elm_spinner_value_set() for details.
Parameters
valThe value to be displayed.

References elm_obj_spinner_value_get().

void elm_spinner::value_set ( double  val_) const
inline

Get the value displayed by the spinner.

Returns
The value displayed.
See also
elm_spinner_value_set() for details.
Parameters
valThe value to be displayed.

References elm_obj_spinner_value_set().

bool elm_spinner::wrap_get ( ) const
inline

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

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.
Parameters
wrapEINA_TRUE to enable wrap or EINA_FALSE to disable it.

References elm_obj_spinner_wrap_get().

void elm_spinner::wrap_set ( bool  wrap_) const
inline

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

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.
Parameters
wrapEINA_TRUE to enable wrap or EINA_FALSE to disable it.

References elm_obj_spinner_wrap_set().