Download

Support

Ewl_Scrollpane: A Scrollable Viewing Area


Detailed Description

Provides a scrollable area for viewing large sets of widgets in a smaller viewable region.

Remarks:
Inherits from Ewl_Container.

Tutorial


Data Structures

struct  Ewl_Scrollpane
 Inherits from Ewl_Container and extends it to enclose a single widget in vertical and horizontal scrollbars for panning around displaying different regions of the enclosed widget. More...
struct  Ewl_Scrollpane_Scroll_Info_Base
 Enables a scrollpane to be scrolled with kinetic behaviour. More...

Defines

#define EWL_SCROLLPANE(scrollpane)   ((Ewl_Scrollpane *) scrollpane)
#define EWL_SCROLLPANE_IS(w)   (ewl_widget_type_is(EWL_WIDGET(w), EWL_SCROLLPANE_TYPE))
#define EWL_SCROLLPANE_SCROLL_INFO_BASE(scroll_info)   ((Ewl_Scrollpane_Scroll_Info_Base *) scroll_info)
#define EWL_SCROLLPANE_TYPE   "scrollpane"

Typedefs

typedef struct Ewl_Scrollpane Ewl_Scrollpane
typedef struct
Ewl_Scrollpane_Scroll_Info_Base 
Ewl_Scrollpane_Scroll_Info_Base

Functions

void ewl_scrollpane_cb_configure (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_scrollpane_cb_focus_jump (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_scrollpane_cb_hscroll (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_scrollpane_cb_vscroll (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_scrollpane_cb_wheel_scroll (Ewl_Widget *w, void *ev_data, void *user_data)
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_Widgetewl_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 EWL_SCROLLPANE ( scrollpane   )     ((Ewl_Scrollpane *) scrollpane)

#define EWL_SCROLLPANE_IS (  )     (ewl_widget_type_is(EWL_WIDGET(w), EWL_SCROLLPANE_TYPE))

Returns TRUE if the widget is an Ewl_Scrollpane, FALSE otherwise

#define EWL_SCROLLPANE_SCROLL_INFO_BASE ( scroll_info   )     ((Ewl_Scrollpane_Scroll_Info_Base *) scroll_info)

Typecasts a pointer to an Ewl_Scrollpane_Scroll_Info_Base pointer.


Typedef Documentation

The scrollpane provides a way to pan around large collections of images.

The scrollpane can be scolled with a drag of the mouse


Function Documentation

void ewl_scrollpane_cb_hscroll ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_scrollpane_cb_vscroll ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

Ewl_Scrollpane_Flags ewl_scrollpane_hscrollbar_flag_get ( Ewl_Scrollpane s  ) 

Get flags for horizontal scrollbar.

Parameters:
s,: the scrollpane that contains the scrollbar to retrieve
Returns:
Returns the flags of the horizontal scrollbar, 0 on failure.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_SCROLLPANE_TYPE, and hflag.

void ewl_scrollpane_hscrollbar_flag_set ( Ewl_Scrollpane s,
Ewl_Scrollpane_Flags  f 
)

Set flags for horizontal scrollbar.

Parameters:
s,: the scrollpane that contains the scrollbar to change
f,: the flags to set on the horizontal scrollbar in s
Returns:
Returns no value. The scrollbar flags for the horizontal scrollbar are set to f.

References box, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FLAG_FILL_HSHRINK, EWL_OBJECT, ewl_object_fill_policy_get(), ewl_object_fill_policy_set(), EWL_SCROLLPANE_FLAG_ALWAYS_HIDDEN, EWL_SCROLLPANE_TYPE, EWL_WIDGET, ewl_widget_configure(), and hflag.

double ewl_scrollpane_hscrollbar_step_get ( Ewl_Scrollpane s  ) 

Retrives the value of the stepping of the vertical scrollbar in s.

Parameters:
s,: the scrollpane to retrieve its vertical scrollbar stepping
Returns:
Returns the value of the stepping of the vertical scrollbar in s on success.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_FLOAT, EWL_SCROLLBAR, ewl_scrollbar_step_get(), EWL_SCROLLPANE_TYPE, and hscrollbar.

double ewl_scrollpane_hscrollbar_value_get ( Ewl_Scrollpane s  ) 

Retrieves the value of the horizontal scrollbar in s.

Parameters:
s,: the scrollpane to retrieve it's horizontal scrollbar value
Returns:
Returns the value of the horizontal scrollbar in s on success.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_FLOAT, EWL_SCROLLBAR, ewl_scrollbar_value_get(), EWL_SCROLLPANE_TYPE, and hscrollbar.

void ewl_scrollpane_hscrollbar_value_set ( Ewl_Scrollpane s,
double  val 
)

Set the value of the horizontal scrollbar in s to val.

Parameters:
s,: the scrollpane to set the horizontal scrollbar value
val,: the value to set the scrollbar too
Returns:
Returns nothing

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SCROLLBAR, ewl_scrollbar_value_set(), EWL_SCROLLPANE_TYPE, and hscrollbar.

double ewl_scrollpane_kinetic_dampen_get ( Ewl_Scrollpane s  ) 

Gets the minimum velocity for kinetic scrolling.

Parameters:
s,: The scrollpane to work with
Returns:
Returns the minimum velocity

References Ewl_Scrollpane_Scroll_Info_Base::dampen, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_SCROLLPANE_TYPE, and kinfo.

Referenced by ewl_tree_kinetic_dampen_get().

void ewl_scrollpane_kinetic_dampen_set ( Ewl_Scrollpane s,
double  d 
)

Sets the multiplier to reduce the velocity of kinetic scrolling.

Parameters:
s,: The scrollpane to work with
d,: The multiplier to reduce velocity
Returns:
Returns no value

References Ewl_Scrollpane_Scroll_Info_Base::dampen, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SCROLLPANE_TYPE, and kinfo.

Referenced by ewl_tree_kinetic_dampen_set().

int ewl_scrollpane_kinetic_fps_get ( Ewl_Scrollpane s  ) 

Parameters:
s,: The scrollpane to work with
Returns:
Returns the current frames per second brief Gets the times per second the timer used for scrolling will be called

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_SCROLLPANE_TYPE, Ewl_Scrollpane_Scroll_Info_Base::fps, and kinfo.

Referenced by ewl_tree_kinetic_fps_get().

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.

Parameters:
s,: The scrollpane to work with
fps,: The desired frames per second
Returns:
Returns no value

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SCROLLPANE_TYPE, Ewl_Scrollpane_Scroll_Info_Base::fps, and kinfo.

Referenced by ewl_tree_kinetic_fps_set().

double ewl_scrollpane_kinetic_max_velocity_get ( Ewl_Scrollpane s  ) 

Gets the maximum velocity for kinetic scrolling.

Parameters:
s,: The scrollpane to work with
Returns:
Returns the maximum velocity

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_SCROLLPANE_TYPE, kinfo, and Ewl_Scrollpane_Scroll_Info_Base::vmax.

Referenced by ewl_tree_kinetic_max_velocity_get().

void ewl_scrollpane_kinetic_max_velocity_set ( Ewl_Scrollpane s,
double  v 
)

Sets the maximum velocity for kinetic scrolling.

Parameters:
s,: The scrollpane to work with
v,: The maximum velocity
Returns:
Returns no value

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SCROLLPANE_TYPE, kinfo, and Ewl_Scrollpane_Scroll_Info_Base::vmax.

Referenced by ewl_tree_kinetic_max_velocity_set().

double ewl_scrollpane_kinetic_min_velocity_get ( Ewl_Scrollpane s  ) 

Gets the minimum velocity for kinetic scrolling.

Parameters:
s,: The scrollpane to work with
Returns:
Returns the minimum velocity

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_SCROLLPANE_TYPE, kinfo, and Ewl_Scrollpane_Scroll_Info_Base::vmin.

Referenced by ewl_tree_kinetic_min_velocity_get().

void ewl_scrollpane_kinetic_min_velocity_set ( Ewl_Scrollpane s,
double  v 
)

Sets the minimum velocity for kinetic scrolling.

Parameters:
s,: The scrollpane to work with
v,: The minimum velocity
Returns:
Returns no value

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SCROLLPANE_TYPE, kinfo, and Ewl_Scrollpane_Scroll_Info_Base::vmin.

Referenced by ewl_tree_kinetic_min_velocity_set().

Ewl_Kinetic_Scroll ewl_scrollpane_kinetic_scrolling_get ( Ewl_Scrollpane s  ) 

Gets the type of kinetic scrolling used.

Parameters:
s,: The scrollpane to use
Returns:
Returns the type of scrolling used

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_KINETIC_SCROLL_NONE, EWL_SCROLLPANE_TYPE, and type.

Referenced by ewl_tree_kinetic_scrolling_get().

Ewl_Widget* ewl_scrollpane_new ( void   ) 

Create a new scrollpane.

Returns:
Returns a new scrollpane on success, NULL on failure.

References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_scrollpane_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.

Referenced by ewl_combo_scrollable_set(), ewl_tree_view_freebox_init(), and ewl_tree_view_scrolled_init().

Ewl_Scrollpane_Flags ewl_scrollpane_vscrollbar_flag_get ( Ewl_Scrollpane s  ) 

Get flags for vertical scrollbar.

Parameters:
s,: the scrollpane that contains the scrollbar to retrieve
Returns:
Returns the flags of the vertical scrollbar on success, 0 on failure.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_SCROLLPANE_TYPE, and vflag.

void ewl_scrollpane_vscrollbar_flag_set ( Ewl_Scrollpane s,
Ewl_Scrollpane_Flags  f 
)

Set flags for vertical scrollbar.

Parameters:
s,: the scrollpane that contains the scrollbar to change
f,: the flags to set on the vertical scrollbar in s
Returns:
Returns no value. The scrollbar flags for the vertical scrollbar are set to f.

References box, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FLAG_FILL_VSHRINK, EWL_OBJECT, ewl_object_fill_policy_get(), ewl_object_fill_policy_set(), EWL_SCROLLPANE_FLAG_ALWAYS_HIDDEN, EWL_SCROLLPANE_TYPE, EWL_WIDGET, ewl_widget_configure(), and vflag.

double ewl_scrollpane_vscrollbar_step_get ( Ewl_Scrollpane s  ) 

Retrives the value of the stepping of the vertical scrollbar in s.

Parameters:
s,: the scrollpane to retrieve its vertical scrollbar stepping
Returns:
Returns the value of the stepping of the vertical scrollbar in s on success.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_FLOAT, EWL_SCROLLBAR, ewl_scrollbar_step_get(), EWL_SCROLLPANE_TYPE, and vscrollbar.

Referenced by ewl_scrollpane_cb_wheel_scroll().

double ewl_scrollpane_vscrollbar_value_get ( Ewl_Scrollpane s  ) 

Retrieves the value of the vertical scrollbar in s.

Parameters:
s,: the scrollpane to retrieve it's vertical scrollbar value
Returns:
Returns the value of the vertical scrollbar in s on success.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_FLOAT, EWL_SCROLLBAR, ewl_scrollbar_value_get(), EWL_SCROLLPANE_TYPE, and vscrollbar.

Referenced by ewl_scrollpane_cb_wheel_scroll().

void ewl_scrollpane_vscrollbar_value_set ( Ewl_Scrollpane s,
double  val 
)

Set the value of the vertical scrollbar in s to val.

Parameters:
s,: the scrollpane to set the vertical scrollbar value
val,: the value to set the scrollbar too
Returns:
Returns nothing

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SCROLLBAR, ewl_scrollbar_value_set(), EWL_SCROLLPANE_TYPE, and vscrollbar.

Referenced by ewl_scrollpane_cb_wheel_scroll().


Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sat May 17 16:51:11 2008