//File Name: 'ConLib.h' (Short for: "Counsel Library")
#pragma once			//Avoid redefinition
#include <windows.h>	//Windows standard header file
#include <iostream>
#include <string>

using namespace std;
using std::string;

//ConLib color codes (Do not mess with these values!)
enum ConColor
{
	cBlack		= 0,
	cNvyBlue	= 1,
	cSubGreen	= 2,
	cSubLBlue	= 3,
	cSubRed		= 4,
	cPurple		= 5,
	cGold		= 6,
	cSubWhite	= 7,
	cGrey		= 8,
	cBlue		= 9,
	cGreen		= 10,
	cLBlue		= 11,
	cRed		= 12,
	cPink		= 13,
	cYellow		= 14,
	cWhite		= 15
};

//ConLib control class
class ConLib
{
public:
	//Constructor / Destructor
			ConLib();
			~ConLib();
	
	//Set attributes
	void	SetBckClr		(WORD Color);
	void	SetTxtClr		(WORD Color);
	void	SetDefault		(WORD Color);
	void	SetTitle		(char *Title);
	void	SetPosition		(COORD Position);
	
	//Output methods
	void	Clear			();
	void	cOut			(char *Data);
	void	cOut			(string Data);
	void	cOut			(int Clr, string Data);
	void	cOut			(int Clr, char *Data);
    
	//Input methods
	void	Read			(char *Buffer, DWORD BufferSize);
	int		GetKey			();

private:
	//Screen and keyboard handles
	HANDLE	m_Screen;
	HANDLE	m_Keyboard;
	
	//Color attributes
	WORD	m_TextColor;
	WORD	m_Default;		//used to store a default text color
	WORD	m_BackgroundColor;
};