lib/ewl_scrollpane.c File Reference
#include "ewl_base.h"
#include "ewl_overlay.h"
#include "ewl_scrollpane.h"
#include "ewl_box.h"
#include "ewl_scrollbar.h"
#include "ewl_range.h"
#include "ewl_macros.h"
#include "ewl_private.h"
#include "ewl_debug.h"
#include <math.h>

Data Structures | |
| struct | Ewl_Scrollpane_Scroll_Info_Embedded |
| Stores information on an embedded scrollpane. More... | |
| struct | Ewl_Scrollpane_Scroll_Info_Normal |
| Stores information on a normal scrollpane. More... | |
Defines | |
| #define | HIST_NUM 20 |
Typedefs | |
| typedef struct Ewl_Scrollpane_Scroll_Info_Embedded | Ewl_Scrollpane_Scroll_Info_Embedded |
| typedef struct Ewl_Scrollpane_Scroll_Info_Normal | Ewl_Scrollpane_Scroll_Info_Normal |
Functions | |
| void | ewl_scrollpane_cb_child_resize (Ewl_Container *p, Ewl_Widget *c __UNUSED__, int size __UNUSED__, Ewl_Orientation o __UNUSED__) |
| void | ewl_scrollpane_cb_child_show (Ewl_Container *p, Ewl_Widget *c __UNUSED__) |
| void | ewl_scrollpane_cb_configure (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_scrollpane_cb_destroy (Ewl_Widget *w, void *ev __UNUSED__, void *data __UNUSED__) |
| void | ewl_scrollpane_cb_focus_jump (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_scrollpane_cb_hscroll (Ewl_Widget *w __UNUSED__, void *ev_data __UNUSED__, void *user_data) |
| void | ewl_scrollpane_cb_overlay_child_resize (Ewl_Container *p, Ewl_Widget *c, int size, Ewl_Orientation o) |
| void | ewl_scrollpane_cb_overlay_child_show (Ewl_Container *p, Ewl_Widget *c) |
| void | ewl_scrollpane_cb_vscroll (Ewl_Widget *w __UNUSED__, void *ev_data __UNUSED__, void *user_data) |
| void | ewl_scrollpane_cb_wheel_scroll (Ewl_Widget *cb, void *ev_data, void *user_data __UNUSED__) |
| Ewl_Scrollpane_Flags | ewl_scrollpane_hscrollbar_flag_get (Ewl_Scrollpane *s) |
| Get flags for horizontal scrollbar. | |
| void | ewl_scrollpane_hscrollbar_flag_set (Ewl_Scrollpane *s, Ewl_Scrollpane_Flags f) |
| Set flags for horizontal scrollbar. | |
| double | ewl_scrollpane_hscrollbar_step_get (Ewl_Scrollpane *s) |
| Retrives the value of the stepping of the vertical scrollbar in s. | |
| double | ewl_scrollpane_hscrollbar_value_get (Ewl_Scrollpane *s) |
| Retrieves the value of the horizontal scrollbar in s. | |
| void | ewl_scrollpane_hscrollbar_value_set (Ewl_Scrollpane *s, double val) |
| Set the value of the horizontal scrollbar in s to val. | |
| int | ewl_scrollpane_init (Ewl_Scrollpane *s) |
| Initialize the fields of a scrollpane. | |
| double | ewl_scrollpane_kinetic_dampen_get (Ewl_Scrollpane *s) |
| Gets the minimum velocity for kinetic scrolling. | |
| void | ewl_scrollpane_kinetic_dampen_set (Ewl_Scrollpane *s, double d) |
| Sets the multiplier to reduce the velocity of kinetic scrolling. | |
| int | ewl_scrollpane_kinetic_fps_get (Ewl_Scrollpane *s) |
| void | ewl_scrollpane_kinetic_fps_set (Ewl_Scrollpane *s, int fps) |
| Sets the number of times per second to recalculate velocity and update the tree. | |
| double | ewl_scrollpane_kinetic_max_velocity_get (Ewl_Scrollpane *s) |
| Gets the maximum velocity for kinetic scrolling. | |
| void | ewl_scrollpane_kinetic_max_velocity_set (Ewl_Scrollpane *s, double v) |
| Sets the maximum velocity for kinetic scrolling. | |
| double | ewl_scrollpane_kinetic_min_velocity_get (Ewl_Scrollpane *s) |
| Gets the minimum velocity for kinetic scrolling. | |
| void | ewl_scrollpane_kinetic_min_velocity_set (Ewl_Scrollpane *s, double v) |
| Sets the minimum velocity for kinetic scrolling. | |
| Ewl_Kinetic_Scroll | ewl_scrollpane_kinetic_scrolling_get (Ewl_Scrollpane *s) |
| Gets the type of kinetic scrolling used. | |
| void | ewl_scrollpane_kinetic_scrolling_set (Ewl_Scrollpane *s, Ewl_Kinetic_Scroll type) |
| Sets up default values and callbacks for kinetic scrolling. | |
| Ewl_Widget * | ewl_scrollpane_new (void) |
| Create a new scrollpane. | |
| Ewl_Scrollpane_Flags | ewl_scrollpane_vscrollbar_flag_get (Ewl_Scrollpane *s) |
| Get flags for vertical scrollbar. | |
| void | ewl_scrollpane_vscrollbar_flag_set (Ewl_Scrollpane *s, Ewl_Scrollpane_Flags f) |
| Set flags for vertical scrollbar. | |
| double | ewl_scrollpane_vscrollbar_step_get (Ewl_Scrollpane *s) |
| Retrives the value of the stepping of the vertical scrollbar in s. | |
| double | ewl_scrollpane_vscrollbar_value_get (Ewl_Scrollpane *s) |
| Retrieves the value of the vertical scrollbar in s. | |
| void | ewl_scrollpane_vscrollbar_value_set (Ewl_Scrollpane *s, double val) |
| Set the value of the vertical scrollbar in s to val. | |
Define Documentation
| #define HIST_NUM 20 |
Typedef Documentation
Function Documentation
| void ewl_scrollpane_cb_child_resize | ( | Ewl_Container * | p, | |
| Ewl_Widget *c | __UNUSED__, | |||
| int size | __UNUSED__, | |||
| Ewl_Orientation o | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SCROLLPANE, and EWL_SCROLLPANE_TYPE.
Referenced by ewl_scrollpane_init().
| void ewl_scrollpane_cb_child_show | ( | Ewl_Container * | p, | |
| Ewl_Widget *c | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SCROLLPANE, and EWL_SCROLLPANE_TYPE.
Referenced by ewl_scrollpane_init().
| void ewl_scrollpane_cb_configure | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References Ewl_Scrollpane::box, CURRENT_H, CURRENT_W, CURRENT_X, CURRENT_Y, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FLAG_FILL_FILL, EWL_FLAG_FILL_HSHRINKABLE, EWL_FLAG_FILL_VSHRINKABLE, EWL_OBJECT, ewl_object_fill_policy_get(), ewl_object_fill_policy_set(), ewl_object_geometry_request(), ewl_object_preferred_h_get(), ewl_object_preferred_w_get(), EWL_SCROLLBAR, ewl_scrollbar_step_set(), ewl_scrollbar_value_get(), EWL_SCROLLPANE, EWL_SCROLLPANE_FLAG_AUTO_VISIBLE, EWL_SCROLLPANE_FLAG_NONE, ewl_widget_hide(), ewl_widget_show(), EWL_WIDGET_TYPE, Ewl_Scrollpane::hflag, Ewl_Scrollpane::hscrollbar, Ewl_Scrollpane::overlay, Ewl_Scrollpane::vflag, VISIBLE, and Ewl_Scrollpane::vscrollbar.
Referenced by ewl_scrollpane_init().
| void ewl_scrollpane_cb_destroy | ( | Ewl_Widget * | w, | |
| void *ev | __UNUSED__, | |||
| void *data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SCROLLPANE, EWL_SCROLLPANE_TYPE, and FREE.
| void ewl_scrollpane_cb_focus_jump | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References Ewl_Scrollpane::box, CURRENT_H, CURRENT_W, CURRENT_X, CURRENT_Y, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, ewl_embed_focused_widget_get(), ewl_embed_widget_find(), EWL_OBJECT, ewl_object_current_geometry_get(), ewl_object_current_x_get(), ewl_object_current_y_get(), ewl_object_preferred_h_get(), ewl_object_preferred_w_get(), EWL_SCROLLBAR, ewl_scrollbar_value_set(), EWL_SCROLLPANE, EWL_SCROLLPANE_TYPE, ewl_widget_onscreen_is(), ewl_widget_parent_of(), Ewl_Scrollpane::hscrollbar, Ewl_Scrollpane::overlay, and Ewl_Scrollpane::vscrollbar.
Referenced by ewl_scrollpane_init().
| void ewl_scrollpane_cb_hscroll | ( | Ewl_Widget *w | __UNUSED__, | |
| void *ev_data | __UNUSED__, | |||
| void * | user_data | |||
| ) |
References DCHECK_PARAM_PTR, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_callback_call(), EWL_CALLBACK_VALUE_CHANGED, and ewl_widget_configure().
Referenced by ewl_scrollpane_init().
| void ewl_scrollpane_cb_vscroll | ( | Ewl_Widget *w | __UNUSED__, | |
| void *ev_data | __UNUSED__, | |||
| void * | user_data | |||
| ) |
References DCHECK_PARAM_PTR, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_callback_call(), EWL_CALLBACK_VALUE_CHANGED, and ewl_widget_configure().
Referenced by ewl_scrollpane_init().
| void ewl_scrollpane_cb_wheel_scroll | ( | Ewl_Widget * | cb, | |
| void * | ev_data, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SCROLLPANE, ewl_scrollpane_vscrollbar_step_get(), ewl_scrollpane_vscrollbar_value_get(), ewl_scrollpane_vscrollbar_value_set(), EWL_WIDGET_TYPE, and Ewl_Event_Mouse_Wheel::z.
Referenced by ewl_scrollpane_init().