#ifndef __MONITOR_WINDOW_H__
#define __MONITOR_WINDOW_H__

#include <gtkmm.h>
#include "MainOverLay.h"

class MonitorWindow : public Gtk::Window {
public:
	MonitorWindow(const Glib::RefPtr< Gdk::Monitor >& monitor);
	virtual ~MonitorWindow();

    bool isPrimary();

    void setRectangle(const Gdk::Rectangle& monitorArea);

    const Glib::RefPtr< Gdk::Monitor >& getMonitor();

protected:
    bool on_enter_notify_event(GdkEventCrossing* crossing_event);
    bool on_leave_notify_event(GdkEventCrossing* crossing_event);
	bool on_key_press_event(GdkEventKey* event);

private:
    void initBackground();
    
    bool onWindowDeleteEvent(GdkEventAny* event);

private:
    Gdk::Rectangle m_monitorArea;
    Glib::RefPtr< Gdk::Monitor > m_monitor;
    Gtk::Overlay m_mainlyt;
    Gtk::Image m_background;

    MainOverLay* m_overlay;

    bool m_isPrimary;

    double m_scaleX;
    double m_scaleY;
};

#endif // __MONITOR_WINDOW_H__