- Main Page
- Classes
- Files

- File List

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

    00001 #ifndef _SCROLLABLE_BASE_H_
    00002 #define _SCROLLABLE_BASE_H_
    00003
    00004 #include <nds.h>
    00005
    00006 namespace WoopsiUI {
    00007
    00013         class ScrollableBase {
    00014         public:
    00018                 inline ScrollableBase() { }
    00019
    00024                 virtual inline const s32 getCanvasX() const { return _canvasX; };
    00025
    00030                 virtual inline const s32 getCanvasY() const { return _canvasY; };
    00031
    00036                 virtual inline const s32 getCanvasWidth() const { return _canvasWidth; };
    00037
    00042                 virtual inline const s32 getCanvasHeight() const { return _canvasHeight; };
    00043
    00049                 virtual void scroll(s32 dx, s32 dy) = 0;
    00050
    00056                 virtual void jump(s32 x, s32 y) = 0;
    00057
    00058         protected:
    00059                 s32 _canvasX;
    00060                 s32 _canvasY;
    00061                 s32 _canvasWidth;
    00062                 s32 _canvasHeight;
    00068                 virtual inline void setCanvasWidth(const s32 width) { _canvasWidth = width; };
    00069
    00074                 virtual inline void setCanvasHeight(const s32 height) { _canvasHeight = height; };
    00075
    00079                 virtual inline ~ScrollableBase() { }
    00080         };
    00081 }
    00082
    00083 #endif