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