- Main Page
- Classes
- Files

- File List

# screen.h

    00001 #ifndef _SCREEN_H_
    00002 #define _SCREEN_H_
    00003
    00004 #include <nds.h>
    00005 #include "gadget.h"
    00006 #include "gadgetstyle.h"
    00007 #include "woopsistring.h"
    00008
    00009 #define SCREEN_TITLE_HEIGHT 13
    00010 #define SCREEN_FLIP_BUTTON_WIDTH 16
    00011 #define SCREEN_DEPTH_BUTTON_WIDTH 16
    00012
    00013 namespace WoopsiUI {
    00014
    00020         class Screen : public Gadget {
    00021
    00022         public:
    00032                 Screen(const WoopsiString& title, u32 flags, GadgetStyle* style = NULL);
    00033
    00038                 virtual inline const WoopsiString& getTitle() const { return _title; };
    00039
    00051                 virtual bool swapGadgetDepth(Gadget* gadget);
    00052
    00056                 virtual void flipToTopScreen();
    00057
    00061                 virtual void flipToBottomScreen();
    00062
    00066                 virtual bool flipScreens();
    00067
    00072                 void setTitle(const WoopsiString& title);
    00073
    00078                 virtual inline const u8 getPhysicalScreenNumber() const { return calculatePhysicalScreenNumber(getY()); };
    00079
    00080         protected:
    00081                 u8 _titleHeight;
    00082                 WoopsiString _title;
    00090                 virtual void drawBorder(GraphicsPort* port);
    00091
    00099                 virtual void onDrag(s16 x, s16 y, s16 vX, s16 vY);
    00100
    00104                 virtual void onFocus();
    00105
    00109                 virtual inline ~Screen() { };
    00110
    00114                 inline Screen(const Screen& screen) : Gadget(screen) { };
    00115         };
    00116 }
    00117
    00118 #endif