#ifndef __ObjLine_h
#define __ObjLine_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"	// Super class.

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

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

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


class FCUndoArchive;
class FCHiCommandTable;
class CFCProObjLine;
class FCToolLine;
class FCObjTable;
template<class T> class FCPolyBezier;
typedef FCPolyBezier<DBLPoint> FCMmPolyBezier;

//----- 05.05.02 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
////;----- start export> -----;
///////////////////////////////////////////////////////////////////////////
//// CommandGate_xZkqqHx_iCmMiDfCiDhNiDjDiDgIiCmJiOgHjHhAiClHiCoJiNfMjBkCjBmMiBeC_xHqqkZx_
//
//struct FCLineRec
//{
//	WORD	wMask;
//	mmetol	mmFromEndX;
//	mmetol	mmFromEndY;
//	mmetol	mmToEndX;
//	mmetol	mmToEndY;
//}; // struct FCLineRec.
//
//#define FDFP_FROMENDX	WORD(1L << 0)
//#define FDFP_FROMENDY	WORD(1L << 1)
//#define FDFP_TOENDX		WORD(1L << 2)
//#define FDFP_TOENDY		WORD(1L << 3)
//
////;------ end export> -----;
//----- 05.05.02 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	FCObjLine
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jApMjFjEjFgJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.30 Fukushiro M. _xZkqqHx_iDfCiDiBiDjDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************/
class FCObjLine : public SUPER_CLASS
{
protected:
typedef SUPER_CLASS BASE_CLASS;

public:
	/*----- _xZkqqHx_jBfDiCmEiCmM_xHqqkZx_Subclass_xZkqqHx_iCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----*/
	FCObjLine ();
	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 BOOL	IsClosePolygon () const;
	virtual void	NewObjPolygonForDraw (	DBLPointVector& vmmptPoly,
											mmetol mmElemLen,
											const DBLRect mmrtaClip[],
											int iClipSize) const;
	virtual void	NewObjBezierForDraw (FCMmPolyBezier& polyBezier) const;
	virtual void	GetEdgePoint (DBLPoint& mmptF, DBLPoint& mmptB) const;

	/*----- _xZkqqHx_jFkBjAjEiCmMiDiCiDiKiDhGiCpAiOjNiCmC_xHqqkZx_Subclass_xZkqqHx_iCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----*/
	virtual DBLPoint	GetMolipPos (long lMolipId, long lTerminalIdx = 0) const;
	virtual long	GetMolipCount () const;
//----- 05.05.06 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	virtual long	GetFrontEdgeMolipId () const;
	virtual long	GetBackEdgeMolipId () const;
//----- 05.05.06 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	virtual long	GetMolipTerminalCount (long lMolipId) const;

	/*----- _xZkqqHx_jFeLjHhGiCmJiJjOiClGiCmEiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClHiCoKiCmOjHmHiCkC_xHqqkZx_ -----*/
	virtual BOOL	CanRotate () const;
//----- 01.11.14 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	virtual DBLPoint	GetAngleLinkStandardPosition (const DBLPoint& mmptA,
													  long lMolipIdG,
													  const FCLinkRec* pRecExcept) const;
	virtual short		GetAngleLinkStandardSign (const DBLPoint& mmptA,
													  long lMolipIdG,
													  const FCLinkRec* pRecExcept) const;
//----- 01.11.14 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

	//----- Export_xZkqqHx_jHhAiCmMiKnGjAjE_xHqqkZx_ -----
	virtual BOOL	CanBeTextObject () const;

	/*----- _xZkqqHx_iClBiCmMiDeOiDiJiDfIiMmFjHeMiCmMiKnGjAjE_xHqqkZx_ -----*/
	virtual	void	GetPoints (DBLPoint& mmptFrom, DBLPoint& mmptTo) const;
	virtual	mmetol	GetFromEndX () const;
	virtual	mmetol	GetFromEndY () const;
	virtual	mmetol	GetToEndX () const;
	virtual	mmetol	GetToEndY () const;

friend class FCHiCommandTable;
friend class CFCProObjLine;
friend class FCToolLine;
friend class FCObjTable;

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	MoveMolip (long lMolipID, const DBLPoint& mmptOffset);
	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_iClBiCmMiDeOiDiJiDfIiMmFjHeMiCmMiKnGjAjE_xHqqkZx_ -----*/
	virtual BOOL	SetFromEndX (mmetol mmEndX);
	virtual BOOL	SetFromEndY (mmetol mmEndY);
	virtual BOOL	SetToEndX (mmetol mmEndX);
	virtual BOOL	SetToEndY (mmetol mmEndY);

protected:
	DBLPoint	m_mmptFrom;
	DBLPoint	m_mmptTo;
}; // class FCObjLine.

#endif//__ObjLine_h
