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

CheckButton: A CheckButton with Label

Defines an Ewl_CheckButton that inherits from Ewl_Widget and provides an Ewl_Check that changes value on each click. More...

Data Structures

struct  Ewl_CheckButton
 Inherits from Ewl_Widget and expands to provide a stateful check button. More...

struct  Ewl_CheckButton
 Inherits from Ewl_Widget and expands to provide a stateful check button. More...


Defines

#define EWL_CHECKBUTTON(button)   ((Ewl_CheckButton *) button)
 Typecasts a pointer to an Ewl_CheckButton pointer.

#define ewl_checkbutton_checked_set(cb, c)   ewl_check_checked_set(EWL_CHECK(EWL_CHECKBUTTON(cb)->check), c)
 ; Shortcut for dereferencing the checkbutton to update the checked state of the Ewl_Check.

#define ewl_checkbutton_is_checked(cb)   ewl_check_is_checked(EWL_CHECK(EWL_CHECKBUTTON(cb)->check))
 ; Shortcut for dereferencing the checkbutton to test the checked state of the Ewl_Check.


Typedefs

typedef Ewl_CheckButton Ewl_CheckButton
 The button class is a basic button with a label.


Functions

Ewl_Widgetewl_checkbutton_new (char *l)
 Allocate and initialize a new check button.

void ewl_checkbutton_init (Ewl_CheckButton *cb, char *label)
 Initialize the members and callbacks of a check button.

void ewl_checkbutton_label_position_set (Ewl_CheckButton *cb, Ewl_Position p)
 Set the check buttons label position.


Detailed Description

Defines an Ewl_CheckButton that inherits from Ewl_Widget and provides an Ewl_Check that changes value on each click.


Typedef Documentation

typedef struct Ewl_CheckButton Ewl_CheckButton
 

The button class is a basic button with a label.

This class is inherited by the check button and radio button classes.


Function Documentation

void ewl_checkbutton_init Ewl_CheckButton cb,
char *  label
 

Initialize the members and callbacks of a check button.

Parameters:
cb: the check button to initialize
label: the label to give the initialized check button
Returns:
Returns no value.
The internal structures and callbacks of the checkbutton are initialized to default values.

void ewl_checkbutton_label_position_set Ewl_CheckButton cb,
Ewl_Position  p
 

Set the check buttons label position.

Parameters:
cb: the widget to change the label positioning
p: the new position of the label
Returns:
Returns no value.
Changes the position of the label associated with the check button.

Ewl_Widget* ewl_checkbutton_new char *  label  ) 
 

Allocate and initialize a new check button.

Parameters:
label: the label to display with the checkbutton, NULL for no label
Returns:
Returns the newly allocated checkbutton on success, NULL on failure.