#ifndef __WindowManager__
#define __WindowManager__

#ifndef GUI_DLL 
    #ifdef GUI_BUILD
	    #define GUI_DLL __declspec(dllexport)
    #else
	    #define GUI_DLL __declspec(dllimport)
        #pragma comment(lib, "WindowManager.lib")
    #endif
#endif

#include <list>

#include "../Core/SceneGraph/Sprite.h"
#include "../Core/SceneGraph/Text.h"
#include "Event.h"
#include "Window.h"

class GUI_DLL WindowManager {
public:
    WindowManager();
    virtual ~WindowManager();

    Node* getWindowGraph();

    void dispatchEvent(Event& event);

    void addWindow(Window* window);
    void removeWindow(Window* window);

protected:
    Group* _windowGraph;
    Point  _cursor;

    Window* _focus;
    Window* _topLevelFocus;
    Window* _rollover;
    Window* _dragging;
    Window* _pressed;

    Point   _dragPivotCursor, 
            _dragPivotWindow;
};

#endif