#pragma once
#include "imageview.h"

class DraggableImageView :
	public SkinnableWindow
{
public:
	DraggableImageView(void);
	~DraggableImageView(void);
	int Create(HWND parent = 0);
	void SetMoveableRect();
	virtual void OnSize(int cx, int cy);
	virtual int OnSetCursor();
	void UpdateImage(){ canvas.UpdateImage();}; // the image has changed, update the cached version

	int LoadImage(TCHAR * filename);
	int SetImage(Bitmap* img);
	void SetViewPosition(int x, int y);
	void GlideTo(int x, int y);
	virtual void OnTimer();

	// Data

	Point glidefrom,glideto;
	float t,dt;
	float glideHz;

	ImageView canvas;
	SkinnableWindow container;
};
