#pragma once
#include "CommonObject.h"

class CTag : public CCommonObject
{
public:
	CTag(CPoint TopLeftOrigin, CString strName, bool bInTag);
	~CTag();

	void OutScreen(Graphics &g);
	void OutXml(stringstream &ss);
	bool HitTest(CPoint point);
	CCommonObject* Clone(CPoint TopLeftOrigin, CString strNewName, int nRotation);
	CString GetObjectName(){return m_strUniqueName;}
	void SetConnection(bool bIn, int nPos, CCommonObject* pConnectTo);
	void DisconnectCObject(CCommonObject *pObject);
	void Disconnect();
	void SetRotation(int nRotation);
	Rect* GetBounds();
	
	void SetParentMove(bool bParentMove) {m_bParentMove = bParentMove;}
	void SwapTag();

private:
	void TransformCObject(Matrix* pMat);
	void CreateGPath(CString strTag, int nRot);

public:
	int m_nTagType;	// 1-InTag; 2-OutTag

private:
	Brush *m_pTextBrush;
	bool m_bParentMove;
};
