00001 #ifndef _SCROLLING_PANEL_H_ 00002 #define _SCROLLING_PANEL_H_ 00003 00004 #include <cstdlib> 00005 #include <nds.h> 00006 #include "gadget.h" 00007 #include "scrollablebase.h" 00008 00009 namespace WoopsiUI { 00010 00016 class ScrollingPanel : public Gadget, public ScrollableBase { 00017 public: 00018 00028 ScrollingPanel(s16 x, s16 y, u16 width, u16 height, u32 flags, FontBase* font = NULL); 00029 00034 virtual void draw(Rect clipRect); 00035 00044 virtual bool drag(s16 x, s16 y, s16 vX, s16 vY); 00045 00051 virtual void scroll(s32 dx, s32 dy); 00052 00058 virtual void jump(s32 x, s32 y); 00059 00060 protected: 00061 00068 void scrollChildren(s32 dx, s32 dy); 00069 00074 void drawChildren(Rect clipRect); 00075 00081 bool clipToClientRect(Rect& clipRect); 00082 00086 void raiseScrollEvent(); 00087 00091 virtual ~ScrollingPanel() { }; 00092 00096 inline ScrollingPanel(const ScrollingPanel& scrollingPanel) : Gadget(scrollingPanel) { }; 00097 }; 00098 } 00099 00100 #endif