fomatting of headers -> fixup. and documentation fixing.
[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
26  *              as event info)".
27  * @n
28  * "pos_changed" - when the indicator reaches any of the positions("left",
29  *                 "right" or "center").
30  *
31  * See an example of actionslider usage @ref actionslider_example_page "here"
32  * @{
33  */
34 typedef enum _Elm_Actionslider_Pos
35 {
36    ELM_ACTIONSLIDER_NONE = 0,
37    ELM_ACTIONSLIDER_LEFT = 1 << 0,
38    ELM_ACTIONSLIDER_CENTER = 1 << 1,
39    ELM_ACTIONSLIDER_RIGHT = 1 << 2,
40    ELM_ACTIONSLIDER_ALL = (1 << 3) - 1
41 } Elm_Actionslider_Pos;
42
43 /**
44  * Add a new actionslider to the parent.
45  *
46  * @param parent The parent object
47  * @return The new actionslider object or NULL if it cannot be created
48  */
49 EAPI Evas_Object *
50                                  elm_actionslider_add(Evas_Object *parent)
51 EINA_ARG_NONNULL(1);
52
53 /**
54  * Set actionslider labels.
55  *
56  * @param obj The actionslider object
57  * @param left_label The label to be set on the left.
58  * @param center_label The label to be set on the center.
59  * @param right_label The label to be set on the right.
60  * @deprecated use elm_object_text_set() instead.
61  */
62 EINA_DEPRECATED EAPI void        elm_actionslider_labels_set(Evas_Object *obj, const char *left_label, const char *center_label, const char *right_label) EINA_ARG_NONNULL(1);
63
64 /**
65  * Get actionslider labels.
66  *
67  * @param obj The actionslider object
68  * @param left_label A char** to place the left_label of @p obj into.
69  * @param center_label A char** to place the center_label of @p obj into.
70  * @param right_label A char** to place the right_label of @p obj into.
71  * @deprecated use elm_object_text_set() instead.
72  */
73 EINA_DEPRECATED EAPI void        elm_actionslider_labels_get(const Evas_Object *obj, const char **left_label, const char **center_label, const char **right_label) EINA_ARG_NONNULL(1);
74
75 /**
76  * Get actionslider selected label.
77  *
78  * @param obj The actionslider object
79  * @return The selected label
80  */
81 EAPI const char                 *elm_actionslider_selected_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
82
83 /**
84  * Set actionslider indicator position.
85  *
86  * @param obj The actionslider object.
87  * @param pos The position of the indicator.
88  */
89 EAPI void                        elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
90
91 /**
92  * Get actionslider indicator position.
93  *
94  * @param obj The actionslider object.
95  * @return The position of the indicator.
96  */
97 EAPI Elm_Actionslider_Pos        elm_actionslider_indicator_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
98
99 /**
100  * Set actionslider magnet position. To make multiple positions magnets @c or
101  * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
102  *
103  * @param obj The actionslider object.
104  * @param pos Bit mask indicating the magnet positions.
105  */
106 EAPI void                        elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
107
108 /**
109  * Get actionslider magnet position.
110  *
111  * @param obj The actionslider object.
112  * @return The positions with magnet property.
113  */
114 EAPI Elm_Actionslider_Pos        elm_actionslider_magnet_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
115
116 /**
117  * Set actionslider enabled position. To set multiple positions as enabled @c or
118  * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
119  *
120  * @note All the positions are enabled by default.
121  *
122  * @param obj The actionslider object.
123  * @param pos Bit mask indicating the enabled positions.
124  */
125 EAPI void                        elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
126
127 /**
128  * Get actionslider enabled position.
129  *
130  * @param obj The actionslider object.
131  * @return The enabled positions.
132  */
133 EAPI Elm_Actionslider_Pos        elm_actionslider_enabled_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
134
135 /**
136  * Set the label used on the indicator.
137  *
138  * @param obj The actionslider object
139  * @param label The label to be set on the indicator.
140  * @deprecated use elm_object_text_set() instead.
141  */
142 EINA_DEPRECATED EAPI void        elm_actionslider_indicator_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
143
144 /**
145  * Get the label used on the indicator object.
146  *
147  * @param obj The actionslider object
148  * @return The indicator label
149  * @deprecated use elm_object_text_get() instead.
150  */
151 EINA_DEPRECATED EAPI const char *elm_actionslider_indicator_label_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
152
153 /**
154  * @}
155  */