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
49 EAPI Evas_Object *elm_actionslider_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
52 * Set actionslider labels.
54 * @param obj The actionslider object
55 * @param left_label The label to be set on the left.
56 * @param center_label The label to be set on the center.
57 * @param right_label The label to be set on the right.
58 * @deprecated use elm_object_text_set() instead.
60 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);
63 * Get actionslider labels.
65 * @param obj The actionslider object
66 * @param left_label A char** to place the left_label of @p obj into.
67 * @param center_label A char** to place the center_label of @p obj into.
68 * @param right_label A char** to place the right_label of @p obj into.
69 * @deprecated use elm_object_text_set() instead.
71 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);
74 * Get actionslider selected label.
76 * @param obj The actionslider object
77 * @return The selected label
79 EAPI const char *elm_actionslider_selected_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
82 * Set actionslider indicator position.
84 * @param obj The actionslider object.
85 * @param pos The position of the indicator.
87 EAPI void elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
90 * Get actionslider indicator position.
92 * @param obj The actionslider object.
93 * @return The position of the indicator.
95 EAPI Elm_Actionslider_Pos elm_actionslider_indicator_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
98 * Set actionslider magnet position. To make multiple positions magnets @c or
99 * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
101 * @param obj The actionslider object.
102 * @param pos Bit mask indicating the magnet positions.
104 EAPI void elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
107 * Get actionslider magnet position.
109 * @param obj The actionslider object.
110 * @return The positions with magnet property.
112 EAPI Elm_Actionslider_Pos elm_actionslider_magnet_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
115 * Set actionslider enabled position. To set multiple positions as enabled @c or
116 * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
118 * @note All the positions are enabled by default.
120 * @param obj The actionslider object.
121 * @param pos Bit mask indicating the enabled positions.
123 EAPI void elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
126 * Get actionslider enabled position.
128 * @param obj The actionslider object.
129 * @return The enabled positions.
131 EAPI Elm_Actionslider_Pos elm_actionslider_enabled_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
134 * Set the label used on the indicator.
136 * @param obj The actionslider object
137 * @param label The label to be set on the indicator.
138 * @deprecated use elm_object_text_set() instead.
140 EINA_DEPRECATED EAPI void elm_actionslider_indicator_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
143 * Get the label used on the indicator object.
145 * @param obj The actionslider object
146 * @return The indicator label
147 * @deprecated use elm_object_text_get() instead.
149 EINA_DEPRECATED EAPI const char *elm_actionslider_indicator_label_get(Evas_Object *obj) EINA_ARG_NONNULL(1);