Ewl_Seeker: A Value Selector from a Range
Detailed Description
Defines an Ewl_Widget with a draggable button enclosed, used to select a value from a range.
- Remarks:
- Inherits from Ewl_Range.
Tutorial
Data Structures | |
| struct | Ewl_Seeker |
| Inherits from Ewl_Range and extends to provide a seeker widget. More... | |
Defines | |
| #define | EWL_SEEKER(seeker) ((Ewl_Seeker *) seeker) |
| #define | EWL_SEEKER_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_SEEKER_TYPE)) |
| #define | EWL_SEEKER_TYPE "seeker" |
Typedefs | |
| typedef struct Ewl_Seeker | Ewl_Seeker |
Functions | |
| Ewl_Widget * | ewl_hseeker_new (void) |
| Allocate and initialize a new seeker with horizontal orientation. | |
| int | ewl_seeker_autohide_get (Ewl_Seeker *s) |
| Retrieves the current autohide setting on a seeker. | |
| void | ewl_seeker_autohide_set (Ewl_Seeker *s, int v) |
| Changes the autohide setting on the seeker to v. | |
| void | ewl_seeker_cb_button_mouse_down (Ewl_Widget *w, void *ev_data, void *user_data) |
| void | ewl_seeker_cb_button_mouse_up (Ewl_Widget *w, void *ev_data, void *user_data) |
| void | ewl_seeker_cb_child_show (Ewl_Container *p, Ewl_Widget *w) |
| void | ewl_seeker_cb_configure (Ewl_Widget *w, void *ev_data, void *user_data) |
| void | ewl_seeker_cb_key_down (Ewl_Widget *w, void *ev_data, void *user_data) |
| void | ewl_seeker_cb_mouse_down (Ewl_Widget *w, void *ev_data, void *user_data) |
| void | ewl_seeker_cb_mouse_move (Ewl_Widget *w, void *ev_data, void *user_data) |
| void | ewl_seeker_cb_mouse_up (Ewl_Widget *w, void *ev_data, void *user_data) |
| int | ewl_seeker_init (Ewl_Seeker *s) |
| Initialize the seeker to some sane starting values. | |
| Ewl_Widget * | ewl_seeker_new (void) |
| Allocate and initialize a new seeker with default orientation. | |
| Ewl_Orientation | ewl_seeker_orientation_get (Ewl_Seeker *s) |
| This will retrieve the current orientation set on the seeker. | |
| void | ewl_seeker_orientation_set (Ewl_Seeker *s, Ewl_Orientation o) |
| Changes the orientation of the given seeker. | |
| Ewl_Widget * | ewl_vseeker_new (void) |
| Allocate and initialize a new seeker with vertical orientation. | |
Define Documentation
| #define EWL_SEEKER | ( | seeker | ) | ((Ewl_Seeker *) seeker) |
Typecasts a pointer to an Ewl_Seeker pointer.
Referenced by ewl_hseeker_new(), ewl_scrollbar_orientation_set(), ewl_seeker_cb_button_mouse_down(), ewl_seeker_cb_button_mouse_up(), ewl_seeker_cb_child_show(), ewl_seeker_cb_configure(), ewl_seeker_cb_mouse_down(), ewl_seeker_cb_mouse_move(), ewl_seeker_cb_mouse_up(), and ewl_vseeker_new().
| #define EWL_SEEKER_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_SEEKER_TYPE)) |
Returns TRUE if the widget is an Ewl_Seeker, FALSE otherwise
| #define EWL_SEEKER_TYPE "seeker" |
- Widget Theme Keys:
- /hseeker/file
- Widget Theme Keys:
- /hseeker/group
- Widget Theme Keys:
- /vseeker/file
- Widget Theme Keys:
- /vseeker/group
Referenced by ewl_seeker_autohide_get(), ewl_seeker_autohide_set(), ewl_seeker_cb_button_mouse_down(), ewl_seeker_cb_button_mouse_up(), ewl_seeker_cb_child_show(), ewl_seeker_cb_configure(), ewl_seeker_cb_key_down(), ewl_seeker_cb_mouse_down(), ewl_seeker_cb_mouse_move(), ewl_seeker_cb_mouse_up(), ewl_seeker_init(), ewl_seeker_orientation_get(), and ewl_seeker_orientation_set().
Typedef Documentation
| typedef struct Ewl_Seeker Ewl_Seeker |
The Ewl_Seeker provides a means to select a value from a range using a draggable button.
Function Documentation
| Ewl_Widget* ewl_hseeker_new | ( | void | ) |
Allocate and initialize a new seeker with horizontal orientation.
- Returns:
- Returns NULL on failure, or a pointer to the new seeker on success.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_ORIENTATION_HORIZONTAL, EWL_SEEKER, ewl_seeker_new(), ewl_seeker_orientation_set(), and EWL_WIDGET.
Referenced by ewl_scrollbar_init().
| int ewl_seeker_autohide_get | ( | Ewl_Seeker * | s | ) |
Retrieves the current autohide setting on a seeker.
- Parameters:
-
s,: the seeker to retrieve autohide value
- Returns:
- Returns TRUE if autohide set, otherwise FALSE.
References autohide, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, and EWL_SEEKER_TYPE.
| void ewl_seeker_autohide_set | ( | Ewl_Seeker * | s, | |
| int | v | |||
| ) |
Changes the autohide setting on the seeker to v.
- Parameters:
-
s,: the seeker to change autohide v,: the new boolean value for autohiding
- Returns:
- Returns no value. Alter the autohide boolean of the seeker s to value v. If v is TRUE, the seeker will be hidden whenever the button is the full size of the seeker.
References autohide, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_SEEKER_TYPE, EWL_WIDGET, ewl_widget_show(), and REALIZED.
| void ewl_seeker_cb_button_mouse_down | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_seeker_cb_button_mouse_up | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_seeker_cb_child_show | ( | Ewl_Container * | p, | |
| Ewl_Widget * | w | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_OBJECT, ewl_object_preferred_h_get(), ewl_object_preferred_inner_size_set(), ewl_object_preferred_w_get(), EWL_ORIENTATION_HORIZONTAL, EWL_RANGE, EWL_SEEKER, EWL_SEEKER_TYPE, EWL_WIDGET_TYPE, Ewl_Range::max_val, Ewl_Range::min_val, and Ewl_Range::step.
Referenced by ewl_seeker_init().
| void ewl_seeker_cb_configure | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_seeker_cb_key_down | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_seeker_cb_mouse_down | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_seeker_cb_mouse_move | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_seeker_cb_mouse_up | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| int ewl_seeker_init | ( | Ewl_Seeker * | s | ) |
Initialize the seeker to some sane starting values.
- Parameters:
-
s,: the seeker to be initialized
- Returns:
- Returns no value. Initializes the seeker s to the orientation orientation to default values and callbacks.
References button, DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, ewl_button_new(), ewl_callback_append(), EWL_CALLBACK_CONFIGURE, EWL_CALLBACK_DESTROY, EWL_CALLBACK_FOCUS_IN, EWL_CALLBACK_FOCUS_OUT, EWL_CALLBACK_KEY_DOWN, EWL_CALLBACK_MOUSE_DOWN, EWL_CALLBACK_MOUSE_MOVE, EWL_CALLBACK_MOUSE_UP, ewl_callback_prepend(), EWL_CONTAINER, ewl_container_callback_notify(), ewl_container_cb_widget_focus_in(), ewl_container_cb_widget_focus_out(), ewl_container_child_append(), ewl_container_show_notify_set(), EWL_FLAG_FILL_HFILL, EWL_FLAG_FILL_HSHRINKABLE, EWL_OBJECT, ewl_object_fill_policy_set(), EWL_ORIENTATION_HORIZONTAL, EWL_RANGE, ewl_range_init(), ewl_seeker_cb_button_mouse_down(), ewl_seeker_cb_button_mouse_up(), ewl_seeker_cb_child_show(), ewl_seeker_cb_configure(), ewl_seeker_cb_key_down(), ewl_seeker_cb_mouse_down(), ewl_seeker_cb_mouse_move(), ewl_seeker_cb_mouse_up(), EWL_SEEKER_TYPE, EWL_WIDGET, ewl_widget_appearance_set(), ewl_widget_inherit(), ewl_widget_internal_set(), ewl_widget_show(), and orientation.
Referenced by ewl_seeker_new().
| Ewl_Widget* ewl_seeker_new | ( | void | ) |
Allocate and initialize a new seeker with default orientation.
- Returns:
- Returns NULL on failure, or a pointer to the new seeker on success.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_seeker_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.
Referenced by ewl_hseeker_new(), and ewl_vseeker_new().
| Ewl_Orientation ewl_seeker_orientation_get | ( | Ewl_Seeker * | s | ) |
This will retrieve the current orientation set on the seeker.
- Parameters:
-
s,: The seeker to get the orientation from
- Returns:
- Returns the orientation set on the seeker
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_ORIENTATION_HORIZONTAL, EWL_SEEKER_TYPE, and orientation.
| void ewl_seeker_orientation_set | ( | Ewl_Seeker * | s, | |
| Ewl_Orientation | o | |||
| ) |
Changes the orientation of the given seeker.
- Parameters:
-
s,: the seeker to change orientation o,: the new orientation for the seeker
- Returns:
- Returns no value.
References button, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_FLAG_FILL_HFILL, EWL_FLAG_FILL_HSHRINKABLE, EWL_FLAG_FILL_VFILL, EWL_FLAG_FILL_VSHRINKABLE, EWL_OBJECT, ewl_object_fill_policy_set(), EWL_ORIENTATION_HORIZONTAL, EWL_SEEKER_TYPE, EWL_WIDGET, ewl_widget_appearance_set(), and orientation.
Referenced by ewl_hseeker_new(), ewl_scrollbar_orientation_set(), and ewl_vseeker_new().
| Ewl_Widget* ewl_vseeker_new | ( | void | ) |
Allocate and initialize a new seeker with vertical orientation.
- Returns:
- Returns NULL on failure, or a pointer to the new seeker on success.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_ORIENTATION_VERTICAL, EWL_SEEKER, ewl_seeker_new(), ewl_seeker_orientation_set(), and EWL_WIDGET.