Ewl_Check: The Simple Check for a Checkbutton
Detailed Description
Defines a widget with single purpose of providing a button with a checked state, without any extra decorating.
- Remarks:
- Inherits from Ewl_Widget.
Tutorial
Ewl_Widget *check; check = ewl_check_new(); ewl_check_checked_set(EWL_CHECK(check), FALSE); ewl_widget_show(check);
Data Structures | |
struct | Ewl_Check |
Inherits from Ewl_Widget and extends to provide a checked state. More... | |
Defines | |
#define | EWL_CHECK(c) ((Ewl_Check *)c) |
#define | EWL_CHECK_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_CHECK_TYPE)) |
#define | EWL_CHECK_TYPE "check" |
Typedefs | |
typedef struct Ewl_Check | Ewl_Check |
Functions | |
void | ewl_check_cb_clicked (Ewl_Widget *w, void *ev_data, void *user_data) |
void | ewl_check_cb_update_check (Ewl_Widget *w, void *ev_data, void *user_data) |
void | ewl_check_checked_set (Ewl_Check *c, int checked) |
Change the checked status of the check. | |
int | ewl_check_init (Ewl_Check *c) |
Initialize the members and callbacks of a check. | |
int | ewl_check_is_checked (Ewl_Check *c) |
Determine the check state of the check. | |
Ewl_Widget * | ewl_check_new (void) |
Allocate and initialize a new check. |
Define Documentation
#define EWL_CHECK | ( | c | ) | ((Ewl_Check *)c) |
Typecasts a pointer to an Ewl_Check pointer.
Referenced by ewl_check_cb_clicked(), ewl_check_cb_update_check(), ewl_check_new(), ewl_checkbutton_cb_clicked(), ewl_checkbutton_checked_set(), ewl_checkbutton_is_checked(), ewl_expansion_init(), ewl_tree_node_collapse(), and ewl_tree_node_expand().
#define EWL_CHECK_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_CHECK_TYPE)) |
Returns TRUE if the widget is an Ewl_Check, FALSE otherwise
#define EWL_CHECK_TYPE "check" |
- Widget Theme Keys:
- /check/file
- Widget Theme Keys:
- /check/group
Referenced by ewl_check_cb_clicked(), ewl_check_cb_update_check(), ewl_check_checked_set(), ewl_check_init(), and ewl_check_is_checked().
Typedef Documentation
A single purpose extension of Ewl_Widget to provide a checked state.
Function Documentation
void ewl_check_cb_clicked | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
References checked, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_callback_call(), EWL_CALLBACK_VALUE_CHANGED, EWL_CHECK, ewl_check_cb_update_check(), and EWL_CHECK_TYPE.
Referenced by ewl_check_init(), and ewl_checkbutton_init().
void ewl_check_cb_update_check | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
References checked, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CHECK, EWL_CHECK_TYPE, EWL_STATE_PERSISTENT, and ewl_widget_state_set().
Referenced by ewl_check_cb_clicked(), ewl_check_checked_set(), and ewl_check_init().
void ewl_check_checked_set | ( | Ewl_Check * | cb, | |
int | c | |||
) |
Change the checked status of the check.
- Parameters:
-
cb,: the check to change the status c,: the new status of the check
- Returns:
- Returns no value. Changes the checked status of the check and updates it's appearance to reflect the change.
References checked, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, ewl_check_cb_update_check(), EWL_CHECK_TYPE, and EWL_WIDGET.
Referenced by ewl_checkbutton_cb_clicked(), ewl_checkbutton_checked_set(), ewl_tree_node_collapse(), and ewl_tree_node_expand().
int ewl_check_init | ( | Ewl_Check * | cb | ) |
Initialize the members and callbacks of a check.
- Parameters:
-
cb,: the check to initialize
- Returns:
- Returns TRUE on success, FALSE on failure. The internal structures and callbacks of the check are initialized ot default values.
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, ewl_callback_append(), EWL_CALLBACK_CLICKED, EWL_CALLBACK_MOUSE_OUT, ewl_check_cb_clicked(), ewl_check_cb_update_check(), EWL_CHECK_TYPE, EWL_FLAG_FILL_NONE, EWL_OBJECT, ewl_object_fill_policy_set(), ewl_object_preferred_inner_size_set(), EWL_WIDGET, ewl_widget_appearance_set(), ewl_widget_inherit(), and ewl_widget_init().
Referenced by ewl_check_new(), and ewl_expansion_init().
int ewl_check_is_checked | ( | Ewl_Check * | cb | ) |
Determine the check state of the check.
- Parameters:
-
cb,: the check to examine for it's checked state
- Returns:
- Returns TRUE if the check is checked, FALSE if not.
References checked, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, and EWL_CHECK_TYPE.
Referenced by ewl_checkbutton_cb_clicked(), and ewl_checkbutton_is_checked().
Ewl_Widget* ewl_check_new | ( | void | ) |
Allocate and initialize a new check.
- Returns:
- Returns the newly allocated check on success, NULL on failure.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_CHECK, ewl_check_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.
Referenced by ewl_checkbutton_init().