/********************************************************************/
/* Copyright (c) 2019 System fugen G.K. and Yuzi Mizuno          */
/* All rights reserved.                                             */
/********************************************************************/
/********************************************************************/
// ViewRotateTool.h: MGViewRotateTool クラスのインターフェイス

#if !defined(AFX_ROTATETOOL_H__863496F2_02A5_4002_B471_71524585564F__INCLUDED_)
#define AFX_ROTATETOOL_H__863496F2_02A5_4002_B471_71524585564F__INCLUDED_

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

#include "Common/CommandBase.h"

class CCameraAction;

// class MGViewRotateTool
// 
// 
class MGViewRotateTool : public MGCommandBase
{
	HCURSOR m_hCursor; ///< 回転用カーソルリソース
	bool m_bTracking; ///< マウスによる操作中か否か
	std::unique_ptr<CCameraAction> m_spAction; ///< カメラ操作

public:
	explicit MGViewRotateTool(fugenDoc* pDoc);

	virtual bool can_break_into() const{ return true; }

	virtual MGCommandBase* initial_clone(fugenDoc* pDoc)const;
	virtual bool initiate_tool();
	virtual bool terminate_tool(bool cancel = false);

	virtual bool OnLButtonDown(fugenView* window,UINT nFlags, CPoint point);
	virtual bool OnLButtonUp(fugenView* window,CPoint old_point,UINT nFlags, CPoint point);
	virtual bool OnMouseMove(fugenView* window,UINT nFlags, CPoint point);
	virtual bool OnSetCursor(fugenView* pView, CWnd* pWnd, UINT nHitTest, UINT message);
};

#endif // !defined(AFX_ROTATETOOL_H__863496F2_02A5_4002_B471_71524585564F__INCLUDED_)
