2 * @defgroup Check Check
5 * @image html check_inheritance_tree.png
6 * @image latex check_inheritance_tree.eps
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
15 * @brief The check widget allows for toggling a value between true
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.
26 * This widget inherits from the @ref Layout one, so that all the
27 * functions acting on it also work for check objects.
29 * This widget emits the following signals, besides the ones sent from
31 * - @c "changed" - This is called whenever the user changes the state of
32 * the check objects (@c event_info is always @c NULL).
34 * Default content parts of the check widget that you can use for are:
35 * @li "icon" - An icon of the check
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
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
54 * @ref tutorial_check should give you a firm grasp of how to use this widget.
60 * @brief Add a new Check object
62 * @param parent The parent object
63 * @return The new object or NULL if it cannot be created
67 EAPI Evas_Object * elm_check_add(Evas_Object *parent);
70 * @brief Set the on/off state of the check object
72 * @param obj The check object
73 * @param state The state to use (1 == on, 0 == off)
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.
81 EAPI void elm_check_state_set(Evas_Object *obj, Eina_Bool state);
84 * @brief Get the state of the check object
86 * @param obj The check object
87 * @return The boolean state
91 EAPI Eina_Bool elm_check_state_get(const Evas_Object *obj);
94 * @brief Set a convenience pointer to a boolean to change
96 * @param obj The check object
97 * @param statep Pointer to the boolean to modify
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().
108 EAPI void elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep);