⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 command.h

📁 通过可执行文件中的菜单“绘图”
💻 H
字号:
#ifndef _Command_h_
#define _Command_h_

#include "base.h"

#ifdef __cplusplus

enum ECommandType	// 命令类
{
	ctUnknown = 0,
//  创建对象命令类
	ctCreateLine = 1,		// 创建对象
	ctCreateRectangle = 2,	// 创建矩形
	ctCreateCircle = 3,		// 创建圆
	ctCreateArc = 4,		// 创建圆弧
	// ...其他创建类型
//  修改命令类
	ctMove = 11,			// 移动
	ctRotate = 12,			// 旋转
	ctMirror = 13			// 镜像
	// ...其他创建类型
};

class CCommand
{
protected:
	int		m_nStep ; // 命令操作步
public:
	CCommand() {}
	~CCommand() {}
	// 返回命令类型 ECommandType
	virtual int GetType() = 0; 
	virtual int OnLButtonDown(UINT nFlags, const Position& pos) = 0 ;
	virtual int OnMouseMove(UINT nFlags, const Position& pos) = 0 ;
	virtual int OnRButtonDown(UINT nFlags, const Position& pos) = 0 ;
	virtual int Cancel() = 0 ;
} ;

#endif

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -