Merge "[Notify]Applied Open source patch to simulate transition effect while showing"
[framework/uifw/elementary.git] / src / lib / elm_check.h
1 /**
2  * @defgroup Check Check
3  * @ingroup Elementary
4  *
5  * @image html img/widget/check/preview-00.png
6  * @image latex img/widget/check/preview-00.eps
7  * @image html img/widget/check/preview-01.png
8  * @image latex img/widget/check/preview-01.eps
9  * @image html img/widget/check/preview-02.png
10  * @image latex img/widget/check/preview-02.eps
11  *
12  * @brief The check widget allows for toggling a value between true and
13  * false.
14  *
15  * Check objects are a lot like radio objects in layout and functionality
16  * except they do not work as a group, but independently and only toggle the
17  * value of a boolean from false to true (0 or 1). elm_check_state_set() sets
18  * the boolean state (1 for true, 0 for false), and elm_check_state_get()
19  * returns the current state. For convenience, like the radio objects, you
20  * can set a pointer to a boolean directly with elm_check_state_pointer_set()
21  * for it to modify.
22  *
23  * Signals that you can add callbacks for are:
24  * "changed" - This is called whenever the user changes the state of the check
25  *             objects(event_info is NULL).
26  *
27  * Default content parts of the check widget that you can use for are:
28  * @li "icon" - An icon of the check
29  *
30  * Default text parts of the check widget that you can use for are:
31  * @li "default" - A label of the check
32  * @li "on" - On state label of the check
33  * @li "off" - Off state label of the check
34  *
35  * Supported elm_object common APIs.
36  * @li @ref elm_object_disabled_set
37  * @li @ref elm_object_disabled_get
38  * @li @ref elm_object_part_text_set
39  * @li @ref elm_object_part_text_get
40  * @li @ref elm_object_part_content_set
41  * @li @ref elm_object_part_content_get
42  * @li @ref elm_object_part_content_unset
43  * @li @ref elm_object_signal_emit
44  * @li @ref elm_object_signal_callback_add
45  * @li @ref elm_object_signal_callback_del
46  *
47  * @ref tutorial_check should give you a firm grasp of how to use this widget.
48  *
49  * @{
50  */
51
52 /**
53  * @brief Add a new Check object
54  *
55  * @param parent The parent object
56  * @return The new object or NULL if it cannot be created
57  *
58  * @ingroup Check
59  */
60 EAPI Evas_Object *                elm_check_add(Evas_Object *parent);
61
62 /**
63  * @brief Set the on/off state of the check object
64  *
65  * @param obj The check object
66  * @param state The state to use (1 == on, 0 == off)
67  *
68  * This sets the state of the check. If set with elm_check_state_pointer_set()
69  * the state of that variable is also changed. Calling this @b doesn't cause
70  * the "changed" signal to be emitted.
71  *
72  * @ingroup Check
73  */
74 EAPI void                         elm_check_state_set(Evas_Object *obj, Eina_Bool state);
75
76 /**
77  * @brief Get the state of the check object
78  *
79  * @param obj The check object
80  * @return The boolean state
81  *
82  * @ingroup Check
83  */
84 EAPI Eina_Bool                    elm_check_state_get(const Evas_Object *obj);
85
86 /**
87  * @brief Set a convenience pointer to a boolean to change
88  *
89  * @param obj The check object
90  * @param statep Pointer to the boolean to modify
91  *
92  * This sets a pointer to a boolean, that, in addition to the check objects
93  * state will also be modified directly. To stop setting the object pointed
94  * to simply use NULL as the @p statep parameter. If @p statep is not NULL,
95  * then when this is called, the check objects state will also be modified to
96  * reflect the value of the boolean @p statep points to, just like calling
97  * elm_check_state_set().
98  *
99  * @ingroup Check
100  */
101 EAPI void                         elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep);
102
103 /**
104  * @}
105  */