#ifndef __ObjRect_h
#define __ObjRect_h

/**********************************************************
 *                 _xZkqqHx_iBhJiDgOiDjDiDeLiDiKiBfLiLeMjGeAiBhK_xHqqkZx_
 *      a               _xZkqqHx_jEhKjHpB_xHqqkZx_(Array)
 *      b               _xZkqqHx_jIfPjHjNiMfO_xHqqkZx_(Bool)
 *      by              unsigned char(BYte)
 *      c               char(Char)
 *      cb              _xZkqqHx_jFlGiOjKjAjE_xHqqkZx_(Count of Byte)
 *      cr              _xZkqqHx_jAeG_xHqqkZx_(Color Reference value)
 *      cx,cy   short_xZkqqHx_iMfO_xHqqkZx_[_xZkqqHx_iNmAjFfH_xHqqkZx_(x,y)_xZkqqHx_iCmMiDeKiDeFiDjDiDfO_xHqqkZx_](Count of X,Y)
 *      dw              unsigned long_xZkqqHx_iMfO_xHqqkZx_(Double Word)
 *      fn              _xZkqqHx_iKnGjAjE_xHqqkZx_(FuNction)
 *      h               _xZkqqHx_iDgOiDjDiDgIiDiL_xHqqkZx_(Handle)
 *      i               int(Integer)
 *      l               long(Long)
 *      m               _xZkqqHx_iDeOiDiJiDfIiDiBiDjDiDgP_xHqqkZx_(data Member of a class)
 *      n               short_xZkqqHx_iIlNiCkCiCmN_xHqqkZx_int
 *      p               _xZkqqHx_iDhMiDeDiDjDiDfOiMfO_xHqqkZx_(Pointer)
 *      s               _xZkqqHx_jFlGiOjKjHpB_xHqqkZx_(String)
 *      sz              0_xZkqqHx_iCmFiPeJiCoNiCoJjFlGiOjKjHpB_xHqqkZx_(String terminated with Zero)
 *      tm              _xZkqqHx_iDgFiDeMiDfIiDgHjAkBjGeA_xHqqkZx_(Text Metric)
 *      w               unsigned short(Word)
 *      x,y             short_xZkqqHx_iMfOiNmAjFfHjCgM_xHqqkZx_
 ********************************************************/

#include "ObjFigure.h"	// SuperClass.

//;----- <EXPORT TO SDK> -----;

#ifdef SUPER_CLASS
#undef SUPER_CLASS
#endif
#define SUPER_CLASS FCObjFigure

//;------ </EXPORT TO SDK> -----;


class CFCProObjRect;
class FCToolRichText;
class FCUndoArchive;
class FCHiCommandTable;
class CFCFoundDoc;

template<class T> class FCPolyBezier;
typedef FCPolyBezier<DBLPoint> FCMmPolyBezier;

//----- 05.05.02 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
////;----- start export> -----;
//
///////////////////////////////////////////////////////////////////////////
//// CommandGate_xZkqqHx_iCmMiDfCiDhNiDjDiDgIiCmJiOgHjHhAiClHiCoJiNfMjBkCjBmMiBeC_xHqqkZx_
//
//struct FCRectRec
//{
//	WORD	wMask;
//	mmetol	mmHAxisX;
//	mmetol	mmVAxisX;
//	mmetol	mmVAxisY;
//	mmetol	mmCenterX;
//	mmetol	mmCenterY;
//	double	dAngle;
//}; // struct FCRectRec.
//
//#define FDFP_HAXISX				WORD(1L << 0)
//#define FDFP_VAXISX				WORD(1L << 1)
//#define FDFP_VAXISY				WORD(1L << 2)
//#define FDFP_CENTERX			WORD(1L << 3)
//#define FDFP_CENTERY			WORD(1L << 4)
//#define FDFP_ANGLE				WORD(1L << 5)
//
////;------ end export> -----;
//----- 05.05.02 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	FCObjRect
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iLoJiMgAiCmMjFjEjFgJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.29 Fukushiro M. _xZkqqHx_iDfCiDiBiDjDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************/
class FCObjRect : public SUPER_CLASS
{
protected:
typedef SUPER_CLASS BASE_CLASS;

public:
	//----- _xZkqqHx_jBfDiCmEiCmM_xHqqkZx_Subclass_xZkqqHx_iCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	FCObjRect ();
	virtual BOOL	IsKindOf (FTObjectType nType) const;

	//----- _xZkqqHx_iOmAjBmMiJlLiJmCjEfMiCmIiDeOiDiJiDfIiCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	virtual FTObjectType	Type () const;

	//----- Subclass_xZkqqHx_iCmMiCkCiClIiCoKiCkJiCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	virtual DBLRect	GetResizeFrame () const;

	//----- _xZkqqHx_jBkOjAkLiCpAiOjNiCmCjBfDiCmEiCmM_xHqqkZx_Subclass_xZkqqHx_iCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	virtual BOOL	IsEqual (const FCObjDynabase* objp) const;
// 06.06.23 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	virtual void	OutStream (FCUndoArchive& ar);
	virtual void	OutStream (FCUndoArchive& ar, BOOL bIsOutBezier);
	virtual void	InStream (FCUndoArchive& ar);
	virtual void	CreatePropertyPage (CPropertyPageVector& vPropPage,
										const ObjDynabaseVector& vSelect);

	//----- _xZkqqHx_iKePiMgAiCpAiOjNiCmCjBfDiCmEiCmM_xHqqkZx_Subclass_xZkqqHx_iCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	virtual void	NewObjPolygonForDraw (	DBLPointVector& vmmptPoly,
											mmetol mmElemLen,
											const DBLRect mmrtaClip[],
											int iClipSize) const;
	virtual void	NewObjBezierForDraw (FCMmPolyBezier& polyBezier) const;

	//----- _xZkqqHx_jFkBjAjEiCmMiDiCiDiKiDhGiCpAiOjNiCmC_xHqqkZx_Subclass_xZkqqHx_iCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	virtual DBLPoint	GetMolipPos (long lMolipId, long lTerminalIdx = 0) const;
	virtual long	GetMolipCount () const;
	virtual BOOL	IsLinkable (long lMolipID, BOOL bLinkOut) const;

	//----- _xZkqqHx_jFeLjHhGiCmJiJjOiClGiCmEiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClHiCoKiCmOjHmHiCkC_xHqqkZx_ -----
	virtual BOOL	CanRotate () const;
// 05.06.23 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	virtual void	CalcResizeFrameSelf ();
	virtual void	CalcResizeFrame ();
	virtual angle	GetAngle () const;

	//----- FCObjRect_xZkqqHx_iDeOiDiJiDfIiMmFjHeMiCmMiKnGjAjE_xHqqkZx_ -----
	virtual mmetol	GetHAxisX () const;		// _xZkqqHx_jAhNiMgAiCmMjAiFjFlNiOlCiCmMjBoFiCkLiClDiBeC_xHqqkZx_
	virtual mmetol	GetVAxisX () const;		// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_X_xZkqqHx_jAkMjFkKiBeC_xHqqkZx_
	virtual mmetol	GetVAxisY () const;		// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_Y_xZkqqHx_jAkMjFkKiBeC_xHqqkZx_
	virtual mmetol	GetCenterX () const;	// GetCenter_xZkqqHx_iCmM_xHqqkZx_x_xZkqqHx_iNmAjFfHiCmMiCnNiOoGjDlOiBeC_xHqqkZx_PrpObjRect_xZkqqHx_iCmMiInHiBeC_xHqqkZx_
	virtual mmetol	GetCenterY () const;	// GetCenter_xZkqqHx_iCmM_xHqqkZx_y_xZkqqHx_iNmAjFfHiCmMiCnNiOoGjDlOiBeC_xHqqkZx_PrpObjRect_xZkqqHx_iCmMiInHiBeC_xHqqkZx_

	static FCObjRect* CreateEMFObjRect (const DBLRect& mmrt, EmfImageID emid);

friend class FCHiCommandTable;
friend class CFCFoundDoc;		// For CFCFoundDoc::OnPasteOverAs.

protected:
	//----- _xZkqqHx_jBkOjAkLiCpAiOjNiCmCjBfDiCmEiCmM_xHqqkZx_Subclass_xZkqqHx_iCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	virtual void	Copy (FCObjDynabase* pObj) const;
	virtual void	CopySelf (FCObjDynabase* pObj) const;

	//----- _xZkqqHx_jFeLjHhGiCmJiJjOiClGiCmEiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClHiCoKiCmOjHmHiCkC_xHqqkZx_ -----
	virtual void	Move (mmetol mmDX, mmetol mmDY);
	virtual void	Resize (BOOL bXPosi, BOOL bYPosi, const DBLRect& mmrtNew, const DBLRect& mmrtOld);
// 05.03.02 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	virtual void	Rotate (double dR, mmetol mmCX, mmetol mmCY);
	virtual void	Rotate (double dR, const DBLPoint& mmptCenter);

	//----- _xZkqqHx_iClBiCmM_xHqqkZx_FCObjRect_xZkqqHx_iDeOiDiJiDfIiCmM_xHqqkZx_Subclass_xZkqqHx_iCkKjFeLjHhGiCmJiJjOiClGiCmEiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClHiCoKiCmOiCoGiCkC_xHqqkZx_ -----
	virtual void	ResizeNoChangeFrame (const DBLPoint& mmptOrig,
										const DBLPoint& dptMagnif,
										const DBLPoint& mmptOrigNew);

	//----- _xZkqqHx_iClBiCmMiDeOiDiJiDfIiMmFjHeMiCmMiKnGjAjE_xHqqkZx_ -----
	virtual BOOL	SetHAxisX (mmetol mmHAxisX);	// _xZkqqHx_jAhNiMgAiCmM_xHqqkZx_0_xZkqqHx_jDhIjFpLiMpMiCmM_xHqqkZx_X_xZkqqHx_iOlCjFpLiMpMiCmMjBoFiCkLiClDiBeC_xHqqkZx_
	virtual BOOL	SetVAxisX (mmetol mmVAxisX);	// _xZkqqHx_jAhNiMgAiCmM_xHqqkZx_90_xZkqqHx_jDhIjFpLiMpMiCmM_xHqqkZx_X_xZkqqHx_iOlCjFpLiMpMiCmMjBoFiCkLiClDiBeC_xHqqkZx_
	virtual BOOL	SetVAxisY (mmetol mmVAxisY);	// _xZkqqHx_jAhNiMgAiCmM_xHqqkZx_90_xZkqqHx_jDhIjFpLiMpMiCmM_xHqqkZx_Y_xZkqqHx_iOlCjFpLiMpMiCmMjBoFiCkLiClDiBeC_xHqqkZx_
	virtual BOOL	SetAngle (angle dAngle);	// _xZkqqHx_jAhNiMgAiCmMiJpBjDfNiKhAjDhIiBeC_xHqqkZx_
	virtual BOOL	SetCenterX (mmetol mmX);		// GetCenter_xZkqqHx_iCmM_xHqqkZx_x_xZkqqHx_iNmAjFfHiCmMiCnNiOoGjDlOiBeC_xHqqkZx_PrpObjRect_xZkqqHx_iCmMiInHiBeC_xHqqkZx_
	virtual BOOL	SetCenterY (mmetol mmY);		// GetCenter_xZkqqHx_iCmM_xHqqkZx_y_xZkqqHx_iNmAjFfHiCmMiCnNiOoGjDlOiBeC_xHqqkZx_PrpObjRect_xZkqqHx_iCmMiInHiBeC_xHqqkZx_

protected:
	DBLRect		m_mmrtResize;	// _xZkqqHx_iDiKiDfEiDeDiDfJiDhEiDiMiBfLiDiAiBeC_xHqqkZx_
	mmetol		m_mmHAxisX;		// _xZkqqHx_jAhNiMgAiCmMjAiFjFlNiOlCiCmMjBoFiCkLiClDiBeC_xHqqkZx_
	mmetol		m_mmVAxisX;		// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_X_xZkqqHx_jAkMjFkKiBeC_xHqqkZx_
	mmetol		m_mmVAxisY;		// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_Y_xZkqqHx_jAkMjFkKiBeC_xHqqkZx_
	DBLPoint	m_mmptCenter;	// _xZkqqHx_jAhNiMgAiCmMjCiGjAfDjDfPiCmMiNmAjFfHiBeC_xHqqkZx_
	angle		m_dAngle;		// _xZkqqHx_jAhNiMgAiCmMiJpBjDfNiKhAjDhIiBeC_xHqqkZx_
}; // class FCObjRect.

#endif//__ObjRect_h
