Woopsi 1.0 GUI Framework for Nintendo DS Homebrew

- Main Page
- Classes
- Files

- File List

# 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 #include "sliderbase.h"
    00008
    00009 namespace WoopsiUI {
    00010
    00011         class SliderVerticalGrip;
    00012
    00018         class SliderVertical : public SliderBase, public Gadget, public GadgetEventHandler {
    00019
    00020         public:
    00021
    00029                 SliderVertical(s16 x, s16 y, u16 width, u16 height);
    00030
    00035                 inline const s16 getMinimumValue() const { return _minimumValue; };
    00036
    00041                 inline const s16 getMaximumValue() const { return _maximumValue; };
    00042
    00047                 const s32 getValue() const;
    00048
    00056                 inline const s16 getPageSize() const { return _pageSize; };
    00057
    00062                 inline void setMinimumValue(const s16 value) {
    00063                         _minimumValue = value;
    00064                         resizeGrip();
    00065                 };
    00066
    00071                 inline void setMaximumValue(const s16 value) {
    00072                         _maximumValue = value;
    00073                         resizeGrip();
    00074                 };
    00075
    00081                 void setValue(const s32 value);
    00082
    00088                 inline void setPageSize(const s16 pageSize) {
    00089                         _pageSize = pageSize;
    00090                         resizeGrip();
    00091                 };
    00092
    00097                 virtual void handleDragEvent(const GadgetEventArgs& e);
    00098
    00105                 s16 getMinimumStep() const;
    00106
    00107         protected:
    00108                 SliderVerticalGrip* _grip;
    00109                 s16 _minimumValue;
    00110                 s16 _maximumValue;
    00111                 s32 _value;
    00112                 s16 _minimumGripHeight;
    00113                 s16 _pageSize;
    00121                 virtual void drawContents(GraphicsPort* port);
    00122
    00129                 virtual void drawBorder(GraphicsPort* port);
    00130
    00136                 virtual void onResize(u16 width, u16 height);
    00137
    00143                 virtual void onClick(s16 x, s16 y);
    00144
    00148                 virtual inline ~SliderVertical() { };
    00149
    00153                 inline SliderVertical(const SliderVertical& sliderVertical) : Gadget(sliderVertical) { };
    00154
    00158                 void resizeGrip();
    00159         };
    00160 }
    00161
    00162 #endif