Slider

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

Enumerations | Functions
Slider

## Enumerations

## Functions
void | elm_config_slider_indicator_visible_mode_set (Elm_Slider_Indicator_Visible_Mode mode)
| Sets the slider's indicator visible mode. More...
Elm_Slider_Indicator_Visible_Mode | elm_config_slider_indicator_visible_mode_get (void)
| Get the slider's indicator visible mode. More...
Evas_Object * | elm_slider_add (Evas_Object *parent)
| Add a new slider widget to the given parent Elementary (container) object. More...

## Detailed Description

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 has 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 vales 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 on the bottom and right).

The slider should have its minimum and maximum values set by the application with elm_slider_min_max_set() and value should also be set by the application before use with elm_slider_value_set(). The span of the slider is its length (horizontally or vertically). This will be scaled by the object or applications scaling factor. At any point code can query the slider for its value with 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 around has started.
- `"slider,drag,stop"` - dragging the slider indicator around has stopped.
- `"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.
- `"focused"` - When the slider has received focus. (since 1.8)
- `"unfocused"` - When the slider has lost focus. (since 1.8)
- `"language,changed"` - the program's language changed (since 1.9)

Available styles for it:

- `"default"`

Default content parts of the slider widget that you can use for are:

- "icon" - An icon of the slider
- "end" - A end part content of the slider

Default text parts of the slider widget that you can use for are:

- "default" - A label of the slider

Supported elm_object common APIs.

- elm_object_disabled_set
- elm_object_disabled_get
- elm_object_part_text_set
- elm_object_part_text_get
- elm_object_part_content_set
- elm_object_part_content_get
- elm_object_part_content_unset

Here is an example on its usage:

- Slider widget example

## Enumeration Type Documentation

enum Elm_Slider_Indicator_Visible_Mode

Slider's indicator visiblity mode.

Since
  1.13

Enumerator
ELM_SLIDER_INDICATOR_VISIBLE_MODE_DEFAULT | show indicator on mouse down or change in slider value
ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS | Always show the indicator.
ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS | Show the indicator on focus.
ELM_SLIDER_INDICATOR_VISIBLE_MODE_NONE | Never show the indicator.

## Function Documentation

Elm_Slider_Indicator_Visible_Mode elm_config_slider_indicator_visible_mode_get | ( | void |  | ) |

Get the slider's indicator visible mode.

Parameters

  obj | The slider object.

Returns
  `ELM_SLIDER_INDICATOR_VISIBLE_MODE_DEFAULT` if not set anything by the user. `ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS`, ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS, ELM_SLIDER_INDICATOR_VISIBLE_MODE_NONE if any of the above is set by user.

Since
  1.13

void elm_config_slider_indicator_visible_mode_set | ( | Elm_Slider_Indicator_Visible_Mode | mode | ) |

Sets the slider's indicator visible mode.

Parameters

  obj | The slider object.
  mode | Elm_Slider_Indicator_Visible_Mode. viewport.

Since
  1.13

Evas_Object* elm_slider_add | ( | Evas_Object * | parent | ) |

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

Parameters

  parent | The parent object.

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

This function inserts a new slider widget on the canvas.

References ELM_SLIDER_INDICATOR_VISIBLE_MODE_DEFAULT, and ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS.