- Main Page
- Classes
- Files

- File List

# C:/Documents and Settings/Administrator/Desktop/woopsi-src-0.39/Woopsi/woopsi/skinnedwindow.h

    00001 #ifndef _SKINNED_WINDOW_H_
    00002 #define _SKINNED_WINDOW_H_
    00003
    00004 #include <nds.h>
    00005 #include "window.h"
    00006 #include "skin.h"
    00007 #include "gadgeteventhandler.h"
    00008
    00009 namespace WoopsiUI {
    00010
    00011         class SkinnedWindowDepthButton;
    00012         class SkinnedWindowCloseButton;
    00013         class SkinnedWindowBorderBottom;
    00014         class SkinnedWindowBorderLeft;
    00015         class SkinnedWindowBorderRight;
    00016         class SkinnedWindowBorderTop;
    00017
    00018         class SkinnedWindow : public Window, public GadgetEventHandler  {
    00019
    00020         public:
    00021
    00025                 enum SkinnedWindowFlagType {
    00026                         SKINNED_WINDOW_SHOW_CLOSE = 0x0001,
    00027                         SKINNED_WINDOW_SHOW_DEPTH = 0x0002
    00028                 };
    00029
    00033                 typedef struct {
    00034                         u8 showCloseButton : 1;
    00035                         u8 showDepthButton : 1;
    00036                 } SkinnedWindowFlags;
    00037
    00038                 SkinnedWindow(s16 x, s16 y, u16 width, u16 height, const char* title, u32 flags, u32 windowFlags, WindowSkin* skin);
    00039
    00040                 virtual void setBorderless(bool isBorderless);
    00041
    00042                 virtual const u8 getBorderSize() const;
    00043                 virtual const u8 getTitleHeight() const;
    00044
    00045                 virtual void getClientRect(Rect& rect) const;
    00046
    00047                 virtual bool click(s16 x, s16 y);
    00048                 virtual bool focus();
    00049                 virtual bool blur();
    00050
    00051                 virtual bool resize(u16 width, u16 height);
    00052                 virtual void handleReleaseEvent(const GadgetEventArgs& e);
    00053                 virtual void handleClickEvent(const GadgetEventArgs& e);
    00054                 virtual void handleDragEvent(const GadgetEventArgs& e);
    00055                 virtual void handleReleaseOutsideEvent(const GadgetEventArgs& e);
    00056
    00062                 virtual void showCloseButton();
    00063
    00069                 virtual void showDepthButton();
    00070
    00076                 virtual void hideCloseButton();
    00077
    00083                 virtual void hideDepthButton();
    00084
    00089                 virtual inline const bool hasCloseButton() const { return _windowFlags.showCloseButton; };
    00090
    00095                 virtual inline const bool hasDepthButton() const { return _windowFlags.showDepthButton; };
    00096
    00097         protected:
    00098                 const WindowSkin* _skin;
    00099                 SkinnedWindowFlags _windowFlags;
    00101                 SkinnedWindowBorderTop* _windowBorderTop;
    00102                 SkinnedWindowBorderLeft* _windowBorderLeft;
    00103                 SkinnedWindowBorderRight* _windowBorderRight;
    00104                 SkinnedWindowBorderBottom* _windowBorderBottom;
    00105                 SkinnedWindowCloseButton* _closeButton;
    00106                 SkinnedWindowDepthButton* _depthButton;
    00107
    00108                 virtual void createBorder();
    00109
    00113                 virtual inline ~SkinnedWindow() { };
    00114
    00118                 inline SkinnedWindow(const SkinnedWindow& skinnedWindow) : Window(skinnedWindow) { };
    00119         };
    00120 }
    00121
    00122 #endif

All Classes Functions Variables Enumerations Enumerator