#pragma once
#include "MoveableButton.h"

class ImageView :
	public MoveableButton
{
public:
	ImageView(void);
	~ImageView(void);

	virtual void Draw(Graphics& graphics);
	void UpdateImage(); // the image has changed, update the cached version
	int LoadImage(TCHAR * filename);
	int SetImage(Bitmap* img);
	//void SetViewPosition(int x, int y);

	// Data
	Bitmap * image;

	int draggable; // set this if this object is contained in a DraggableImageView

private:
	CachedBitmap * fastimage; // optimized version for improved drawing performance
	int updatefastimage; // causes the cached Bitmap to be updated on the next paint call
	int ownimage; // did this object create the image?
};
