Functions
Radio

Radio is a widget that allows for 1 or more options to be displayed and have the user choose only 1 of them. More...

Functions

void elm_radio::group_add (evas::object group_) const
 Add this radio to a group of other radio objects. More...
 
int elm_radio::state_value_get () const
 Get the integer value that this radio object represents. More...
 
void elm_radio::state_value_set (int value_) const
 Get the integer value that this radio object represents. More...
 
int elm_radio::value_get () const
 Get the value of the radio group. More...
 
void elm_radio::value_set (int value_) const
 Get the value of the radio group. More...
 
evas::object elm_radio::selected_object_get () const
 Get the selected radio object. More...
 
Evas_Object * elm_radio_add (Evas_Object *parent)
 Add a new radio to the parent. More...
 

Detailed Description

Radio is a widget that allows for 1 or more options to be displayed and have the user choose only 1 of them.

radio_inheritance_tree.png
preview-00.png

A radio object contains an indicator, an optional Label and an optional icon object. While it's possible to have a group of only one radio they, are normally used in groups of 2 or more.

elm_radio objects are grouped in a slightly different, compared to other UI toolkits. There is no seperate group name/id to remember or manage. The members represent the group, there are the group. To make a group, use elm_radio_group_add() and pass existing radio object and the new radio object.

The radio object(s) will select from one of a set of integer values, so any value they are configuring needs to be mapped to a set of integers. To configure what value that radio object represents, use elm_radio_state_value_set() to set the integer it represents. To set the value the whole group(which one is currently selected) is to indicate use elm_radio_value_set() on any group member, and to get the groups value use elm_radio_value_get(). For convenience the radio objects are also able to directly set an integer(int) to the value that is selected. To specify the pointer to this integer to modify, use elm_radio_value_pointer_set(). The radio objects will modify this directly. That implies the pointer must point to valid memory for as long as the radio objects exist.

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

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

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

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

Supported elm_object common APIs.

Radio example show most of this API in action.

Function Documentation

Evas_Object* elm_radio_add ( Evas_Object *  parent)

Add a new radio to the parent.

Parameters
parentThe parent object
Returns
The new object or NULL if it cannot be created
void elm_radio::group_add ( evas::object  group_) const
inline

Add this radio to a group of other radio objects.

Radio objects work in groups. Each member should have a different integer value assigned. In order to have them work as a group, they need to know about each other. This adds the given radio object to the group of which the group object indicated is a member.

Parameters
groupAny object whose group the obj is to join.
evas::object elm_radio::selected_object_get ( ) const
inline

Get the selected radio object.

Returns
The selected radio object
int elm_radio::state_value_get ( ) const
inline

Get the integer value that this radio object represents.

Returns
The value used if this radio object is selected

This gets the value of the radio.

See also
elm_radio_value_set()
Parameters
valueThe value to use if this radio object is selected
void elm_radio::state_value_set ( int  value_) const
inline

Get the integer value that this radio object represents.

Returns
The value used if this radio object is selected

This gets the value of the radio.

See also
elm_radio_value_set()
Parameters
valueThe value to use if this radio object is selected
int elm_radio::value_get ( ) const
inline

Get the value of the radio group.

Returns
The integer state
Parameters
valueThe value to use for the group
void elm_radio::value_set ( int  value_) const
inline

Get the value of the radio group.

Returns
The integer state
Parameters
valueThe value to use for the group