- Main Page
- Classes
- Files

- File List

# 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                 enum AmigaScreenFlagType {
    00032                         AMIGA_SCREEN_SHOW_FLIP = 0x0001,
    00033                         AMIGA_SCREEN_SHOW_DEPTH = 0x0002
    00034                 };
    00035
    00039                 typedef struct {
    00040                         u8 showFlipButton : 1;
    00041                         u8 showDepthButton : 1;
    00042                 } AmigaScreenFlags;
    00043
    00054                 AmigaScreen(const WoopsiString& title, u32 flags, u32 screenFlags, GadgetStyle* style = NULL);
    00055
    00060                 virtual void setBorderless(bool isBorderless);
    00061
    00066                 virtual void handleReleaseEvent(const GadgetEventArgs& e);
    00067
    00072                 virtual void showFlipButton();
    00073
    00078                 virtual void showDepthButton();
    00079
    00084                 virtual void hideFlipButton();
    00085
    00090                 virtual void hideDepthButton();
    00091
    00096                 virtual inline const bool hasFlipButton() const { return _screenFlags.showFlipButton; };
    00097
    00102                 virtual inline const bool hasDepthButton() const { return _screenFlags.showDepthButton; };
    00103
    00104         protected:
    00105                 DecorationGlyphButton* _depthButton;
    00106                 DecorationGlyphButton* _flipButton;
    00107                 AmigaScreenFlags _screenFlags;
    00115                 virtual void drawBorder(GraphicsPort* port);
    00116
    00122                 virtual void onClick(s16 x, s16 y);
    00123
    00127                 virtual inline ~AmigaScreen() { };
    00128
    00132                 inline AmigaScreen(const AmigaScreen& amigaScreen) : Screen(amigaScreen) { };
    00133         };
    00134 }
    00135
    00136 #endif