command.h
来自「通过可执行文件中的菜单“绘图”」· C头文件 代码 · 共 42 行
H
42 行
#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 + =
减小字号Ctrl + -
显示快捷键?