2 * @defgroup Check Check
4 * @image html img/widget/check/preview-00.png
5 * @image latex img/widget/check/preview-00.eps
6 * @image html img/widget/check/preview-01.png
7 * @image latex img/widget/check/preview-01.eps
8 * @image html img/widget/check/preview-02.png
9 * @image latex img/widget/check/preview-02.eps
11 * @brief The check widget allows for toggling a value between true and
14 * Check objects are a lot like radio objects in layout and functionality
15 * except they do not work as a group, but independently and only toggle the
16 * value of a boolean from false to true (0 or 1). elm_check_state_set() sets
17 * the boolean state (1 for true, 0 for false), and elm_check_state_get()
18 * returns the current state. For convenience, like the radio objects, you
19 * can set a pointer to a boolean directly with elm_check_state_pointer_set()
22 * Signals that you can add callbacks for are:
23 * "changed" - This is called whenever the user changes the state of the check
24 * objects(event_info is NULL).
26 * Default content parts of the check widget that you can use for are:
27 * @li "icon" - An icon of the check
29 * Default text parts of the check widget that you can use for are:
30 * @li "default" - A label of the check
31 * @li "on" - On state label of the check
32 * @li "off" - Off state label of the check
34 * Supported elm_object common APIs.
35 * @li elm_object_disabled_set
36 * @li elm_object_disabled_get
37 * @li elm_object_part_text_set
38 * @li elm_object_part_text_get
39 * @li elm_object_part_content_set
40 * @li elm_object_part_content_get
41 * @li elm_object_part_content_unset
42 * @li elm_object_signal_emit
43 * @li elm_object_signal_callback_add
44 * @li elm_object_signal_callback_del
46 * @ref tutorial_check should give you a firm grasp of how to use this widget.
52 * @brief Add a new Check object
54 * @param parent The parent object
55 * @return The new object or NULL if it cannot be created
57 EAPI Evas_Object * elm_check_add(Evas_Object *parent);
60 * @brief Set the on/off state of the check object
62 * @param obj The check object
63 * @param state The state to use (1 == on, 0 == off)
65 * This sets the state of the check. If set with elm_check_state_pointer_set()
66 * the state of that variable is also changed. Calling this @b doesn't cause
67 * the "changed" signal to be emitted.
69 EAPI void elm_check_state_set(Evas_Object *obj, Eina_Bool state);
72 * @brief Get the state of the check object
74 * @param obj The check object
75 * @return The boolean state
77 EAPI Eina_Bool elm_check_state_get(const Evas_Object *obj);
80 * @brief Set a convenience pointer to a boolean to change
82 * @param obj The check object
83 * @param statep Pointer to the boolean to modify
85 * This sets a pointer to a boolean, that, in addition to the check objects
86 * state will also be modified directly. To stop setting the object pointed
87 * to simply use NULL as the @p statep parameter. If @p statep is not NULL,
88 * then when this is called, the check objects state will also be modified to
89 * reflect the value of the boolean @p statep points to, just like calling
90 * elm_check_state_set().
92 EAPI void elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep);