Ewl_Togglebutton: An Ewl_Togglebutton with Label
Detailed Description
Defines an Ewl_Togglebutton that inherits from Ewl_Button and provides a button that serves as a switch so it has a pressed and a realeased state.
- Remarks:
- Inherits from Ewl_Button.
Data Structures | |
struct | Ewl_Togglebutton |
Inherits from Ewl_Button and expands to provide a stateful toggle button. More... | |
Defines | |
#define | EWL_TOGGLEBUTTON(button) ((Ewl_Togglebutton *) button) |
#define | EWL_TOGGLEBUTTON_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_TOGGLEBUTTON_TYPE)) |
#define | EWL_TOGGLEBUTTON_TYPE "togglebutton" |
Typedefs | |
typedef Ewl_Togglebutton | Ewl_Togglebutton |
Functions | |
void | ewl_togglebutton_cb_clicked (Ewl_Widget *w, void *ev_data, void *user_data) |
unsigned int | ewl_togglebutton_checked_get (Ewl_Togglebutton *tb) |
Retrieve the checked state of a check button. | |
void | ewl_togglebutton_checked_set (Ewl_Togglebutton *tb, unsigned int checked) |
Update the checked state of the check button. | |
int | ewl_togglebutton_init (Ewl_Togglebutton *tb) |
Initialize the members and callbacks of a check button. | |
Ewl_Widget * | ewl_togglebutton_new (void) |
Allocate and initialize a new check button. |
Define Documentation
#define EWL_TOGGLEBUTTON | ( | button | ) | ((Ewl_Togglebutton *) button) |
Typecasts a pointer to an Ewl_Togglebutton pointer.
#define EWL_TOGGLEBUTTON_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_TOGGLEBUTTON_TYPE)) |
Returns TRUE if the widget is an Ewl_Togglebutton, FALSE otherwise
#define EWL_TOGGLEBUTTON_TYPE "togglebutton" |
The type name for the Ewl_Togglebutton widget
Typedef Documentation
typedef struct Ewl_Togglebutton Ewl_Togglebutton |
The toggle button class inherits from Ewl_Button
Function Documentation
void ewl_togglebutton_cb_clicked | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
unsigned int ewl_togglebutton_checked_get | ( | Ewl_Togglebutton * | cb | ) |
Retrieve the checked state of a check button.
- Parameters:
-
cb,: The togglebutton to work with
- Returns:
- Returns TRUE if the togglebutton is set, FALSE otherwise
void ewl_togglebutton_checked_set | ( | Ewl_Togglebutton * | cb, | |
unsigned int | c | |||
) |
Update the checked state of the check button.
- Parameters:
-
cb,: The togglebutton to set the checked value of c,: The checked value to set
- Returns:
- Returns no value.
int ewl_togglebutton_init | ( | Ewl_Togglebutton * | cb | ) |
Initialize the members and callbacks of a check button.
- Parameters:
-
cb,: the check button to initialize
- Returns:
- Returns no value.
Ewl_Widget* ewl_togglebutton_new | ( | void | ) |
Allocate and initialize a new check button.
- Returns:
- Returns the newly allocated togglebutton on success, NULL on failure.