00001 #ifndef _SCROLLBAR_VERTICAL_H_ 00002 #define _SCROLLBAR_VERTICAL_H_ 00003 00004 #include <nds.h> 00005 #include "gadget.h" 00006 #include "gadgeteventhandler.h" 00007 00008 namespace WoopsiUI { 00009 00010 class SliderVertical; 00011 class Button; 00012 class WoopsiTimer; 00013 00022 class ScrollbarVertical : public Gadget, public GadgetEventHandler { 00023 00024 public: 00025 00034 ScrollbarVertical(s16 x, s16 y, u16 width, u16 height, FontBase* font = NULL); 00035 00040 const s16 getMinimumValue() const; 00041 00046 const s16 getMaximumValue() const; 00047 00052 const s16 getValue() const; 00053 00061 const s16 getPageSize() const; 00062 00067 void setMinimumValue(const s16 value); 00068 00073 void setMaximumValue(const s16 value); 00074 00080 void setValue(const s16 value); 00081 00087 void setPageSize(const s16 pageSize); 00088 00093 void setButtonScrollAmount(const u16 buttonScrollAmount); 00094 00099 void jumpGrip(u8 direction); 00100 00106 virtual void draw(Rect clipRect); 00107 00112 virtual void handleActionEvent(const GadgetEventArgs& e); 00113 00118 virtual void handleClickEvent(const GadgetEventArgs& e); 00119 00124 virtual void handleReleaseEvent(const GadgetEventArgs& e); 00125 00130 virtual void handleReleaseOutsideEvent(const GadgetEventArgs& e); 00131 00136 virtual void handleValueChangeEvent(const GadgetEventArgs& e); 00137 00144 virtual bool resize(u16 width, u16 height); 00145 00146 protected: 00147 SliderVertical* _slider; 00148 Button* _upButton; 00149 Button* _downButton; 00150 u8 _buttonHeight; 00151 u16 _buttonScrollAmount; 00152 u8 _scrollTimeout; 00153 WoopsiTimer* _timer; 00158 virtual inline ~ScrollbarVertical() { }; 00159 00163 inline ScrollbarVertical(const ScrollbarVertical& scrollbarVertical) : Gadget(scrollbarVertical) { }; 00164 }; 00165 } 00166 00167 #endif