#pragma once
#include "gosGml API.h"
#include "Scrollbar.h"

class IndexItem
{
	public:
		IndexItem();
		~IndexItem();
		char* Name;
		char* Value;
	private:
		//IndexItem(); //call me not
		IndexItem(IndexItem&);//don't call this
		IndexItem& operator= (IndexItem const &); //don't call the assignment operator
};

class Index
{
	public:
		Index(char* Input, char* fontPath, char* imagePath, char* defaultPagePath, rect* DisplayTextArea, int tabwidth);
		~Index();
		char* Click(int x, int y);
		int Draw();
		void SetScrollOffset(int x);
		void HighLight(char* Text);	//highlight the first item starting with this string
	private:
		Index(); //call me not
		Index(Index&);//don't call this
		Index& operator= (Index const &); //don't call the assignment operator

		int NumItems;
		int CurrentItem;
		bool ItemHighlighted;
		IndexItem** List;
		rect* Dim;
		char* Text;
		GML* DS;
		Scrollbar* SB;

		char* MakeGML();
		void SMakeGML(char*& Data);	//sub make GML
		void Interpret(char* Data);
		int Search(char* Text);
};