#ifndef __ToolBasePolyCreate_h
#define __ToolBasePolyCreate_h

#include "ToolBaseCreate.h"	// Super class.
#include "PolyJoint.h"		// For FCPolyJointVector.

#ifdef SUPER_CLASS
#undef SUPER_CLASS
#endif
#define SUPER_CLASS FCToolBaseCreate


// 05.04.26 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
#define FD_POLY_LINK_GAP_MAX	mmetol(100.0)

class FCObjDynabase;
class FCObjPoly;

class FCToolBasePolyCreate : public SUPER_CLASS
{
protected:
typedef SUPER_CLASS BASE_CLASS;

public:
	FCToolBasePolyCreate ();

	//----- _xZkqqHx_iDfEiDhFiDeOiDiJiDfIiCmFjEeDiInD_xHqqkZx_ -----
	virtual FCObjDynabase*	CreateInsideObject ();
//----- 05.07.15 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	virtual void	OnViewCreate ();	// CFCDynamicDrawView::OnCreate_xZkqqHx_iCkJiCoH_xHqqkZx_Call.
//	virtual void	OnViewDestroy ();	// CFCDynamicDrawView::OnDestroy_xZkqqHx_iCkJiCoH_xHqqkZx_Call.
//----- 05.07.15 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
// 06.12.09 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	virtual void	OnDraw (CDC* pDC);
// 05.07.25 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	virtual void	OnDraw (CDC* pDC, const DBLRect* pmmrtRgn = NULL, long lRgnSize = 0);
	virtual void	Select (CDC* pDC);
	virtual void	Unselect (CDC* pDC);

// 05.07.15 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	virtual FCObjDynabase*	GetInsideObject () const;

//----- 05.04.26 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	virtual void	SetFrontLinkGap (mmetol mmGap);
//	virtual mmetol	GetFrontLinkGap () const;
//	virtual void	SetBackLinkGap (mmetol mmGap);
//	virtual mmetol	GetBackLinkGap () const;
//----- 05.04.26 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

protected:
	//----- FCToolBasePolyCreate_xZkqqHx_iCmMiDfEiDhFiDeOiDiJiDfIiCmFjFeLjHhGiCmJiJjOiClGiCmE_xHqqkZx_ -----
// 06.10.05 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	virtual FCObjDynabase* CreateNewObject ();
	virtual void	CreateNewObject (ObjDynabaseVector& vNewObj);
	virtual void	InitNewObject (FCObjDynabase* pObj) const;
	virtual void	DrawTempLine (CDC* pDC);

	//----- FCToolBaseFDA_xZkqqHx_iCmMiDfEiDhFiDeOiDiJiDfIiCmFjFeLjHhGiCmJiJjOiClGiCmE_xHqqkZx_ -----
// 06.12.09 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	virtual void	OnDrawState (CDC* pDC, int iState);
	virtual int		TransFDA (int iState, int iEvent);
	virtual void	StateFDA (int iState, CDC* pDC);

	//----- _xZkqqHx_jBeKiInKiPpDjBnEiPiIjHjN_xHqqkZx_ -----
	virtual void	StateStartJoint (CDC* pDC) = NULL;
	virtual void	StateSetJoint (CDC* pDC) = NULL;
// 05.04.25 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	virtual void	StateUnsetJoint (CDC* pDC) = NULL;
// 05.04.25 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	virtual void	StateEraseJoint (CDC* pDC) = NULL;
	virtual void	StateDrawJoint (CDC* pDC) = NULL;
	virtual void	StateCreateObject (CDC* pDC) = NULL;
	virtual void	StateTerminateJoint (CDC* pDC) = NULL;
	virtual void	StateAbortJointByButton (CDC* pDC) = NULL;

protected:
// _xZkqqHx_iClBiCmMiDeOiDiJiDfIiMmFjHeMiCmMjCoIiLgAiBeC_xHqqkZx_
enum
{
	STATE_BEGIN = BASE_CLASS::STATE_END,	// _xZkqqHx_iPpDjBnEiKeKiOgOiBeC_xHqqkZx_
	STATE_START_JOINT,		// _xZkqqHx_jIeBiMiLjDfPjAnNjCoIiKeKiOgOiBeC_xHqqkZx_
	STATE_SET_JOINT,		// _xZkqqHx_jIeBiMiLjDfPjAnNjCoIiBeC_xHqqkZx_
// 05.04.25 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	STATE_UNSET_JOINT,		// _xZkqqHx_jIeBiMiLjDfPiJpAiPjMiBeC_xHqqkZx_
// 05.04.25 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	STATE_ERASE_JOINT,		// _xZkqqHx_jIeBiMiLjDfPiDeKiBfLiDfMiDiLiPmBiLiOiBeC_xHqqkZx_
	STATE_DRAW_JOINT,		// _xZkqqHx_jIeBiMiLjDfPiDeKiBfLiDfMiDiLjFfMiOkGiBeC_xHqqkZx_
	STATE_CREATE_OBJECT,	// _xZkqqHx_jFjEjFgJiNoMjAkMiBeC_xHqqkZx_
	STATE_TERMINATE_JOINT,	// _xZkqqHx_jIeBiMiLjDfPjAnNjCoIiPeJjHlJiBeC_xHqqkZx_
	STATE_ABORT_JOINT_BY_BUTTON,	// _xZkqqHx_iDhNiDeFiDfIiDhLiDfOiDjDiCmJiCoGiCoIjIeBiMiLjDfPjAnNjCoIjCiGiOhOiBeC_xHqqkZx_
	STATE_END,				// _xZkqqHx_iPpDjBnEiPeJjHlJiBeC_xHqqkZx_
};

protected:
	FCPolyJointVector	m_pjvJoint;		// _xZkqqHx_iNoMjAkMjCiGiCmMjIeBiMiLjDfPiCpAiLeMjIfOiBeC_xHqqkZx_
}; // class FCToolBasePolyCreate.

#endif//__ToolBasePolyCreate_h
