Woopsi 1.3
Nintendo DS Gui Framework
libwoopsi/include/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:
00031         Screen(const WoopsiString& title, GadgetStyle* style = NULL);
00032 
00037         virtual inline const WoopsiString& getTitle() const { return _title; };
00038 
00042         virtual void flipToTopScreen();
00043 
00047         virtual void flipToBottomScreen();
00048 
00052         virtual bool flipScreens();
00053 
00058         void setTitle(const WoopsiString& title);
00059 
00064         virtual inline const u8 getPhysicalScreenNumber() const { return calculatePhysicalScreenNumber(getY()); };
00065 
00066     protected:
00067         u8 _titleHeight;                        
00068         WoopsiString _title;                    
00076         virtual void drawBorder(GraphicsPort* port);
00077 
00085         virtual void onDrag(s16 x, s16 y, s16 vX, s16 vY);
00086         
00090         virtual void onFocus();
00091 
00095         virtual inline ~Screen() { };
00096 
00100         inline Screen(const Screen& screen) : Gadget(screen) { };
00101     };
00102 }
00103 
00104 #endif
 All Classes Functions Variables Enumerations Enumerator