- Elementary
- Main
- Authors
- Examples
- Files
- Pages
- Types
- Modules

Macros | Functions
Check

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

## Macros
#define | elm_obj_check_state_set(state) ELM_OBJ_CHECK_ID(ELM_OBJ_CHECK_SUB_ID_STATE_SET), EO_TYPECHECK(Eina_Bool, state)
| Set the on/off state of the check object. More...
#define | elm_obj_check_state_get(ret) ELM_OBJ_CHECK_ID(ELM_OBJ_CHECK_SUB_ID_STATE_GET), EO_TYPECHECK(Eina_Bool *, ret)
| Get the state of the check object. More...
#define | elm_obj_check_state_pointer_set(statep) ELM_OBJ_CHECK_ID(ELM_OBJ_CHECK_SUB_ID_STATE_POINTER_SET), EO_TYPECHECK(Eina_Bool *, statep)
| Set a convenience pointer to a boolean to change. More...

## Functions
Evas_Object * | elm_check_add (Evas_Object *parent)
| Add a new Check object. More...
void | elm_check_state_set (Evas_Object *obj, Eina_Bool state)
| Set the on/off state of the check object. More...
Eina_Bool | elm_check_state_get (const Evas_Object *obj)
| Get the state of the check object. More...
void | elm_check_state_pointer_set (Evas_Object *obj, Eina_Bool *statep)
| Set a convenience pointer to a boolean to change. More...

## Detailed Description

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

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 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`).
- `"focused"` - When the check has received focus. (since 1.8)
- `"unfocused"` - When the check has lost focus. (since 1.8)

Default content parts of the check widget that you can use for are:

- "icon" - An icon of the check

Default text parts of the check widget that you can use for are:

- "default" - A label of the check
- "on" - On state label of the check (only valid for "toggle" style.)
- "off" - Off state label of the check (only valid for "toggle" style.)

Supported elm_object common APIs.

- elm_object_disabled_set
- elm_object_disabled_get
- elm_object_part_text_set
- elm_object_part_text_get
- elm_object_part_content_set
- elm_object_part_content_get
- elm_object_part_content_unset
- elm_object_signal_emit
- elm_object_signal_callback_add
- elm_object_signal_callback_del

Check example should give you a firm grasp of how to use this widget.

## Macro Definition Documentation

#define elm_obj_check_state_get | ( |  | ret | ) | ELM_OBJ_CHECK_ID(ELM_OBJ_CHECK_SUB_ID_STATE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Get the state of the check object.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_check_state_get

Referenced by elm_check_state_get().

#define elm_obj_check_state_pointer_set | ( |  | statep | ) | ELM_OBJ_CHECK_ID(ELM_OBJ_CHECK_SUB_ID_STATE_POINTER_SET), EO_TYPECHECK(Eina_Bool *, statep)

Set a convenience pointer to a boolean to change.

Since
  1.8

Parameters

  [in] | statep |

See Also
  elm_check_state_pointer_set

Referenced by elm_check_state_pointer_set().

#define elm_obj_check_state_set | ( |  | state | ) | ELM_OBJ_CHECK_ID(ELM_OBJ_CHECK_SUB_ID_STATE_SET), EO_TYPECHECK(Eina_Bool, state)

Set the on/off state of the check object.

Since
  1.8

Parameters

  [in] | state |

See Also
  elm_check_state_set

Referenced by elm_check_state_set().

## Function Documentation

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

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

References elm_obj_check_state_get.

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

Set a convenience pointer to a boolean to change.

Parameters

  obj | The check object
  statep | Pointer to the boolean to modify

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().

References elm_obj_check_state_pointer_set.

void elm_check_state_set | ( | Evas_Object * | obj,
|  | Eina_Bool | state
| ) |  |

Set the on/off state of the check object.

Parameters

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

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.

References elm_obj_check_state_set.

Copyright ©2000-2014 Enlightenment.org - Samsung Electronics supports the EFL Documentation Project - Generated Wed Jan 8 2014 20:51:12