Tizen Native API

The check widget allows for toggling a value between true and false.

check_inheritance_tree.png

Check objects are a lot like radio objects in the layout and functionality, except that they do not work as a group, but independently, and only toggle the value of a boolean between false and true. elm_check_state_set() sets the boolean state and elm_check_state_get() returns the current state. For convenience, like the radio objects, you can set a pointer to a boolean directly with elm_check_state_pointer_set() for it to modify.

This widget inherits from the Layout one, so that all the functions acting on it also work for check objects.

This widget emits the following signals, besides the ones sent from Layout :

  • "changed" - This is called whenever the user changes the state of the check objects (event_info is always NULL).

The default content parts of the check widget that you can use are:

  • "icon" - An icon of the check.

The default text parts of the check widget that you can use are:

  • "default" - A label of the check.
  • "on" - On state label of the check.
  • "off" - Off state label of the check.

Supported common elm_object APIs.

Functions

Evas_Objectelm_check_add (Evas_Object *parent)
 Adds a new Check object.
void elm_check_state_set (Evas_Object *obj, Eina_Bool state)
 Sets the on/off state of the check object.
Eina_Bool elm_check_state_get (const Evas_Object *obj)
 Gets the state of the check object.
void elm_check_state_pointer_set (Evas_Object *obj, Eina_Bool *statep)
 Sets a convenience pointer to a boolean to change.

Function Documentation

Adds a new Check object.

Since :
2.3.1
Parameters:
[in]parentThe parent object
Returns:
The new object, otherwise NULL if it cannot be created

Gets the state of the check object.

Since :
2.3.1
Parameters:
[in]objThe check object
Returns:
The boolean state
void elm_check_state_pointer_set ( Evas_Object obj,
Eina_Bool statep 
)

Sets a convenience pointer to a boolean to change.

This sets a pointer to a boolean, that, in addition to the check objects state is also modified directly. To stop setting the object to simply use NULL as the statep parameter. If statep is not NULL, then when this is called, the check objects state is also modified to reflect the value of the boolean that statep points to, just like calling elm_check_state_set().

Since :
2.3.1
Parameters:
[in]objThe check object
[in]statepA pointer to the boolean to modify
void elm_check_state_set ( Evas_Object obj,
Eina_Bool  state 
)

Sets the on/off state of the check object.

This sets the state of the check. If set with elm_check_state_pointer_set() the state of that variable is also changed. Calling this doesn't cause the "changed" signal to be emitted.

Since :
2.3.1
Parameters:
[in]objThe check object
[in]stateThe state to use (1 == on, 0 == off)