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 as
27 * "pos_changed" - when the indicator reaches any of the positions("left",
28 * "right" or "center").
30 * Default text parts of the actionslider widget that you can use for are:
31 * @li "indicator" - A indicator label of the actionslider
32 * @li "left" - A left label of the actionslider
33 * @li "right" - A right label of the actionslider
34 * @li "center" - A center label of the actionslider
36 * Supported elm_object common APIs.
37 * @li elm_object_part_text_set
38 * @li elm_object_part_text_get
40 * See an example of actionslider usage @ref actionslider_example_page "here"
45 ELM_ACTIONSLIDER_NONE = 0,
46 ELM_ACTIONSLIDER_LEFT = 1 << 0,
47 ELM_ACTIONSLIDER_CENTER = 1 << 1,
48 ELM_ACTIONSLIDER_RIGHT = 1 << 2,
49 ELM_ACTIONSLIDER_ALL = (1 << 3) - 1
50 } Elm_Actionslider_Pos;
53 * Add a new actionslider to the parent.
55 * @param parent The parent object
56 * @return The new actionslider object or NULL if it cannot be created
58 EAPI Evas_Object *elm_actionslider_add(Evas_Object *parent);
61 * Get actionslider selected label.
63 * @param obj The actionslider object
64 * @return The selected label
66 EAPI const char *elm_actionslider_selected_label_get(const Evas_Object *obj);
69 * Set actionslider indicator position.
71 * @param obj The actionslider object.
72 * @param pos The position of the indicator.
74 EAPI void elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
77 * Get actionslider indicator position.
79 * @param obj The actionslider object.
80 * @return The position of the indicator.
82 EAPI Elm_Actionslider_Pos elm_actionslider_indicator_pos_get(const Evas_Object *obj);
85 * Set actionslider magnet position. To make multiple positions magnets @c or
86 * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
88 * @param obj The actionslider object.
89 * @param pos Bit mask indicating the magnet positions.
91 EAPI void elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
94 * Get actionslider magnet position.
96 * @param obj The actionslider object.
97 * @return The positions with magnet property.
99 EAPI Elm_Actionslider_Pos elm_actionslider_magnet_pos_get(const Evas_Object *obj);
102 * Set actionslider enabled position. To set multiple positions as enabled @c or
103 * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
105 * @note All the positions are enabled by default.
107 * @param obj The actionslider object.
108 * @param pos Bit mask indicating the enabled positions.
110 EAPI void elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
113 * Get actionslider enabled position.
115 * @param obj The actionslider object.
116 * @return The enabled positions.
118 EAPI Elm_Actionslider_Pos elm_actionslider_enabled_pos_get(const Evas_Object *obj);
121 * Hold actionslider object movement.
123 * @param[in] obj The actionslider object
124 * @param[in] flag Actionslider hold/release
125 * (EINA_TURE = hold/EIN_FALSE = release)
127 * @ingroup Actionslider
129 EAPI void elm_actionslider_hold(Evas_Object *obj, Eina_Bool flag);
138 ELM_ACTIONSLIDER_LABEL_LEFT,
139 ELM_ACTIONSLIDER_LABEL_RIGHT,
140 ELM_ACTIONSLIDER_LABEL_CENTER,
141 ELM_ACTIONSLIDER_LABEL_BUTTON
142 } Elm_Actionslider_Label_Pos;