- Main Page
- Classes
- Files

- File List

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

    00001 #ifndef _SLIDER_VERTICAL_H_
    00002 #define _SLIDER_VERTICAL_H_
    00003
    00004 #include <nds.h>
    00005 #include "gadget.h"
    00006 #include "gadgeteventhandler.h"
    00007
    00008 namespace WoopsiUI {
    00009
    00010         class SliderVerticalGrip;
    00011
    00017         class SliderVertical : public Gadget, public GadgetEventHandler {
    00018
    00019         public:
    00020
    00028                 SliderVertical(s16 x, s16 y, u16 width, u16 height);
    00029
    00034                 inline const s16 getMinimumValue() const { return _minimumValue; };
    00035
    00040                 inline const s16 getMaximumValue() const { return _maximumValue; };
    00041
    00046                 const s16 getValue() const;
    00047
    00055                 inline const s16 getPageSize() const { return _pageSize; };
    00056
    00061                 inline void setMinimumValue(const s16 value) {
    00062                         _minimumValue = value;
    00063                         resizeGrip();
    00064                 };
    00065
    00070                 inline void setMaximumValue(const s16 value) {
    00071                         _maximumValue = value;
    00072                         resizeGrip();
    00073                 };
    00074
    00080                 void setValue(const s16 value);
    00081
    00087                 inline void setPageSize(const s16 pageSize) {
    00088                         _pageSize = pageSize;
    00089                         resizeGrip();
    00090                 };
    00091
    00096                 void jumpGrip(u8 direction);
    00097
    00103                 virtual void draw(Rect clipRect);
    00104
    00111                 virtual bool click(s16 x, s16 y);
    00112
    00117                 virtual void handleDragEvent(const GadgetEventArgs& e);
    00118
    00123                 virtual void handleMoveEvent(const GadgetEventArgs& e);
    00124
    00131                 virtual bool resize(u16 width, u16 height);
    00132
    00133         protected:
    00134                 SliderVerticalGrip* _grip;
    00135                 s16 _minimumValue;
    00136                 s16 _maximumValue;
    00137                 s16 _minimumGripHeight;
    00138                 s16 _pageSize;
    00143                 virtual inline ~SliderVertical() { };
    00144
    00148                 inline SliderVertical(const SliderVertical& sliderVertical) : Gadget(sliderVertical) { };
    00149
    00153                 void resizeGrip();
    00154         };
    00155 }
    00156
    00157 #endif