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"
34 typedef enum _Elm_Actionslider_Pos
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
50 elm_actionslider_add(Evas_Object *parent)
54 * Set actionslider labels.
56 * @param obj The actionslider object
57 * @param left_label The label to be set on the left.
58 * @param center_label The label to be set on the center.
59 * @param right_label The label to be set on the right.
60 * @deprecated use elm_object_text_set() instead.
62 EINA_DEPRECATED EAPI void elm_actionslider_labels_set(Evas_Object *obj, const char *left_label, const char *center_label, const char *right_label) EINA_ARG_NONNULL(1);
65 * Get actionslider labels.
67 * @param obj The actionslider object
68 * @param left_label A char** to place the left_label of @p obj into.
69 * @param center_label A char** to place the center_label of @p obj into.
70 * @param right_label A char** to place the right_label of @p obj into.
71 * @deprecated use elm_object_text_set() instead.
73 EINA_DEPRECATED EAPI void elm_actionslider_labels_get(const Evas_Object *obj, const char **left_label, const char **center_label, const char **right_label) EINA_ARG_NONNULL(1);
76 * Get actionslider selected label.
78 * @param obj The actionslider object
79 * @return The selected label
81 EAPI const char *elm_actionslider_selected_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
84 * Set actionslider indicator position.
86 * @param obj The actionslider object.
87 * @param pos The position of the indicator.
89 EAPI void elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
92 * Get actionslider indicator position.
94 * @param obj The actionslider object.
95 * @return The position of the indicator.
97 EAPI Elm_Actionslider_Pos elm_actionslider_indicator_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
100 * Set actionslider magnet position. To make multiple positions magnets @c or
101 * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
103 * @param obj The actionslider object.
104 * @param pos Bit mask indicating the magnet positions.
106 EAPI void elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
109 * Get actionslider magnet position.
111 * @param obj The actionslider object.
112 * @return The positions with magnet property.
114 EAPI Elm_Actionslider_Pos elm_actionslider_magnet_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
117 * Set actionslider enabled position. To set multiple positions as enabled @c or
118 * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
120 * @note All the positions are enabled by default.
122 * @param obj The actionslider object.
123 * @param pos Bit mask indicating the enabled positions.
125 EAPI void elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
128 * Get actionslider enabled position.
130 * @param obj The actionslider object.
131 * @return The enabled positions.
133 EAPI Elm_Actionslider_Pos elm_actionslider_enabled_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
136 * Set the label used on the indicator.
138 * @param obj The actionslider object
139 * @param label The label to be set on the indicator.
140 * @deprecated use elm_object_text_set() instead.
142 EINA_DEPRECATED EAPI void elm_actionslider_indicator_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
145 * Get the label used on the indicator object.
147 * @param obj The actionslider object
148 * @return The indicator label
149 * @deprecated use elm_object_text_get() instead.
151 EINA_DEPRECATED EAPI const char *elm_actionslider_indicator_label_get(Evas_Object *obj) EINA_ARG_NONNULL(1);