Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions

ScrollArea Class Reference

Base class for scrolling. More...

#include <ScrollArea.h>

Inheritance diagram for ScrollArea:
Container Control Broadcaster Listener ListBox TextBox

List of all members.

Public Member Functions

 ScrollArea (const std::string &name, int width, int height)
 ~ScrollArea ()

Protected Member Functions

void initialize ()
void logic ()

Protected Attributes

ScrollBarmScrollBar
int mScrollbarWidth
int mScrollbarHeight
int mScrollAreaWidth
int mScrollAreaHeight

Private Member Functions

void onMouseWheelMotion (Event *event)
void push (Event *event)
virtual void scrollAreaInit ()
virtual void areaChanged ()
void drawSkin ()
void drawPlain ()

Detailed Description

Base class for scrolling.

Note:
When drawing a derived Control, the area must be the width and height of the scrollarea minus the width of the vertical scrollbar and the height of the horizontal scrollbar.

Constructor & Destructor Documentation

ScrollArea::ScrollArea ( const std::string &  name,
int  width,
int  height 
)
ScrollArea::~ScrollArea (  ) 

Member Function Documentation

virtual void ScrollArea::areaChanged (  )  [inline, private, virtual]

Reimplemented in ListBox, and TextBox.

void ScrollArea::drawPlain (  )  [private, virtual]

Draws a Control without a Skin.

Reimplemented from Container.

Reimplemented in ListBox, and TextBox.

void ScrollArea::drawSkin (  )  [private, virtual]

Draws a Control using a Skin.

Reimplemented from Container.

Reimplemented in ListBox, and TextBox.

void ScrollArea::initialize (  )  [protected, virtual]

Initialize all internal variables, and any child controls needed.

Reimplemented from Container.

void ScrollArea::logic (  )  [protected, virtual]

Reimplemented from Container.

void ScrollArea::onMouseWheelMotion ( Event event  )  [private, virtual]

Called whenever a MOUSE_WHEEL_UP or MOUSE_WHEEL_DOWN are fired.

Reimplemented from Control.

void ScrollArea::push ( Event event  )  [private, virtual]

Reimplemented from Control.

virtual void ScrollArea::scrollAreaInit (  )  [inline, private, virtual]

Used to initialize the control and its properties.

This function must be overriden in derived controls, such as the TextBox.

Reimplemented in ListBox, and TextBox.


Member Data Documentation

Height of the slider.

int ScrollArea::mScrollbarWidth [protected]

Width of the slider.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines