Table Of Contents

Previous topic

efl.elementary Package

Next topic

background Module

actionslider Module

../_images/actionslider-preview.png

Widget description

An actionslider is a switcher for two or three labels with customizable magnet properties.

The user drags and releases the indicator, to choose a label.

Labels can occupy the following positions.

  • Left
  • Right
  • Center

Positions can be enabled or disabled.

Magnets can be set on the above positions.

When the indicator is released, it will move to its nearest “enabled and magnetized” position.

This widget emits the following signals, besides the ones sent from efl.elementary.layout_class.LayoutClass:

  • selected - when user selects an enabled position (the label is passed as event info)”.
  • pos_changed - when the indicator reaches any of the positions(“left”, “right” or “center”).

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

  • indicator - An indicator label of the actionslider
  • left - A left label of the actionslider
  • right - A right label of the actionslider
  • center - A center label of the actionslider

Enumerations

Actionslider positions

efl.elementary.actionslider.ELM_ACTIONSLIDER_NONE

No position

efl.elementary.actionslider.ELM_ACTIONSLIDER_LEFT

Left position

efl.elementary.actionslider.ELM_ACTIONSLIDER_CENTER

Center position

efl.elementary.actionslider.ELM_ACTIONSLIDER_RIGHT

Right position

efl.elementary.actionslider.ELM_ACTIONSLIDER_ALL

All positions

class efl.elementary.actionslider.Actionslider

Bases: efl.elementary.layout_class.LayoutClass

This is the class that actually implements the widget.

callback_pos_changed_add()

Called when the indicator reaches any of the positions left, right or center. The label is passed as event info.

callback_selected_add()

Called when user selects an enabled position. The label is passed as event info.

enabled_pos

The actionslider enabled position. To set multiple positions as enabled or them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).

Note

All positions are enabled by default.

Type :Actionslider positions
indicator_pos

Indicator position.

Type :Actionslider positions
magnet_pos

The actionslider magnet position. To make multiple positions magnets or them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)

Type :Actionslider positions
selected_label

Selected label.

Type :string