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

#if !defined(AFX_PANTOOL_H__B72F906F_8DBC_4DAB_A907_1A0A53D06FCA__INCLUDED_)
#define AFX_PANTOOL_H__B72F906F_8DBC_4DAB_A907_1A0A53D06FCA__INCLUDED_

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

#include "Common/CommandBase.h"


/// class MGViewPanTool
///
/// Pans the view.
class MGViewPanTool : public MGCommandBase
{
	HCURSOR m_hCursor; ///< パン用カーソルリソース
	bool m_bTracking; ///< マウスによる操作中か否か
	std::unique_ptr<CCameraAction> m_spAction; ///< カメラ操作

public:
	explicit MGViewPanTool(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_PANTOOL_H__B72F906F_8DBC_4DAB_A907_1A0A53D06FCA__INCLUDED_)
