Woopsi 1.3
Nintendo DS Gui Framework
libwoopsi/include/amigascreen.h
00001 #ifndef _AMIGA_SCREEN_H_
00002 #define _AMIGA_SCREEN_H_
00003 
00004 #include <nds.h>
00005 #include "gadgeteventhandler.h"
00006 #include "screen.h"
00007 #include "gadgetstyle.h"
00008 #include "woopsistring.h"
00009 
00010 namespace WoopsiUI {
00011 
00012     class DecorationGlyphButton;
00013     class ScreenFlipButton;
00014 
00024     class AmigaScreen : public Screen, public GadgetEventHandler {
00025 
00026     public:
00027 
00031         typedef struct {
00032             u8 showFlipButton : 1;                      
00033             u8 showDepthButton : 1;                     
00034         } AmigaScreenFlags;
00035 
00046         AmigaScreen(const WoopsiString& title, bool showFlipButton, bool showDepthButton, GadgetStyle* style = NULL);
00047 
00052         virtual void setBorderless(bool isBorderless);
00053 
00058         virtual void handleReleaseEvent(const GadgetEventArgs& e);
00059 
00064         virtual void showFlipButton();
00065 
00070         virtual void showDepthButton();
00071 
00076         virtual void hideFlipButton();
00077 
00082         virtual void hideDepthButton();
00083 
00088         virtual inline const bool hasFlipButton() const { return _screenFlags.showFlipButton; };
00089 
00094         virtual inline const bool hasDepthButton() const { return _screenFlags.showDepthButton; };
00095 
00096     protected:
00097         DecorationGlyphButton* _depthButton;            
00098         DecorationGlyphButton* _flipButton;             
00099         AmigaScreenFlags _screenFlags;                  
00107         virtual void drawBorder(GraphicsPort* port);
00108 
00114         virtual void onClick(s16 x, s16 y);
00115 
00119         virtual inline ~AmigaScreen() { };
00120 
00124         inline AmigaScreen(const AmigaScreen& amigaScreen) : Screen(amigaScreen) { };
00125     };
00126 }
00127 
00128 #endif
 All Classes Functions Variables Enumerations Enumerator