00001 #ifndef _AMIGA_SCREEN_H_ 00002 #define _AMIGA_SCREEN_H_ 00003 00004 #include <nds.h> 00005 #include "gadgeteventhandler.h" 00006 #include "screen.h" 00007 00008 namespace WoopsiUI { 00009 00010 class DecorationGlyphButton; 00011 class ScreenFlipButton; 00012 class ScreenTitle; 00013 00023 class AmigaScreen : public Screen, public GadgetEventHandler { 00024 00025 public: 00026 00030 enum AmigaScreenFlagType { 00031 AMIGA_SCREEN_SHOW_FLIP = 0x0001, 00032 AMIGA_SCREEN_SHOW_DEPTH = 0x0002 00033 }; 00034 00038 typedef struct { 00039 u8 showFlipButton : 1; 00040 u8 showDepthButton : 1; 00041 } AmigaScreenFlags; 00042 00046 AmigaScreen(const char* title, u32 flags, u32 screenFlags, FontBase* font = NULL); 00047 00052 virtual void setBorderless(bool isBorderless); 00053 00058 virtual void handleClickEvent(const GadgetEventArgs& e); 00059 00064 virtual void handleDragEvent(const GadgetEventArgs& e); 00065 00070 virtual void handleReleaseEvent(const GadgetEventArgs& e); 00071 00076 virtual void handleReleaseOutsideEvent(const GadgetEventArgs& e); 00077 00083 virtual void showFlipButton(); 00084 00090 virtual void showDepthButton(); 00091 00097 virtual void hideFlipButton(); 00098 00104 virtual void hideDepthButton(); 00105 00110 virtual inline const bool hasFlipButton() const { return _screenFlags.showFlipButton; }; 00111 00116 virtual inline const bool hasDepthButton() const { return _screenFlags.showDepthButton; }; 00117 00118 protected: 00119 ScreenTitle* _screenTitle; 00120 DecorationGlyphButton* _depthButton; 00121 DecorationGlyphButton* _flipButton; 00122 AmigaScreenFlags _screenFlags; 00127 virtual inline ~AmigaScreen() { }; 00128 00132 inline AmigaScreen(const AmigaScreen& amigaScreen) : Screen(amigaScreen) { }; 00133 }; 00134 } 00135 00136 #endif