


#if !defined(AFX_SPLINEBEZIERCURVETOOL_H__1DDFF931_BB1A_4112_B57C_4BB069442872__INCLUDED_)
#define AFX_SPLINEBEZIERCURVETOOL_H__1DDFF931_BB1A_4112_B57C_4BB069442872__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Common/LocateState.h"

/// @class MGSplineCPointTool SplineCPointTool.h "CurveCmd/SplineCPointTool.h"
///
/// Creates a curve by control points.
class MGSplineBezierCurveTool : public MGLocateState{
public:
	explicit MGSplineBezierCurveTool(fugenDoc* pDoc);
	virtual MGCommandBase* initial_clone(fugenDoc* pDoc)const;
	virtual bool initiate_tool();
	virtual bool terminate_tool(bool cancel = false);
	virtual bool OnKeyDown(fugenView* pView, UINT nChar, UINT nRepCnt, UINT nFlags);
	virtual bool OnLocated(const MGLocateInfo& info);
	virtual void do_make_temporary_display(mgSysGL& sgl,fugenView* pSView);

private:
	bool calculate();
	void prompt_message() const;
	
	std::unique_ptr<MGLBRep> m_curve; ///< ˆêŽž•`‰æ—p
	UINT m_nIDS; ///< error message
};

#endif // !defined(AFX_SPLINEBEZIERCURVETOOL_H__1DDFF931_BB1A_4112_B57C_4BB069442872__INCLUDED_)
