Download

Support

Ewl_Radiobutton: A Radio Button Widget and Grouping System


Detailed Description

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

Remarks:
Inherits from Ewl_Checkbutton.


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)
#define ewl_radiobutton_checked_set(r, c)   ewl_checkbutton_checked_set(EWL_CHECKBUTTON(r), c)
#define EWL_RADIOBUTTON_IS(w)   (ewl_widget_type_is(EWL_WIDGET(w), EWL_RADIOBUTTON_TYPE))
#define ewl_radiobutton_is_checked(r)   ewl_checkbutton_is_checked(EWL_CHECKBUTTON(r))
#define EWL_RADIOBUTTON_TYPE   "radiobutton"

Typedefs

typedef struct Ewl_Radiobutton Ewl_Radiobutton

Functions

void ewl_radiobutton_cb_clicked (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_radiobutton_cb_destroy (Ewl_Widget *w, void *ev_data, void *user_data)
Ewl_Radiobuttonewl_radiobutton_chain_selected_get (Ewl_Radiobutton *rb)
void ewl_radiobutton_chain_set (Ewl_Radiobutton *rb, Ewl_Radiobutton *crb)
 Attach the button to a chain of radio buttons.
int ewl_radiobutton_init (Ewl_Radiobutton *rb)
 Initialize the radio button fields and callbacks.
Ewl_Widgetewl_radiobutton_new (void)
 Allocate and initialize a new radio button.
void * ewl_radiobutton_value_get (Ewl_Radiobutton *rb)
void ewl_radiobutton_value_set (Ewl_Radiobutton *rb, void *v)

Define Documentation

#define EWL_RADIOBUTTON ( button   )     ((Ewl_Radiobutton *) button)

#define ewl_radiobutton_checked_set ( r,
 )     ewl_checkbutton_checked_set(EWL_CHECKBUTTON(r), c)

Shortcut for setting the checked status on the inherited Ewl_Checkbutton fields.

#define EWL_RADIOBUTTON_IS (  )     (ewl_widget_type_is(EWL_WIDGET(w), EWL_RADIOBUTTON_TYPE))

Returns TRUE if the widget is an Ewl_Radiobutton, FALSE otherwise

#define ewl_radiobutton_is_checked (  )     ewl_checkbutton_is_checked(EWL_CHECKBUTTON(r))

Shortcut for checking the checked status on the inherited Ewl_Checkbutton fields.


Typedef Documentation

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


Function Documentation

void ewl_radiobutton_cb_destroy ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

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.

References chain, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, and EWL_RADIOBUTTON_TYPE.

Referenced by ewl_colorpicker_init().

int ewl_radiobutton_init ( Ewl_Radiobutton rb  ) 

Initialize the radio button fields and callbacks.

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

References Ewl_Checkbutton::check, DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, ewl_callback_append(), EWL_CALLBACK_CLICKED, EWL_CALLBACK_DESTROY, ewl_callback_prepend(), EWL_CHECKBUTTON, ewl_checkbutton_init(), ewl_radiobutton_cb_clicked(), ewl_radiobutton_cb_destroy(), EWL_RADIOBUTTON_TYPE, EWL_WIDGET, ewl_widget_appearance_set(), and ewl_widget_inherit().

Referenced by ewl_radiobutton_new().

Ewl_Widget* ewl_radiobutton_new ( void   ) 

Allocate and initialize a new radio button.

Returns:
Returns a pointer to new radio button on success, NULL on failure.

References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_radiobutton_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.

void* ewl_radiobutton_value_get ( Ewl_Radiobutton rb  ) 

void ewl_radiobutton_value_set ( Ewl_Radiobutton rb,
void *  v 
)


Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sat May 17 16:51:10 2008