Functions |
Evas_Object * | elm_slider_add (Evas_Object *parent) |
| Adds a new slider widget to the given parent Elementary (container) object.
|
void | elm_slider_span_size_set (Evas_Object *obj, Evas_Coord size) |
| Sets the (exact) length of the bar region of a given slider widget.
|
Evas_Coord | elm_slider_span_size_get (const Evas_Object *obj) |
| Gets the length set for the bar region of a given slider widget.
|
void | elm_slider_unit_format_set (Evas_Object *obj, const char *format) |
| Sets the format string for the unit label.
|
const char * | elm_slider_unit_format_get (const Evas_Object *obj) |
| Gets the unit label format of the slider.
|
void | elm_slider_indicator_format_set (Evas_Object *obj, const char *indicator) |
| Sets the format string for the indicator label.
|
const char * | elm_slider_indicator_format_get (const Evas_Object *obj) |
| Gets the indicator label format of the slider.
|
void | elm_slider_indicator_format_function_set (Evas_Object *obj, char *(*func)(double val), void(*free_func)(char *str)) |
| Sets the format function pointer for the indicator label.
|
void | elm_slider_units_format_function_set (Evas_Object *obj, char *(*func)(double val), void(*free_func)(char *str)) |
| Sets the format function pointer for the units label.
|
void | elm_slider_horizontal_set (Evas_Object *obj, Eina_Bool horizontal) |
| Sets the orientation of a given slider widget.
|
Eina_Bool | elm_slider_horizontal_get (const Evas_Object *obj) |
| Retrieves the orientation of a given slider widget.
|
void | elm_slider_min_max_set (Evas_Object *obj, double min, double max) |
| Sets the minimum and maximum values for the slider.
|
void | elm_slider_min_max_get (const Evas_Object *obj, double *min, double *max) |
| Gets the minimum and maximum values of the slider.
|
void | elm_slider_value_set (Evas_Object *obj, double val) |
| Sets the value that the slider displays.
|
double | elm_slider_value_get (const Evas_Object *obj) |
| Gets the value displayed by the spinner.
|
void | elm_slider_inverted_set (Evas_Object *obj, Eina_Bool inverted) |
| Inverts a given slider widget's displaying values order.
|
Eina_Bool | elm_slider_inverted_get (const Evas_Object *obj) |
| Gets whether a given slider widget's displaying values are inverted.
|
void | elm_slider_indicator_show_set (Evas_Object *obj, Eina_Bool show) |
| Sets whether to enlarge the slider indicator (augmented knob).
|
Eina_Bool | elm_slider_indicator_show_get (const Evas_Object *obj) |
| Gets whether a given slider widget is an enlarging indicator.
|
void | elm_slider_step_set (Evas_Object *obj, double step) |
| Sets the step by which the slider indicator moves.
|
double | elm_slider_step_get (const Evas_Object *obj) |
| Gets the step by which the slider indicator moves.
|
The slider adds a draggable “slider” widget for selecting the value of something within a range.
A slider can be horizontal or vertical. It can contain an Icon and can have a primary label as well as a units label (that is formatted with floating point values and thus accepts a printf-style format string, like “%1.2f units”. There is also an indicator string that may be somewhere else (like on the slider itself) that also accepts a format string like units. Label, Icon Unit, and Indicator strings/objects are optional.
A slider may be inverted, which means values invert, with high values being on the left or top and low values on the right or bottom (as opposed to normally being low on the left or top and high at the bottom and right).
The slider should have its minimum and maximum values set by the application with elm_slider_min_max_set() and values should also be set by the application before it is used with elm_slider_value_set(). The span of the slider is its length (horizontally or vertically). This is scaled by the object or applications scaling factor. At any point, the code can query the slider for its value using elm_slider_value_get().
This widget inherits from the Layout one, so that all the functions acting on it also work for slider objects.
This widget emits the following signals, besides the ones sent from Layout :
"changed"
- Whenever the slider value is changed by the user.
"slider,drag,start"
- Dragging the slider indicator has started.
"slider,drag,stop"
- Dragging the slider indicator has stopped.
"delay,changed"
- A short time after the value is changed by the user. This is called only when the user stops dragging for a very short period or when they release their finger/mouse, so it avoids the possible expensive reactions to the value change.
Available styles for it:
The default content parts of the slider widget that you can use are:
- "icon" - An icon of the slider.
- "end" - An end part content of the slider.
The default text parts of the slider widget that you can use are:
- "default" - Label of the slider.
Supported common elm_object APIs.
Function Documentation
Adds a new slider widget to the given parent Elementary (container) object.
This function inserts a new slider widget on the canvas.
- Since :
- 2.3
- Parameters:
-
[in] | parent | The parent object |
- Returns:
- A new slider widget handle, otherwise
NULL
in case of an error
Retrieves the orientation of a given slider widget.
- Since :
- 2.3
- Parameters:
-
- Returns:
EINA_TRUE
, if obj is set to horizontal, otherwise EINA_FALSE
if it's vertical (and on errors)
- See also:
- elm_slider_horizontal_set()
Sets the orientation of a given slider widget.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The slider object |
[in] | horizontal | If EINA_TRUE , it makes obj horizontal, otherwise EINA_FALSE to make it vertical |
- See also:
- elm_slider_horizontal_get()
Sets the format function pointer for the indicator label.
This sets the callback function to format the indicator string.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The slider object |
[in] | func | The indicator format function |
[in] | free_func | The freeing function for the format string |
- See also:
- elm_slider_indicator_format_set() for more info on how this works.
Gets the indicator label format of the slider.
- Since :
- 2.3
- Parameters:
-
- Returns:
- The indicator label format string in UTF-8
- See also:
- elm_slider_indicator_format_set() for more information on how this works.
Sets the format string for the indicator label.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The slider object |
[in] | indicator | The format string for the indicator display |
- See also:
- elm_slider_indicator_format_get()
Gets whether a given slider widget is an enlarging indicator.
- Since :
- 2.3
- Parameters:
-
- Returns:
EINA_TRUE
, if obj is an enlarging indicator, otherwise EINA_FALSE
(and on errors)
- See also:
- elm_slider_indicator_show_set()
Sets whether to enlarge the slider indicator (augmented knob).
- Since :
- 2.3
- Parameters:
-
[in] | obj | The slider object |
[in] | show | If EINA_TRUE the knob is enlarged, otherwise EINA_FALSE always lets the knob of the default size |
Gets whether a given slider widget's displaying values are inverted.
- Since :
- 2.3
- Parameters:
-
- Returns:
EINA_TRUE
, if obj has inverted values, otherwise EINA_FALSE
(and on errors)
- See also:
- elm_slider_inverted_set()
Inverts a given slider widget's displaying values order.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The slider object |
[in] | inverted | If EINA_TRUE obj is inverted, otherwise EINA_FALSE to bring it back to the default, non-inverted value |
- See also:
- elm_slider_inverted_get()
Gets the minimum and maximum values of the slider.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The slider object |
[out] | min | The pointer to store the minimum value |
[out] | max | The pointer to store the maximum value |
- See also:
- elm_slider_min_max_set()
Sets the minimum and maximum values for the slider.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The slider object |
[in] | min | The minimum value |
[in] | max | The maximum value |
- See also:
- elm_slider_min_max_get()
Gets the length set for the bar region of a given slider widget.
- Since :
- 2.3
- Parameters:
-
- Returns:
- The length of the slider's bar region
Sets the (exact) length of the bar region of a given slider widget.
This sets the minimum width (when in the horizontal mode) or height (when in the vertical mode) of the actual bar area of the slider obj. This in turn affects the object's minimum size. Use this when you're not setting other size hints expanding on the given direction (like weight and alignment hints), and you would like it to have a specific size.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The slider object |
[in] | size | The length of the slider's bar region |
- See also:
- elm_slider_span_size_get()
Gets the step by which the slider indicator moves.
- Since :
- 2.3
- Parameters:
-
- Returns:
- The step value
- See also:
- elm_slider_step_set()
Sets the step by which the slider indicator moves.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The slider object |
[in] | step | The step value |
- See also:
- elm_slider_step_get()
Gets the unit label format of the slider.
- Since :
- 2.3
- Parameters:
-
- Returns:
- The unit label format string in UTF-8
- See also:
- elm_slider_unit_format_set() for more information on how this works.
Sets the format string for the unit label.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The slider object |
[in] | format | The format string for the unit display |
- See also:
- elm_slider_indicator_format_get()
Sets the format function pointer for the units label.
This sets the callback function to format the units string.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The slider object |
[in] | func | The units format function |
[in] | free_func | The freeing function for the format string |
- See also:
- elm_slider_unit_format_set() for more info on how this works.
Gets the value displayed by the spinner.
- Since :
- 2.3
- Parameters:
-
[in] | obj | The spinner object |
- Returns:
- The value displayed
- See also:
- elm_spinner_value_set()