# WoopsiUI::ScrollableBase Class Reference

`#include <scrollablebase.h>`

Inheritance diagram for WoopsiUI::ScrollableBase:

List of all members.

## Public Member Functions
| ScrollableBase ()
virtual const s32 | getCanvasX () const
virtual const s32 | getCanvasY () const
virtual const s32 | getCanvasWidth () const
virtual const s32 | getCanvasHeight () const
virtual void | scroll (s32 dx, s32 dy)=0
virtual void | jump (s32 x, s32 y)=0
## Protected Member Functions
virtual void | setCanvasWidth (const s32 width)
virtual void | setCanvasHeight (const s32 height)
virtual | ~ScrollableBase ()
## Protected Attributes
s32 | _canvasX
s32 | _canvasY
s32 | _canvasWidth
s32 | _canvasHeight

## Detailed Description

Abstract class providing some basic functionality required by scrolling gadgets. Scrolling regions are modelled as a virtual "canvas", or rectangular region, with height/width dimensions and x/y co-ordinates.

## Constructor & Destructor Documentation

WoopsiUI::ScrollableBase::ScrollableBase | ( |  | ) | `[inline]`

Constructor.

virtual WoopsiUI::ScrollableBase::~ScrollableBase | ( |  | ) | `[inline, protected, virtual]`

Destructor.

## Member Function Documentation

virtual const s32 WoopsiUI::ScrollableBase::getCanvasHeight | ( |  | ) | const`[inline, virtual]`

Gets the height of the virtual canvas.

Returns:
  The height of the virtual canvas.

virtual const s32 WoopsiUI::ScrollableBase::getCanvasWidth | ( |  | ) | const`[inline, virtual]`

Gets the width of the virtual canvas.

Returns:
  The width of the virtual canvas.

virtual const s32 WoopsiUI::ScrollableBase::getCanvasX | ( |  | ) | const`[inline, virtual]`

Gets the x co-ordinate of the virtual canvas.

Returns:
  The x co-ordinate of the virtual canvas.

virtual const s32 WoopsiUI::ScrollableBase::getCanvasY | ( |  | ) | const`[inline, virtual]`

Gets the y co-ordinate of the virtual canvas.

Returns:
  The y co-ordinate of the virtual canvas.

virtual void WoopsiUI::ScrollableBase::jump | ( | s32 | x,
|  | s32 | y |
| ) |  |  | `[pure virtual]`

Repositions the virtual canvas to the specified co-ordinates.

Parameters:

  | x | New x co-ordinate of the virtual canvas.
  | y | New y co-ordinate of the virtual canvas.

Implemented in WoopsiUI::ScrollingPanel.

virtual void WoopsiUI::ScrollableBase::scroll | ( | s32 | dx,
|  | s32 | dy |
| ) |  |  | `[pure virtual]`

Scrolls the virtual canvas by the specified amounts.

Parameters:

  | dx | Distance to scroll horizontally.
  | dy | Distance to scroll vertically.

Implemented in WoopsiUI::ScrollingPanel.

virtual void WoopsiUI::ScrollableBase::setCanvasHeight | ( | const s32 | height | ) | `[inline, protected, virtual]`

Sets the height of the virtual canvas.

Parameters:

  | height | The height of the virtual canvas.

virtual void WoopsiUI::ScrollableBase::setCanvasWidth | ( | const s32 | width | ) | `[inline, protected, virtual]`

Sets the width of the virtual canvas.

Parameters:

  | width | The width of the virtual canvas.

## Member Data Documentation

s32 WoopsiUI::ScrollableBase::_canvasHeight`[protected]`

Height of the virtual canvas

s32 WoopsiUI::ScrollableBase::_canvasWidth`[protected]`

Width of the virtual canvas

s32 WoopsiUI::ScrollableBase::_canvasX`[protected]`

X co-ordinate of the vitual canvas

s32 WoopsiUI::ScrollableBase::_canvasY`[protected]`

Y co-ordinate of the virtual canvas

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

- C:/Documents and Settings/Administrator/Desktop/woopsi-src-0.40/Woopsi/libwoopsi/include/scrollablebase.h