#pragma once

//===========================================================================//
// File:	 Link.h															 //
// Project:  gosGml				                                         //
// Contents:																 //
//---------------------------------------------------------------------------//
// Date      Who    Modification                                             //
// 4/10/00   DP     Created													 //
//---------------------------------------------------------------------------//
// Copyright (C) 2000 Microsoft Corp.						                 //
// All Rights reserved worldwide                                             //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL               //
//===========================================================================//


struct LinkBox
{
    long Bottom;
    long Left;
    long Right;
    long Top;
    char* Dest;
};

#ifndef XYPair_
#define XYPair_
struct XYPair{
	int x;
	int y;
};
#endif

class Link
{
	public:
		Link(int width, int NumLinks=8192);
		~Link();
		void AddLink(LinkBox link, int height);	//the height parameter should be the height of the font used. if height is not an even divisor of link.Bottom-link.Top, expect things to break
		char* TestForHit(XYPair click);
		void Clear();

	private:
		Link(); //call me not
		LinkBox** HitLocs;
		int Width;
		int LinkPos;
		int MaxLinks;
		void SubAddLink(LinkBox link);
		Link(Link&);//don't call this
		Link& operator= (Link const &); //don't call the assignment operator
};
