Download

Support

Ewl_Scrollbar: A Simple Scrollbar Widget


Detailed Description

Defines an Ewl_Scrollbar for using when scrolling values are needed.

Remarks:
Inherits from Ewl_Box.

Tutorial


Data Structures

struct  Ewl_Scrollbar
 Inherits from Ewl_Box and extends to provide a scrollbar widget. More...

Defines

#define EWL_SCROLLBAR(scrollbar)   ((Ewl_Scrollbar *) scrollbar)
#define EWL_SCROLLBAR_IS(w)   (ewl_widget_type_is(EWL_WIDGET(w), EWL_SCROLLBAR_TYPE))
#define EWL_SCROLLBAR_TYPE   "scrollbar"

Typedefs

typedef struct Ewl_Scrollbar Ewl_Scrollbar

Functions

Ewl_Widgetewl_hscrollbar_new (void)
 Allocate and initialize a new horizontal scrollbar widget.
void ewl_scrollbar_cb_scroll_start (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_scrollbar_cb_scroll_stop (Ewl_Widget *w, void *ev_data, void *user_data)
int ewl_scrollbar_init (Ewl_Scrollbar *s)
 Initialize a scrollbar to default values.
char ewl_scrollbar_inverse_scroll_get (Ewl_Scrollbar *s)
 Checks the inverse scrolling flag on a scrollbar.
void ewl_scrollbar_inverse_scroll_set (Ewl_Scrollbar *s, char v)
 Sets the inverse scrolling flag on a scrollbar.
Ewl_Widgetewl_scrollbar_new (void)
 Allocate and initialize a new scrollbar widget.
Ewl_Orientation ewl_scrollbar_orientation_get (Ewl_Scrollbar *s)
 Change the orientation of a scrollbar.
void ewl_scrollbar_orientation_set (Ewl_Scrollbar *s, Ewl_Orientation orientation)
 Change the orientation of a scrollbar.
double ewl_scrollbar_step_get (Ewl_Scrollbar *s)
 Get the current step size of the scrollbar.
void ewl_scrollbar_step_set (Ewl_Scrollbar *s, double v)
 Change the step size of a scrollbar.
double ewl_scrollbar_value_get (Ewl_Scrollbar *s)
 Get the current value of the dragbar.
void ewl_scrollbar_value_set (Ewl_Scrollbar *s, double v)
 Set the current value of the dragbar.
Ewl_Widgetewl_vscrollbar_new (void)
 Allocate and initialize a new vertical scrollbar widget.

Define Documentation

#define EWL_SCROLLBAR_IS (  )     (ewl_widget_type_is(EWL_WIDGET(w), EWL_SCROLLBAR_TYPE))

Returns TRUE if the widget is an Ewl_Scrollbar, FALSE otherwise

#define EWL_SCROLLBAR_TYPE   "scrollbar"

Widget Theme Keys:
/hscrollbar/file
Widget Theme Keys:
/hscrollbar/group
Widget Theme Keys:
/vscrollbar/file
Widget Theme Keys:
/vscrollbar/group
Widget Theme Keys:
/hscrollbar/seeker/file
Widget Theme Keys:
/hscrollbar/seeker/group
Widget Theme Keys:
/vscrollbar/seeker/file
Widget Theme Keys:
/vscrollbar/seeker/group
Widget Theme Keys:
/hscrollbar/seeker/button/file
Widget Theme Keys:
/hscrollbar/seeker/button/group
Widget Theme Keys:
/vscrollbar/seeker/button/file
Widget Theme Keys:
/vscrollbar/seeker/button/group
The type name for the Ewl_Scrollbar widget

Referenced by ewl_scrollbar_cb_scroll_start(), ewl_scrollbar_cb_scroll_stop(), ewl_scrollbar_init(), ewl_scrollbar_inverse_scroll_get(), ewl_scrollbar_inverse_scroll_set(), ewl_scrollbar_orientation_get(), ewl_scrollbar_orientation_set(), ewl_scrollbar_step_get(), ewl_scrollbar_step_set(), ewl_scrollbar_value_get(), and ewl_scrollbar_value_set().


Typedef Documentation

typedef struct Ewl_Scrollbar Ewl_Scrollbar

Provides a seeker with increment and decrement buttons arranged in a specified order.


Function Documentation

Ewl_Widget* ewl_hscrollbar_new ( void   ) 

Allocate and initialize a new horizontal scrollbar widget.

Returns:
Returns NULL on failure, or a pointer to a new scrollbar on success.

References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_ORIENTATION_HORIZONTAL, EWL_SCROLLBAR, ewl_scrollbar_new(), ewl_scrollbar_orientation_set(), and EWL_WIDGET.

Referenced by ewl_scrollpane_init().

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

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

char ewl_scrollbar_inverse_scroll_get ( Ewl_Scrollbar s  ) 

Checks the inverse scrolling flag on a scrollbar.

Parameters:
s,: the scrollbar to get inverted scrolling value
Returns:
Returns the current value for inverted scrolling.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_SCROLLBAR_TYPE, and invert.

void ewl_scrollbar_inverse_scroll_set ( Ewl_Scrollbar s,
char  i 
)

Sets the inverse scrolling flag on a scrollbar.

Parameters:
s,: the scrollbar to set inverted scrolling value
i,: value to set for inverse scrolling
Returns:
Returns no value.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, direction, DLEAVE_FUNCTION, DLEVEL_STABLE, and EWL_SCROLLBAR_TYPE.

Ewl_Widget* ewl_scrollbar_new ( void   ) 

Allocate and initialize a new scrollbar widget.

Returns:
Returns NULL on failure, or a pointer to a new scrollbar on success.

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

Referenced by ewl_hscrollbar_new(), and ewl_vscrollbar_new().

Ewl_Orientation ewl_scrollbar_orientation_get ( Ewl_Scrollbar s  ) 

Change the orientation of a scrollbar.

Parameters:
s,: the scrollbar to change orientation
Returns:
Returns no value.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_BOX, ewl_box_orientation_get(), EWL_ORIENTATION_HORIZONTAL, and EWL_SCROLLBAR_TYPE.

double ewl_scrollbar_step_get ( Ewl_Scrollbar s  ) 

Get the current step size of the scrollbar.

Parameters:
s,: the scrollbar to retrieve step size
Returns:
Returns the current step size of the scrollbar.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_RANGE, ewl_range_step_get(), EWL_SCROLLBAR_TYPE, and seeker.

Referenced by ewl_scrollpane_hscrollbar_step_get(), and ewl_scrollpane_vscrollbar_step_get().

void ewl_scrollbar_step_set ( Ewl_Scrollbar s,
double  v 
)

Change the step size of a scrollbar.

Parameters:
s,: the scrollbar to change step size
v,: the new step size of the scrollbar
Returns:
Returns no value. Changes the step size of the scrollbar s to v.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_RANGE, ewl_range_step_set(), EWL_SCROLLBAR_TYPE, and seeker.

Referenced by ewl_scrollpane_cb_configure().

double ewl_scrollbar_value_get ( Ewl_Scrollbar s  ) 

Get the current value of the dragbar.

Parameters:
s,: the scrollbar to get the current value
Returns:
Returns the current value of the scrollbar s.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_FLOAT, EWL_RANGE, ewl_range_value_get(), EWL_SCROLLBAR_TYPE, and seeker.

Referenced by ewl_scrollpane_cb_configure(), ewl_scrollpane_hscrollbar_value_get(), and ewl_scrollpane_vscrollbar_value_get().

void ewl_scrollbar_value_set ( Ewl_Scrollbar s,
double  v 
)

Set the current value of the dragbar.

Parameters:
s,: the scrollbar to set the current value
v,: the new value for the scrollbar
Returns:
Returns no value. Sets the current value of the scrollbar s.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_RANGE, ewl_range_value_set(), EWL_SCROLLBAR_TYPE, and seeker.

Referenced by ewl_scrollpane_cb_focus_jump(), ewl_scrollpane_hscrollbar_value_set(), and ewl_scrollpane_vscrollbar_value_set().

Ewl_Widget* ewl_vscrollbar_new ( void   ) 

Allocate and initialize a new vertical scrollbar widget.

Returns:
Returns NULL on failure, or a pointer to a new scrollbar on success.

References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_ORIENTATION_VERTICAL, EWL_SCROLLBAR, ewl_scrollbar_new(), ewl_scrollbar_orientation_set(), and EWL_WIDGET.

Referenced by ewl_scrollpane_init().


Copyright © Enlightenment.org

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