2 * @addtogroup Actionslider Actionslider
4 * @image html img/widget/actionslider/preview-00.png
5 * @image latex img/widget/actionslider/preview-00.eps
7 * An actionslider is a switcher for 2 or 3 labels with customizable magnet
8 * properties. The user drags and releases the indicator, to choose a label.
10 * Labels occupy the following positions.
15 * Positions can be enabled or disabled.
17 * Magnets can be set on the above positions.
19 * When the indicator is released, it will move to its nearest "enabled and magnetized" position.
21 * @note By default all positions are set as enabled.
23 * Signals that you can add callbacks for are:
25 * "selected" - when user selects an enabled position (the label is passed
28 * "pos_changed" - when the indicator reaches any of the positions("left",
29 * "right" or "center").
31 * See an example of actionslider usage @ref actionslider_example_page "here"
36 ELM_ACTIONSLIDER_NONE = 0,
37 ELM_ACTIONSLIDER_LEFT = 1 << 0,
38 ELM_ACTIONSLIDER_CENTER = 1 << 1,
39 ELM_ACTIONSLIDER_RIGHT = 1 << 2,
40 ELM_ACTIONSLIDER_ALL = (1 << 3) - 1
41 } Elm_Actionslider_Pos;
44 * Add a new actionslider to the parent.
46 * @param parent The parent object
47 * @return The new actionslider object or NULL if it cannot be created
49 EAPI Evas_Object *elm_actionslider_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
52 * Get actionslider selected label.
54 * @param obj The actionslider object
55 * @return The selected label
57 EAPI const char *elm_actionslider_selected_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
60 * Set actionslider indicator position.
62 * @param obj The actionslider object.
63 * @param pos The position of the indicator.
65 EAPI void elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
68 * Get actionslider indicator position.
70 * @param obj The actionslider object.
71 * @return The position of the indicator.
73 EAPI Elm_Actionslider_Pos elm_actionslider_indicator_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
76 * Set actionslider magnet position. To make multiple positions magnets @c or
77 * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
79 * @param obj The actionslider object.
80 * @param pos Bit mask indicating the magnet positions.
82 EAPI void elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
85 * Get actionslider magnet position.
87 * @param obj The actionslider object.
88 * @return The positions with magnet property.
90 EAPI Elm_Actionslider_Pos elm_actionslider_magnet_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
93 * Set actionslider enabled position. To set multiple positions as enabled @c or
94 * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
96 * @note All the positions are enabled by default.
98 * @param obj The actionslider object.
99 * @param pos Bit mask indicating the enabled positions.
101 EAPI void elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
104 * Get actionslider enabled position.
106 * @param obj The actionslider object.
107 * @return The enabled positions.
109 EAPI Elm_Actionslider_Pos elm_actionslider_enabled_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);