You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.0 KiB
C++

#pragma once
#include "module.h"
#include "GlobalDefine.h"
#include "EnumDirection.h"
//obj 便捷操作管理
class CEasyOperationMgr :public CModule
{
public:
CEasyOperationMgr(void);
~CEasyOperationMgr(void);
virtual void Draw(CDC* pDC);
virtual MODULE GetModuleType(){return _EASY_OPERATION_PROP;};
void SetShow(bool b){m_bShow = b;};
void Refresh();
MOUSE_TOOL JudgeMouseToolType(Dbxy pt);
DIRECTION GetOprDir(){return m_OprDir;};//获取操作方向
Dbxy GetBasePt();
double GetSize(X_OR_Y xy);
Dbxy GetDiff(Dbxy StartPt,Dbxy EndPt);
private:
void SetRect(DbRect rect);
DbRect GetDrawRect();
MOUSE_TOOL JudgeMouseToolTypeExt(Dbxy MousePt,Dbxy pt,MOUSE_TOOL &type);
private:
bool m_bShow;//是否显示
DbRect m_OperatRect;//操作范围的矩形
double m_Gap;//和选择obj 的间隔
DIRECTION m_OprDir;//操作的方向
};
extern CEasyOperationMgr *gEasyOperationMgr;