- Main Page
- Classes
- Files

- File List

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

    00001 #ifndef _SCROLLING_TEXTBOX_H_
    00002 #define _SCROLLING_TEXTBOX_H_
    00003
    00004 #include <nds.h>
    00005 #include "multilinetextbox.h"
    00006 #include "gadgeteventhandler.h"
    00007
    00008 namespace WoopsiUI {
    00009
    00010         class ScrollbarVertical;
    00011
    00017         class ScrollingTextBox : public Gadget, public GadgetEventHandler {
    00018         public:
    00019
    00035                 ScrollingTextBox(s16 x, s16 y, u16 width, u16 height, const char* text, u32 flags, s16 maxRows = 0, FontBase* font = NULL);
    00036
    00041                 virtual void setTextAlignmentHoriz(MultiLineTextBox::TextAlignmentHoriz alignment);
    00042
    00047                 virtual void setTextAlignmentVert(MultiLineTextBox::TextAlignmentVert alignment);
    00048
    00055                 virtual const u16 getPageCount() const;
    00056
    00062                 virtual const u16 getCurrentPage() const;
    00063
    00071                 virtual const Text* getText() const;
    00072
    00077                 virtual void setText(const char* text);
    00078
    00083                 virtual void setText(const char text);
    00084
    00090                 virtual void appendText(const char* text);
    00091
    00096                 virtual void appendText(const char text);
    00097
    00102                 virtual void setFont(FontBase* font);
    00103
    00110                 virtual bool resize(u16 width, u16 height);
    00111
    00116                 virtual void handleValueChangeEvent(const GadgetEventArgs& e);
    00117
    00122                 virtual void handleScrollEvent(const GadgetEventArgs& e);
    00123
    00129                 virtual void draw(Rect clipRect);
    00130
    00131         protected:
    00132                 MultiLineTextBox* _textbox;
    00133                 ScrollbarVertical* _scrollbar;
    00134                 u8 _scrollbarWidth;
    00139                 virtual inline ~ScrollingTextBox() { };
    00140
    00144                 inline ScrollingTextBox(const ScrollingTextBox& scrollingTextBox) : Gadget(scrollingTextBox) { };
    00145         };
    00146 }
    00147
    00148 #endif