Merge "gengrid TC modified"
[framework/uifw/elementary.git] / tests / 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  * @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
35  *
36  * Supported elm_object common APIs.
37  * @li elm_object_part_text_set
38  * @li elm_object_part_text_get
39  * 
40  * See an example of actionslider usage @ref actionslider_example_page "here"
41  * @{
42  */
43 typedef enum
44 {
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;
51
52 /**
53  * Add a new actionslider to the parent.
54  *
55  * @param parent The parent object
56  * @return The new actionslider object or NULL if it cannot be created
57  */
58 EAPI Evas_Object                *elm_actionslider_add(Evas_Object *parent);
59
60 /**
61  * Get actionslider selected label.
62  *
63  * @param obj The actionslider object
64  * @return The selected label
65  */
66 EAPI const char                 *elm_actionslider_selected_label_get(const Evas_Object *obj);
67
68 /**
69  * Set actionslider indicator position.
70  *
71  * @param obj The actionslider object.
72  * @param pos The position of the indicator.
73  */
74 EAPI void                        elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
75
76 /**
77  * Get actionslider indicator position.
78  *
79  * @param obj The actionslider object.
80  * @return The position of the indicator.
81  */
82 EAPI Elm_Actionslider_Pos        elm_actionslider_indicator_pos_get(const Evas_Object *obj);
83
84 /**
85  * Set actionslider magnet position. To make multiple positions magnets @c or
86  * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
87  *
88  * @param obj The actionslider object.
89  * @param pos Bit mask indicating the magnet positions.
90  */
91 EAPI void                        elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
92
93 /**
94  * Get actionslider magnet position.
95  *
96  * @param obj The actionslider object.
97  * @return The positions with magnet property.
98  */
99 EAPI Elm_Actionslider_Pos        elm_actionslider_magnet_pos_get(const Evas_Object *obj);
100
101 /**
102  * Set actionslider enabled position. To set multiple positions as enabled @c or
103  * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
104  *
105  * @note All the positions are enabled by default.
106  *
107  * @param obj The actionslider object.
108  * @param pos Bit mask indicating the enabled positions.
109  */
110 EAPI void                        elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos);
111
112 /**
113  * Get actionslider enabled position.
114  *
115  * @param obj The actionslider object.
116  * @return The enabled positions.
117  */
118 EAPI Elm_Actionslider_Pos        elm_actionslider_enabled_pos_get(const Evas_Object *obj);
119
120 /**
121  * @}
122  */