- Main Page
- Classes
- Files

- File List

# window.h

    00001 #ifndef _WINDOW_BASE_H_
    00002 #define _WINDOW_BASE_H_
    00003
    00004 #include <nds.h>
    00005 #include "gadget.h"
    00006 #include "fontbase.h"
    00007 #include "graphicsport.h"
    00008 #include "gadgetstyle.h"
    00009
    00010 #define WINDOW_TITLE_HEIGHT 13
    00011 #define WINDOW_BORDER_SIZE 4
    00012 #define WINDOW_CLOSE_BUTTON_WIDTH 14
    00013 #define WINDOW_DEPTH_BUTTON_WIDTH 14
    00014
    00015 namespace WoopsiUI {
    00016
    00021         class Window : public Gadget {
    00022
    00023         public:
    00037                 Window(s16 x, s16 y, u16 width, u16 height, const WoopsiString& title, u32 flags, GadgetStyle* style = NULL);
    00038
    00043                 void setTitle(const WoopsiString& title);
    00044
    00049                 const WoopsiString& getTitle() { return _title; };
    00050
    00051         protected:
    00052                 WoopsiString _title;
    00060                 virtual void drawBorder(GraphicsPort* port);
    00061
    00065                 virtual void onDragStart();
    00066
    00074                 virtual void onDrag(s16 x, s16 y, s16 vX, s16 vY);
    00075
    00079                 virtual void onDragStop();
    00080
    00084                 virtual inline ~Window() { };
    00085
    00089                 inline Window(const Window& window) : Gadget(window) { };
    00090         };
    00091 }
    00092
    00093 #endif