// LMCInfoPane.cp

#include "InfoPane.h"

#include <UDrawingState.h>
#include <UTextTraits.h>
#if GS_MAC_CFM
	#include <Fonts.h>
	#include <Memory.h>
#endif

#include <GSString.h>

#include <MiniCadCallbacks.h>


CMCInfoPane::CMCInfoPane(LStream *inStream) :
	LPane(inStream)
{
}


CMCInfoPane* CMCInfoPane::CreateMCInfoPaneStream(LStream *inStream)
{
	return new CMCInfoPane(inStream);
}


void CMCInfoPane::ListenToMessage(MessageT inMessage, void *ioParam)
{
	switch(inMessage) {
		case 'Trak': {
			
			Handle newObj = *(Handle*)ioParam;
			
			Refresh();
			
			break;
		}
	}
}


void CMCInfoPane::DrawSelf()
{
	// we've already been erased, so only draw if we have an object

	StClipRgnState saveClip;
	
	Rect myFrame;
	CalcLocalFrameRect(myFrame);
	
	PStr255 tdStr;
	

	TextTraitsRecord labelText;
	UTextTraits::LoadSystemTraits(labelText);
	
	labelText.size = 36;
	labelText.fontNumber = applFont;
	
	UTextTraits::SetPortTextTraits(&labelText);

	
	saveClip.ClipToIntersection(myFrame);
	
	tdStr << "Too Cool!";

	::MoveTo(myFrame.left + 10,myFrame.top + 45);
	::DrawString(tdStr);
	
	
}