move lots of deprecated stuff into deprecated files. need 2 right now.
[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
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                *elm_actionslider_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
50
51 /**
52  * Get actionslider selected label.
53  *
54  * @param obj The actionslider object
55  * @return The selected label
56  */
57 EAPI const char                 *elm_actionslider_selected_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
58
59 /**
60  * Set actionslider indicator position.
61  *
62  * @param obj The actionslider object.
63  * @param pos The position of the indicator.
64  */
65 EAPI void                        elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
66
67 /**
68  * Get actionslider indicator position.
69  *
70  * @param obj The actionslider object.
71  * @return The position of the indicator.
72  */
73 EAPI Elm_Actionslider_Pos        elm_actionslider_indicator_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
74
75 /**
76  * Set actionslider magnet position. To make multiple positions magnets @c or
77  * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
78  *
79  * @param obj The actionslider object.
80  * @param pos Bit mask indicating the magnet positions.
81  */
82 EAPI void                        elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
83
84 /**
85  * Get actionslider magnet position.
86  *
87  * @param obj The actionslider object.
88  * @return The positions with magnet property.
89  */
90 EAPI Elm_Actionslider_Pos        elm_actionslider_magnet_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
91
92 /**
93  * Set actionslider enabled position. To set multiple positions as enabled @c or
94  * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
95  *
96  * @note All the positions are enabled by default.
97  *
98  * @param obj The actionslider object.
99  * @param pos Bit mask indicating the enabled positions.
100  */
101 EAPI void                        elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
102
103 /**
104  * Get actionslider enabled position.
105  *
106  * @param obj The actionslider object.
107  * @return The enabled positions.
108  */
109 EAPI Elm_Actionslider_Pos        elm_actionslider_enabled_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
110
111 /**
112  * @}
113  */