2 * @addtogroup Actionslider Actionslider
5 * @image html actionslider_inheritance_tree.png
6 * @image latex actionslider_inheritance_tree.eps
8 * @image html img/widget/actionslider/preview-00.png
9 * @image latex img/widget/actionslider/preview-00.eps
11 * An actionslider is a switcher for 2 or 3 labels with customizable magnet
12 * properties. The user drags and releases the indicator, to choose a label.
14 * Labels occupy the following positions.
19 * Positions can be enabled or disabled.
21 * Magnets can be set on the above positions.
23 * When the indicator is released, it will move to its nearest
24 * "enabled and magnetized" position.
26 * @note By default all positions are set as enabled.
28 * This widget inherits from the @ref Layout one, so that all the
29 * functions acting on it also work for actionslider objects.
31 * This widget emits the following signals, besides the ones sent from
33 * @li @c "selected" - when user selects an enabled position (the
34 * label is passed as event info).
35 * @li @c "pos_changed" - when the indicator reaches any of the
36 * positions("left", "right" or "center").
38 * Default text parts of the actionslider widget that you can use for are:
39 * @li "indicator" - An indicator label of the actionslider
40 * @li "left" - A left label of the actionslider
41 * @li "right" - A right label of the actionslider
42 * @li "center" - A center label of the actionslider
44 * Supported elm_object common APIs.
45 * @li @ref elm_object_part_text_set
46 * @li @ref elm_object_part_text_get
48 * See an example of actionslider usage @ref actionslider_example_page "here"
53 ELM_ACTIONSLIDER_NONE = 0,
54 ELM_ACTIONSLIDER_LEFT = 1 << 0,
55 ELM_ACTIONSLIDER_CENTER = 1 << 1,
56 ELM_ACTIONSLIDER_RIGHT = 1 << 2,
57 ELM_ACTIONSLIDER_ALL = (1 << 3) - 1
58 } Elm_Actionslider_Pos;
61 * Add a new actionslider to the parent.
63 * @param parent The parent object
64 * @return The new actionslider object or NULL if it cannot be created
66 * @ingroup Actionslider
68 EAPI Evas_Object *elm_actionslider_add(Evas_Object *parent);
71 * Get actionslider selected label.
73 * @param obj The actionslider object
74 * @return The selected label
76 * @ingroup Actionslider
78 EAPI const char *elm_actionslider_selected_label_get(const Evas_Object *obj);
81 * Set actionslider indicator position.
83 * @param obj The actionslider object.
84 * @param pos The position of the indicator.
86 * @ingroup Actionslider
88 EAPI void elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
91 * Get actionslider indicator position.
93 * @param obj The actionslider object.
94 * @return The position of the indicator.
96 * @ingroup Actionslider
98 EAPI Elm_Actionslider_Pos elm_actionslider_indicator_pos_get(const Evas_Object *obj);
101 * Set actionslider magnet position. To make multiple positions magnets @c or
102 * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
104 * @param obj The actionslider object.
105 * @param pos Bit mask indicating the magnet positions.
107 * @ingroup Actionslider
109 EAPI void elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
112 * Get actionslider magnet position.
114 * @param obj The actionslider object.
115 * @return The positions with magnet property.
117 * @ingroup Actionslider
119 EAPI Elm_Actionslider_Pos elm_actionslider_magnet_pos_get(const Evas_Object *obj);
122 * Set actionslider enabled position. To set multiple positions as enabled @c or
123 * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
125 * @note All the positions are enabled by default.
127 * @param obj The actionslider object.
128 * @param pos Bit mask indicating the enabled positions.
130 * @ingroup Actionslider
132 EAPI void elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
135 * Get actionslider enabled position.
137 * @param obj The actionslider object.
138 * @return The enabled positions.
140 * @ingroup Actionslider
142 EAPI Elm_Actionslider_Pos elm_actionslider_enabled_pos_get(const Evas_Object *obj);