Check

The check widget allows for toggling a value between true or false (1 or 0). More...


Functions

EAPI Evas_Object * elm_check_add (Evas_Object *parent)
 Add a new Check object.
EAPI void elm_check_label_set (Evas_Object *obj, const char *label)
 Set the text label of the check object.
EAPI const char * elm_check_label_get (Evas_Object *obj)
 Get the text label of the check object.
EAPI void elm_check_icon_set (Evas_Object *obj, Evas_Object *icon)
 Set the icon object of the check object.
EAPI Evas_Object * elm_check_icon_get (Evas_Object *obj)
 Get the icon object of the check object.
EAPI void elm_check_state_set (Evas_Object *obj, Eina_Bool state)
 Set the on/off state of the check object.
EAPI Eina_Bool elm_check_state_get (const Evas_Object *obj)
 Get the state of the check object.
EAPI void elm_check_state_pointer_set (Evas_Object *obj, Eina_Bool *statep)
 Set a convenience pointer to a boolean to change.


Detailed Description

The check widget allows for toggling a value between true or false (1 or 0).

Signals that you can add callbacks for are:

changed - This is called whenever the user changes the state of one of the check object.

Check objects are a lot like radio objects in layout and functionality except they do not work as a group, but independently and only toggle the value of a boolean from false to true (0 or 1). elm_check_state_set() sets the boolean state (1 for true, 0 for false), 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.


Function Documentation

EAPI Evas_Object* elm_check_add ( Evas_Object *  parent  ) 

Add a new Check object.

Parameters:
parent The parent object
Returns:
The new object or NULL if it cannot be created

EAPI Evas_Object* elm_check_icon_get ( Evas_Object *  obj  ) 

Get the icon object of the check object.

Parameters:
obj The check object
Returns:
The icon object

EAPI void elm_check_icon_set ( Evas_Object *  obj,
Evas_Object *  icon 
)

Set the icon object of the check object.

Once the icon object is set, it will become a child of the check object and be deleted when the check object is deleted. If another icon object is set then the previous one becomes orophaned and will no longer be deleted along with the check.

Parameters:
obj The check object
icon The icon object

EAPI const char* elm_check_label_get ( Evas_Object *  obj  ) 

Get the text label of the check object.

Parameters:
obj The check object
Returns:
The text label string in UTF-8

EAPI void elm_check_label_set ( Evas_Object *  obj,
const char *  label 
)

Set the text label of the check object.

Parameters:
obj The check object
label The text label string in UTF-8

EAPI Eina_Bool elm_check_state_get ( const Evas_Object *  obj  ) 

Get the state of the check object.

Parameters:
obj The check object
Returns:
The boolean state

EAPI void elm_check_state_pointer_set ( Evas_Object *  obj,
Eina_Bool *  statep 
)

Set a convenience pointer to a boolean to change.

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

Parameters:
obj The check object
statep Pointer to the boolean to modify

EAPI void elm_check_state_set ( Evas_Object *  obj,
Eina_Bool  state 
)

Set the on/off state of the check object.

This sets the state of the check and will also set the value if pointed to to the state supplied, but will not call any callbacks.

Parameters:
obj The check object
state The state to use (1 == on, 0 == off)