Add the reorder feature when the more panel is shown.
[framework/uifw/elementary.git] / src / lib / elm_actionslider.h
1 /**
2  * @addtogroup Actionslider Actionslider
3  * @ingroup Elementary
4  *
5  * @image html img/widget/actionslider/preview-00.png
6  * @image latex img/widget/actionslider/preview-00.eps
7  *
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.
10  *
11  * Labels occupy the following positions.
12  * a. Left
13  * b. Right
14  * c. Center
15  *
16  * Positions can be enabled or disabled.
17  *
18  * Magnets can be set on the above positions.
19  *
20  * When the indicator is released, it will move to its nearest "enabled and magnetized" position.
21  *
22  * @note By default all positions are set as enabled.
23  *
24  * Signals that you can add callbacks for are:
25  *
26  * "selected" - when user selects an enabled position (the label is passed as
27  *              event info)".
28  * "pos_changed" - when the indicator reaches any of the positions("left",
29  *                 "right" or "center").
30  *
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
36  *
37  * Supported elm_object common APIs.
38  * @li @ref elm_object_part_text_set
39  * @li @ref elm_object_part_text_get
40  *
41  * See an example of actionslider usage @ref actionslider_example_page "here"
42  * @{
43  */
44 typedef enum
45 {
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;
52
53 /**
54  * Add a new actionslider to the parent.
55  *
56  * @param parent The parent object
57  * @return The new actionslider object or NULL if it cannot be created
58  *
59  * @ingroup Actionslider
60  */
61 EAPI Evas_Object                *elm_actionslider_add(Evas_Object *parent);
62
63 /**
64  * Get actionslider selected label.
65  *
66  * @param obj The actionslider object
67  * @return The selected label
68  *
69  * @ingroup Actionslider
70  */
71 EAPI const char                 *elm_actionslider_selected_label_get(const Evas_Object *obj);
72
73 /**
74  * Set actionslider indicator position.
75  *
76  * @param obj The actionslider object.
77  * @param pos The position of the indicator.
78  *
79  * @ingroup Actionslider
80  */
81 EAPI void                        elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
82
83 /**
84  * Get actionslider indicator position.
85  *
86  * @param obj The actionslider object.
87  * @return The position of the indicator.
88  *
89  * @ingroup Actionslider
90  */
91 EAPI Elm_Actionslider_Pos        elm_actionslider_indicator_pos_get(const Evas_Object *obj);
92
93 /**
94  * Set actionslider magnet position. To make multiple positions magnets @c or
95  * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
96  *
97  * @param obj The actionslider object.
98  * @param pos Bit mask indicating the magnet positions.
99  *
100  * @ingroup Actionslider
101  */
102 EAPI void                        elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
103
104 /**
105  * Get actionslider magnet position.
106  *
107  * @param obj The actionslider object.
108  * @return The positions with magnet property.
109  *
110  * @ingroup Actionslider
111  */
112 EAPI Elm_Actionslider_Pos        elm_actionslider_magnet_pos_get(const Evas_Object *obj);
113
114 /**
115  * Set actionslider enabled position. To set multiple positions as enabled @c or
116  * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
117  *
118  * @note All the positions are enabled by default.
119  *
120  * @param obj The actionslider object.
121  * @param pos Bit mask indicating the enabled positions.
122  *
123  * @ingroup Actionslider
124  */
125 EAPI void                        elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
126
127 /**
128  * Get actionslider enabled position.
129  *
130  * @param obj The actionslider object.
131  * @return The enabled positions.
132  *
133  * @ingroup Actionslider
134  */
135 EAPI Elm_Actionslider_Pos        elm_actionslider_enabled_pos_get(const Evas_Object *obj);
136
137 /**
138  * @}
139  */