SDLScrollBar(3)

NAME
SDLScrollBar - A vertical or horizontal scrollbar.

SYNOPSIS

#include <sdlscrollbar.h>

Inherits SDLGradientWidget.

Inherited by SDLSlider.

  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.
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.
bool eventMouseButtonDown (const SDL_MouseButtonEvent* button)
Overridable Eventhandler for a SDL_MouseButtonEvent message.
bool eventButtonClick (int id, SDLWidget* widget)
bool eventMouseButtonUp (const SDL_MouseButtonEvent* button)
Overridable Eventhandler for a SDL_MouseButtonEvent message.

  Protected Attributes
Uint32 scroll_min
Uint32 scroll_max
Uint32 scroll_current
Uint32 my_linesize
Uint32 my_pagesize
SDLButton* scrollbutton [2]
ScrollButton* dragbutton
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.

AUTHOR

Generated automatically by Doxygen for ParaGUI from the source code.