Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Related Pages

Scrollbar: A Simple Scrollbar Widget

Defines an Ewl_Scrollbar for using when scrolling values are needed. More...

Data Structures

struct  Ewl_Scrollbar
 Inherits from Ewl_Box to layout an Ewl_Seeker and two Ewl_Buttons to provide scrollbar functionality. More...

struct  Ewl_Scrollbar
 Inherits from Ewl_Box to layout an Ewl_Seeker and two Ewl_Buttons to provide scrollbar functionality. More...


Defines

#define EWL_SCROLLBAR(scrollbar)   ((Ewl_Scrollbar *) scrollbar)
 Typecasts a pointer to an Ewl_Scrollbar pointer.

#define ewl_hscrollbar_new()   ewl_scrollbar_new(EWL_ORIENTATION_HORIZONTAL)
 A shortcut for allocating a new horizontal scrollbar.

#define ewl_vscrollbar_new()   ewl_scrollbar_new(EWL_ORIENTATION_VERTICAL)
 A shortcut for allocating a new vertical scrollbar.


Typedefs

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


Functions

Ewl_Widgetewl_scrollbar_new (Ewl_Orientation orientation)
 Allocate and initialize a new scrollbar widget.

void ewl_scrollbar_init (Ewl_Scrollbar *s, Ewl_Orientation orientation)
 Initialize a scrollbar to default values.

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.

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.

void ewl_scrollbar_flag_set (Ewl_Scrollbar *s, Ewl_ScrollBar_Flags f)
 Set the flag mask for a scrollbar.

Ewl_ScrollBar_Flags ewl_scrollbar_flag_get (Ewl_Scrollbar *s)
 Retrieve the current flags of a scrollbar.


Detailed Description

Defines an Ewl_Scrollbar for using when scrolling values are needed.


Function Documentation

Ewl_ScrollBar_Flags ewl_scrollbar_flag_get Ewl_Scrollbar s  ) 
 

Retrieve the current flags of a scrollbar.

Parameters:
s: the scrollbar to retrieve the flags
Returns:
Returns the flags from the scrollbars s.

void ewl_scrollbar_flag_set Ewl_Scrollbar s,
Ewl_ScrollBar_Flags  f
 

Set the flag mask for a scrollbar.

Parameters:
s: the scrollbar to set the flags
f: the flags to set for the scrollbar
Returns:
Returns no value.
Sets the flags f for the scrollbar s.

void ewl_scrollbar_init Ewl_Scrollbar s,
Ewl_Orientation  orientation
 

Initialize a scrollbar to default values.

Parameters:
s: the scrollbar to initialize
orientation: the orientation for the scrollbar
Returns:
Returns no value.

Ewl_Widget* ewl_scrollbar_new Ewl_Orientation  orientation  ) 
 

Allocate and initialize a new scrollbar widget.

Parameters:
orientation: the desired orientation of the scrollbar
Returns:
Returns NULL on failure, or a pointer to a new scrollbar on success.

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.

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.

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.

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.