2 * @addtogroup Actionslider Actionslider
5 * @image html img/widget/actionslider/preview-00.png
6 * @image latex img/widget/actionslider/preview-00.eps
8 * An actionslider is a switcher for 2 or 3 labels with customizable magnet
9 * properties. The user drags and releases the indicator, to choose a label.
11 * Labels occupy the following positions.
16 * Positions can be enabled or disabled.
18 * Magnets can be set on the above positions.
20 * When the indicator is released, it will move to its nearest "enabled and magnetized" position.
22 * @note By default all positions are set as enabled.
24 * Signals that you can add callbacks for are:
26 * "selected" - when user selects an enabled position (the label is passed as
28 * "pos_changed" - when the indicator reaches any of the positions("left",
29 * "right" or "center").
31 * Default text parts of the actionslider widget that you can use for are:
32 * @li "indicator" - An indicator label of the actionslider
33 * @li "left" - A left label of the actionslider
34 * @li "right" - A right label of the actionslider
35 * @li "center" - A center label of the actionslider
37 * Supported elm_object common APIs.
38 * @li @ref elm_object_part_text_set
39 * @li @ref elm_object_part_text_get
41 * See an example of actionslider usage @ref actionslider_example_page "here"
46 ELM_ACTIONSLIDER_NONE = 0,
47 ELM_ACTIONSLIDER_LEFT = 1 << 0,
48 ELM_ACTIONSLIDER_CENTER = 1 << 1,
49 ELM_ACTIONSLIDER_RIGHT = 1 << 2,
50 ELM_ACTIONSLIDER_ALL = (1 << 3) - 1
51 } Elm_Actionslider_Pos;
54 * Add a new actionslider to the parent.
56 * @param parent The parent object
57 * @return The new actionslider object or NULL if it cannot be created
59 * @ingroup Actionslider
61 EAPI Evas_Object *elm_actionslider_add(Evas_Object *parent);
64 * Get actionslider selected label.
66 * @param obj The actionslider object
67 * @return The selected label
69 * @ingroup Actionslider
71 EAPI const char *elm_actionslider_selected_label_get(const Evas_Object *obj);
74 * Set actionslider indicator position.
76 * @param obj The actionslider object.
77 * @param pos The position of the indicator.
79 * @ingroup Actionslider
81 EAPI void elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
84 * Get actionslider indicator position.
86 * @param obj The actionslider object.
87 * @return The position of the indicator.
89 * @ingroup Actionslider
91 EAPI Elm_Actionslider_Pos elm_actionslider_indicator_pos_get(const Evas_Object *obj);
94 * Set actionslider magnet position. To make multiple positions magnets @c or
95 * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
97 * @param obj The actionslider object.
98 * @param pos Bit mask indicating the magnet positions.
100 * @ingroup Actionslider
102 EAPI void elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
105 * Get actionslider magnet position.
107 * @param obj The actionslider object.
108 * @return The positions with magnet property.
110 * @ingroup Actionslider
112 EAPI Elm_Actionslider_Pos elm_actionslider_magnet_pos_get(const Evas_Object *obj);
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 * @ingroup Actionslider
125 EAPI void elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
128 * Get actionslider enabled position.
130 * @param obj The actionslider object.
131 * @return The enabled positions.
133 * @ingroup Actionslider
135 EAPI Elm_Actionslider_Pos elm_actionslider_enabled_pos_get(const Evas_Object *obj);