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 one of
24 * the check object(event_info is NULL).
26 * Default contents 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 "elm.text" - Label of the check
32 * @ref tutorial_check should give you a firm grasp of how to use this widget.
38 * @brief Add a new Check object
40 * @param parent The parent object
41 * @return The new object or NULL if it cannot be created
43 EAPI Evas_Object * elm_check_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
46 * @brief Set the text label of the check object
48 * @param obj The check object
49 * @param label The text label string in UTF-8
51 * @deprecated use elm_object_text_set() instead.
53 EINA_DEPRECATED EAPI void elm_check_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
56 * @brief Get the text label of the check object
58 * @param obj The check object
59 * @return The text label string in UTF-8
61 * @deprecated use elm_object_text_get() instead.
63 EINA_DEPRECATED EAPI const char *elm_check_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
66 * @brief Set the icon object of the check object
68 * @param obj The check object
69 * @param icon The icon object
71 * Once the icon object is set, a previously set one will be deleted.
72 * If you want to keep that old content object, use the
73 * elm_object_content_unset() function.
75 * @deprecated use elm_object_part_content_set() instead.
78 EINA_DEPRECATED EAPI void elm_check_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
81 * @brief Get the icon object of the check object
83 * @param obj The check object
84 * @return The icon object
86 * @deprecated use elm_object_part_content_get() instead.
89 EINA_DEPRECATED EAPI Evas_Object *elm_check_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
92 * @brief Unset the icon used for the check object
94 * @param obj The check object
95 * @return The icon object that was being used
97 * Unparent and return the icon object which was set for this widget.
99 * @deprecated use elm_object_part_content_unset() instead.
102 EINA_DEPRECATED EAPI Evas_Object *elm_check_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
105 * @brief Set the on/off state of the check object
107 * @param obj The check object
108 * @param state The state to use (1 == on, 0 == off)
110 * This sets the state of the check. If set
111 * with elm_check_state_pointer_set() the state of that variable is also
112 * changed. Calling this @b doesn't cause the "changed" signal to be emited.
114 EAPI void elm_check_state_set(Evas_Object *obj, Eina_Bool state) EINA_ARG_NONNULL(1);
117 * @brief Get the state of the check object
119 * @param obj The check object
120 * @return The boolean state
122 EAPI Eina_Bool elm_check_state_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
125 * @brief Set a convenience pointer to a boolean to change
127 * @param obj The check object
128 * @param statep Pointer to the boolean to modify
130 * This sets a pointer to a boolean, that, in addition to the check objects
131 * state will also be modified directly. To stop setting the object pointed
132 * to simply use NULL as the @p statep parameter. If @p statep is not NULL,
133 * then when this is called, the check objects state will also be modified to
134 * reflect the value of the boolean @p statep points to, just like calling
135 * elm_check_state_set().
137 EAPI void elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep) EINA_ARG_NONNULL(1);
138 EINA_DEPRECATED EAPI void elm_check_states_labels_set(Evas_Object *obj, const char *ontext, const char *offtext) EINA_ARG_NONNULL(1, 2, 3);
139 EINA_DEPRECATED EAPI void elm_check_states_labels_get(const Evas_Object *obj, const char **ontext, const char **offtext) EINA_ARG_NONNULL(1, 2, 3);