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