#pragma once
#include <windows.h>
#include <string>
using std::string;

class myButton
{
public:
			myButton();
			~myButton();

	//Set all data to default
	void	SetProperties		(int iX, int iY, int iW, int iH,
								 int iBmpX, int iBmpY, int iBmpAltX, int iBmpAltY,
								 int bmpInactX = 0, int bmpInactY = 0, bool Active = true,
								 string Help = "", string Display = "");
	void	Reset				();

	//Set/Get the on-screen locations X-Y
	void	SetX				(int data);
	int		GetX				() const;
	void	SetY				(int data);
	int		GetY				() const;

	//Set/Get the on screen width/height
	void	SetWidth			(int data);
	int		GetWidth			() const;
	void	SetHeight			(int data);
	int		GetHeight			() const;

	//Set/Get the source bmp locations X-Y
	void	SetBmpX				(int data);
	int		GetBmpX				() const;
	void	SetBmpY				(int data);
	int		GetBmpY				() const;

	//Set/Get the source bmp Alternate Graphic X-Y
	void	SetBmpXAlt			(int data);
	int		GetBmpXAlt			() const;
    void	SetBmpYAlt			(int data);
	int		GetBmpYAlt			() const;

	//Single call to get the width and height of the Alternate - does math using width and height
	int		GetBmpAltW			();	
	int		GetBmpAltH			();

	//Set/Get the text to display on the button
	void	SetDisplayText		(string data);
	string	GetDisplayText		() const;
	int		GetDisplayLength	();

	//Length of the text
	//Set/Get the Pop-up help text
	void	SetPopUp			(string data);
	string	GetPopUp			() const;
	int		GetPopUpLength		();				//Length of the text

	//Get source bmp size
	int		GetBmpW				();
	int		GetBmpH				();

	void	SetIsActive			(bool Status);
	bool	GetIsActive			() const;
	void	SetBmpInActX		(int x);
	int		GetBmpInActX		() const;
	void	SetBmpInActY		(int y);
	int		GetBmpInActY		() const;
	void	SetHover			(int hoverCount = 1);
	int		GetHover			() const;

	//Test to see if the mouse coordinates hit within the dimensions of the button
	bool	DidItHit			(int MouseX, int MouseY);

	myButton*	GetThis()	{ return this; }
private:
	int		X;					//Where is it placed - X
	int		Y;					//Where is it placed - Y
	int		Width;				//How wide is it?
	int		Height;				//How high is it?
	int		BmpX;				//Where is the graphic - X
	int		BmpY;				//Where is the graphic - Y
								//Graphic Width should match button width
								//Graphic Height should match button height
	int		BmpXAlt;			//This is if it's a left click - graphic representation
	int		BmpYAlt;			//This is if it's a left click - graphic representation
	int		BmpXInactive;
	int		BmpYInactive;
	int		PopUpLength;		//Have this so that we only ask once during setting
	int		DisplayLength;		//Have this so that we only ask once during setting
	int		HoverCount;
	bool	isActive;
	string	PopUpHelp;		
	string	DisplayText;	
};