Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

SDLScrollBar Class Reference

A vertical or horizontal scrollbar. More...

#include <sdlscrollbar.h>

Inheritance diagram for SDLScrollBar

Inheritance graph
[legend]
Collaboration diagram for SDLScrollBar:

Collaboration graph
[legend]
List of all members.

Public Methods

 SDLScrollBar (SDLWidget* parent, int id, SDL_Rect& r, int direction = SDL_SB_VERTICAL)
virtual ~SDLScrollBar ()
void LoadThemeStyle (const char* widgettype)
 Load a style from the theme definition. More...

void SetPosition (Uint32 pos)
int GetPosition ()
void SetWindowSize (Uint32 wsize)
void SetRange (Uint32 min, Uint32 max)
void SetLineSize (int ls)

Protected Methods

void eventSizeWindow (int w, int h)
bool eventMouseMotion (const SDL_MouseMotionEvent* motion)
 Overridable Eventhandler for a SDL_MouseMotionEvent message. More...

bool eventMouseButtonDown (const SDL_MouseButtonEvent* button)
 Overridable Eventhandler for a SDL_MouseButtonEvent message. More...

bool eventButtonClick (int id, SDLWidget* widget)
bool eventMouseButtonUp (const SDL_MouseButtonEvent* button)
 Overridable Eventhandler for a SDL_MouseButtonEvent message. More...


Protected Attributes

Uint32 scroll_min
Uint32 scroll_max
Uint32 scroll_current
Uint32 my_linesize
Uint32 my_pagesize
SDLButtonscrollbutton [2]
ScrollButtondragbutton
SDL_Rect position [4]
int sb_direction
int id

Friends

class  ScrollButton

Detailed Description

A vertical or horizontal scrollbar.

Author(s):
Alexander Pipelka

Doesn't actually tie itself to any object to be scrolled, just get's told it's current state through function calls.

Definition at line 53 of file sdlscrollbar.h.


Constructor & Destructor Documentation

SDLScrollBar::SDLScrollBar ( SDLWidget * parent,
int id,
SDL_Rect & r,
int direction = SDL_SB_VERTICAL )
 

SDLScrollBar::~SDLScrollBar ( ) [virtual]
 


Member Function Documentation

int SDLScrollBar::GetPosition ( )
 

void SDLScrollBar::LoadThemeStyle ( const char * widgettype ) [virtual]
 

Load a style from the theme definition.

Parameters:
widgettype   name of the widgettype
objectname   name of the object

Loads the defined style for a given widgettype

Reimplemented from SDLGradientWidget.

Reimplemented in SDLSlider.

void SDLScrollBar::SetLineSize ( int ls )
 

void SDLScrollBar::SetPosition ( Uint32 pos )
 

void SDLScrollBar::SetRange ( Uint32 min,
Uint32 max )
 

void SDLScrollBar::SetWindowSize ( Uint32 wsize )
 

bool SDLScrollBar::eventButtonClick ( int id,
SDLWidget * widget ) [protected, virtual]
 

Reimplemented from SDLMessageObject.

bool SDLScrollBar::eventMouseButtonDown ( const SDL_MouseButtonEvent * button ) [protected, virtual]
 

Overridable Eventhandler for a SDL_MouseButtonEvent message.

This handler is called when a mouse button is pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:
button   SDL_MouseButtonEvent message

Returns:
Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from SDLWidgetDnD.

bool SDLScrollBar::eventMouseButtonUp ( const SDL_MouseButtonEvent * button ) [protected, virtual]
 

Overridable Eventhandler for a SDL_MouseButtonEvent message.

This handler is called when a mouse button is released. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:
button   SDL_MouseButtonEvent message

Returns:
Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from SDLWidgetDnD.

Reimplemented in SDLSlider.

bool SDLScrollBar::eventMouseMotion ( const SDL_MouseMotionEvent * motion ) [protected, virtual]
 

Overridable Eventhandler for a SDL_MouseMotionEvent message.

This handler is called when mouse movement is detected. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:
motion   SDL_MouseMotionEvent message

Returns:
Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from SDLWidgetDnD.

void SDLScrollBar::eventSizeWindow ( int w,
int h ) [protected, virtual]
 

Reimplemented from SDLDrawObject.


Friends And Related Function Documentation

class ScrollButton [friend]
 

Definition at line 149 of file sdlscrollbar.h.


Member Data Documentation

ScrollButton * SDLScrollBar::dragbutton [protected]
 

Definition at line 143 of file sdlscrollbar.h.

int SDLScrollBar::id [protected]
 

Definition at line 147 of file sdlscrollbar.h.

Uint32 SDLScrollBar::my_linesize [protected]
 

Definition at line 137 of file sdlscrollbar.h.

Uint32 SDLScrollBar::my_pagesize [protected]
 

Definition at line 138 of file sdlscrollbar.h.

SDL_Rect SDLScrollBar::position[4] [protected]
 

Definition at line 144 of file sdlscrollbar.h.

int SDLScrollBar::sb_direction [protected]
 

Definition at line 146 of file sdlscrollbar.h.

Uint32 SDLScrollBar::scroll_current [protected]
 

Definition at line 136 of file sdlscrollbar.h.

Uint32 SDLScrollBar::scroll_max [protected]
 

Definition at line 135 of file sdlscrollbar.h.

Uint32 SDLScrollBar::scroll_min [protected]
 

Definition at line 134 of file sdlscrollbar.h.

SDLButton * SDLScrollBar::scrollbutton[2] [protected]
 

Definition at line 142 of file sdlscrollbar.h.


The documentation for this class was generated from the following file: