Ewl_Spinner: A Numerical Value Entry
Detailed Description
Provides a field for entering numerical values, along with buttons to increment and decrement the value.
- Remarks:
- Inherits from Ewl_Range.
Tutorial
Data Structures | |
| struct | Ewl_Spinner |
| Inherits from Ewl_Range and extends to provide a spinner widget. More... | |
Defines | |
| #define | EWL_SPINNER(spinner) ((Ewl_Spinner *) spinner) |
| #define | EWL_SPINNER_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_SPINNER_TYPE)) |
| #define | EWL_SPINNER_TYPE "spinner" |
Typedefs | |
| typedef struct Ewl_Spinner | Ewl_Spinner |
Functions | |
| void | ewl_spinner_cb_child_resize (Ewl_Container *c, Ewl_Widget *w, int size, Ewl_Orientation o) |
| void | ewl_spinner_cb_child_show (Ewl_Container *c, Ewl_Widget *w) |
| void | ewl_spinner_cb_configure (Ewl_Widget *widget, void *ev_data, void *user_data) |
| void | ewl_spinner_cb_decrease_value (Ewl_Widget *widget, void *ev_data, void *user_data) |
| void | ewl_spinner_cb_destroy (Ewl_Widget *w, void *ev_data, void *user_data) |
| void | ewl_spinner_cb_focus_out (Ewl_Widget *w, void *ev_data, void *user_data) |
| void | ewl_spinner_cb_increase_value (Ewl_Widget *widget, void *ev_data, void *user_data) |
| void | ewl_spinner_cb_key_down (Ewl_Widget *widget, void *ev_data, void *user_data) |
| void | ewl_spinner_cb_realize (Ewl_Widget *widget, void *ev_data, void *user_data) |
| void | ewl_spinner_cb_value_changed (Ewl_Widget *widget, void *ev_data, void *user_data) |
| void | ewl_spinner_cb_value_stop (Ewl_Widget *w, void *ev_data, void *user_data) |
| void | ewl_spinner_cb_wheel (Ewl_Widget *w, void *ev_data, void *user_data) |
| unsigned char | ewl_spinner_digits_get (Ewl_Spinner *s) |
| This will retrieve the number of digits displayed by the spinner. | |
| void | ewl_spinner_digits_set (Ewl_Spinner *s, unsigned char digits) |
| Set the number of digits displayed by a spinner. | |
| int | ewl_spinner_init (Ewl_Spinner *s) |
| Initialize a spinner to default values and callbacks. | |
| Ewl_Widget * | ewl_spinner_new (void) |
| Allocate a new spinner widget. | |
Define Documentation
| #define EWL_SPINNER | ( | spinner | ) | ((Ewl_Spinner *) spinner) |
Typecasts a pointer to an Ewl_Spinner pointer.
Referenced by ewl_colorpicker_init(), ewl_spinner_cb_child_resize(), ewl_spinner_cb_child_show(), ewl_spinner_cb_configure(), ewl_spinner_cb_decrease_value(), ewl_spinner_cb_destroy(), ewl_spinner_cb_focus_out(), ewl_spinner_cb_increase_value(), ewl_spinner_cb_key_down(), ewl_spinner_cb_realize(), and ewl_spinner_cb_value_changed().
| #define EWL_SPINNER_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_SPINNER_TYPE)) |
Returns TRUE if the widget is an Ewl_Spinner, FALSE otherwise
| #define EWL_SPINNER_TYPE "spinner" |
- Widget Theme Keys:
- /spinner/file
- Widget Theme Keys:
- /spinner/group
Referenced by ewl_colorpicker_cb_alpha_change(), ewl_spinner_cb_child_resize(), ewl_spinner_cb_child_show(), ewl_spinner_cb_decrease_value(), ewl_spinner_cb_destroy(), ewl_spinner_cb_increase_value(), ewl_spinner_cb_realize(), ewl_spinner_cb_value_stop(), ewl_spinner_digits_get(), ewl_spinner_digits_set(), and ewl_spinner_init().
Typedef Documentation
| typedef struct Ewl_Spinner Ewl_Spinner |
A combination of entry and increment/decrement buttons for adjusting numerical values.
Function Documentation
| void ewl_spinner_cb_child_resize | ( | Ewl_Container * | c, | |
| Ewl_Widget * | w, | |||
| int | size, | |||
| Ewl_Orientation | o | |||
| ) |
| void ewl_spinner_cb_child_show | ( | Ewl_Container * | c, | |
| Ewl_Widget * | w | |||
| ) |
| void ewl_spinner_cb_configure | ( | Ewl_Widget * | widget, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_spinner_cb_decrease_value | ( | Ewl_Widget * | widget, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_spinner_cb_destroy | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_spinner_cb_focus_out | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_spinner_cb_increase_value | ( | Ewl_Widget * | widget, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_spinner_cb_key_down | ( | Ewl_Widget * | widget, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_spinner_cb_realize | ( | Ewl_Widget * | widget, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_spinner_cb_value_changed | ( | Ewl_Widget * | widget, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_spinner_cb_value_stop | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_spinner_cb_wheel | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| unsigned char ewl_spinner_digits_get | ( | Ewl_Spinner * | s | ) |
This will retrieve the number of digits displayed by the spinner.
- Parameters:
-
s,: The spinnner to get the number of digits displayed
- Returns:
- Returns the number of digits displayed by the spinner
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, digits, DLEVEL_STABLE, DRETURN_INT, and EWL_SPINNER_TYPE.
| void ewl_spinner_digits_set | ( | Ewl_Spinner * | s, | |
| unsigned char | digits | |||
| ) |
Set the number of digits displayed by a spinner.
- Parameters:
-
s,: the widget to change the number of digits displayed digits,: the number of digits to display for the spinner s
- Returns:
- Returns no value. Changes the digits displayed by s to digits.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, digits, DLEAVE_FUNCTION, DLEVEL_STABLE, and EWL_SPINNER_TYPE.
Referenced by ewl_colorpicker_init().
| int ewl_spinner_init | ( | Ewl_Spinner * | s | ) |
Initialize a spinner to default values and callbacks.
- Parameters:
-
s,: the spinner to initialize
- Returns:
- Returns TRUE on success or FALSE on failure Sets the fields and callbacks of the spinner s their default values.
References DCHECK_PARAM_PTR_RET, decrement, DENTER_FUNCTION, digits, DLEVEL_STABLE, DRETURN_INT, entry, ewl_button_new(), ewl_callback_append(), EWL_CALLBACK_CONFIGURE, ewl_callback_del(), EWL_CALLBACK_DESTROY, EWL_CALLBACK_FOCUS_IN, EWL_CALLBACK_FOCUS_OUT, EWL_CALLBACK_KEY_DOWN, EWL_CALLBACK_MOUSE_DOWN, EWL_CALLBACK_MOUSE_UP, EWL_CALLBACK_MOUSE_WHEEL, ewl_callback_prepend(), EWL_CALLBACK_REALIZE, EWL_CALLBACK_VALUE_CHANGED, EWL_CONTAINER, ewl_container_cb_widget_focus_in(), ewl_container_cb_widget_focus_out(), ewl_container_child_append(), ewl_container_resize_notify_set(), ewl_container_show_notify_set(), ewl_entry_cb_key_down(), ewl_entry_new(), EWL_FLAG_ALIGN_CENTER, EWL_FLAG_ALIGN_LEFT, EWL_FLAG_FILL_HFILL, EWL_FLAG_FILL_HSHRINK, EWL_FLAG_FILL_HSHRINKABLE, EWL_FLAG_FILL_NONE, EWL_OBJECT, ewl_object_alignment_set(), ewl_object_fill_policy_set(), EWL_RANGE, ewl_range_init(), ewl_spinner_cb_child_resize(), ewl_spinner_cb_child_show(), ewl_spinner_cb_configure(), ewl_spinner_cb_decrease_value(), ewl_spinner_cb_destroy(), ewl_spinner_cb_focus_out(), ewl_spinner_cb_increase_value(), ewl_spinner_cb_key_down(), ewl_spinner_cb_realize(), ewl_spinner_cb_value_changed(), ewl_spinner_cb_value_stop(), ewl_spinner_cb_wheel(), EWL_SPINNER_TYPE, EWL_TEXT, ewl_text_text_set(), ewl_vbox_new(), EWL_WIDGET, ewl_widget_appearance_set(), ewl_widget_inherit(), ewl_widget_internal_set(), ewl_widget_show(), increment, and vbox.
Referenced by ewl_spinner_new().
| Ewl_Widget* ewl_spinner_new | ( | void | ) |
Allocate a new spinner widget.
- Returns:
- Returns a new spinner widget on success, NULL on failure.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_spinner_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.
Referenced by ewl_colorpicker_init().