#pragma once
#include "SkinnableWindow.h"

// The window associated with this map widget is used only for receiving events,
// it is not visible.
class MapWidget : 
	public SkinnableWindow 
{
public:
	MapWidget();
	~MapWidget();

	virtual int Create(HWND parent = 0);
	virtual void Load(const char * base);
	virtual void Draw(Graphics & graphics);
	void DrawToMap(Graphics & graphics);
	virtual void Set(Appearance &x);
	virtual void SetLocation(int x, int y);
	virtual void SetSize(int width, int height);
	virtual bool Selected();

	// pass these on to the parent
	virtual void OnMouseMove();
	virtual void OnLButtonDown();
	virtual void OnLButtonUp();

	// override this to set the visual state and update the map
	void SetState(AppearanceState s);

	Appearance visual; // this specifies the graphic that is drawn on the map

	Point origin; // everything is drawn wrt this origin
};