Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Related Pages

RadioButton: A Radio Button Widget and Grouping System

Provides for a simple radiobutton with label, and to group radio buttons for selecting a single option. More...

Data Structures

struct  Ewl_RadioButton
 Inherits from Ewl_CheckButton and extends it to provide grouping buttons to limit to a single selection in a group at a given time. More...


Defines

#define EWL_RADIOBUTTON(button)   ((Ewl_RadioButton *) button)
 Typecasts a pointer to an Ewl_RadioButton pointer.

#define ewl_radiobutton_checked_set(r, c)   ewl_checkbutton_checked_set(EWL_CHECKBUTTON(r), c)
 Shortcut for setting the checked status on the inherited Ewl_CheckButton fields.

#define ewl_radiobutton_is_checked(r)   ewl_checkbutton_is_checked(EWL_CHECKBUTTON(r))
 Shortcut for checking the checked status on the inherited Ewl_CheckButton fields.


Typedefs

typedef Ewl_RadioButton Ewl_RadioButton
 The radio button provides a means for selecting a single item from a group of options.


Functions

Ewl_Widgetewl_radiobutton_new (char *l)
 Allocate and initialize a new radio button.

void ewl_radiobutton_init (Ewl_RadioButton *cb, char *label)
 Initialize the radio button fields and callbacks.

void ewl_radiobutton_chain_set (Ewl_RadioButton *w, Ewl_RadioButton *c)
 Attach the button to a chain of radio buttons.


Detailed Description

Provides for a simple radiobutton with label, and to group radio buttons for selecting a single option.


Function Documentation

void ewl_radiobutton_chain_set Ewl_RadioButton rb,
Ewl_RadioButton crb
 

Attach the button to a chain of radio buttons.

Parameters:
rb: the radio button to be added to a chain of radio buttons
crb: a radio button already in the chain of radio buttons
Returns:
Returns no value.
Associates w with the same chain as c, in order to ensure that only one radio button of that group is checked at any time.

void ewl_radiobutton_init Ewl_RadioButton rb,
char *  label
 

Initialize the radio button fields and callbacks.

Parameters:
rb: the radio button to initialize
label: the label for the initialized radio button
Returns:
Returns no value.
Sets internal fields of the radio button to default values and sets the label to the specified label.

Ewl_Widget* ewl_radiobutton_new char *  label  ) 
 

Allocate and initialize a new radio button.

Parameters:
label: the label to associate with the radio button
Returns:
Returns a pointer to new radio button on success, NULL on failure.