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.

66 lines
1.6 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "ItemSelect.h"
#include "ActionItem.h"
#include "WellPoleLib/WellBaseObj.h"
namespace NItem
{
class CItemNestBase : public CItemSelect
{
public:
CItemNestBase(CSigmaDoc* ppDoc);
virtual ~CItemNestBase(void);
public:
enum ESelectMode
{
selnone,
netSelect,
move,
size,
border,
};
ESelectMode selectMode;
virtual void SetDrawObj(CWellBaseObj* pObj) = 0;
virtual CWellBaseObj* GetDrawObj() = 0;
void SetSelectMode(ESelectMode mode) { selectMode = mode; }
//virtual BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
virtual BOOL OnSetCursor(CPoint pt, int& handle);
virtual void SetItem(CItem* pItem);
virtual CItem* GetItem(void);
virtual void DeleteItem(void);
virtual int DeleteSelection(void) { return 0; }
virtual void Redo(void);
virtual void Undo(void);
virtual void DrawFocusRect(CRect rect, CDC *pInDC = NULL);//传入的rect是mm_text 时的坐标值在mapMode == MM_ANISOTROPIC时认为是Doc的数据
//撤销恢复操作时,整体备份
virtual void SetReUnDoAction(BOOL bNoSaveData = FALSE, UINT actionType = IDS_STRING_ACTION_MOVE,int actionItemType = 1);
BOOL EndEdit() { return TRUE; }
virtual CItem* GetSelectedItem() { return m_pItemSelected; }
CItem* m_pItemSelected;///< 子操作对象
protected:
virtual void DrawHandle(CXyDC *pDC);///< 画当前图元选中状态
virtual void DrawHandle(CXyDC *pDC, const CPoint2D &point);
void MoveHandle(int nHandle, CPoint point, CRect& rect);
protected:
BOOL m_bLDown; ///< 鼠标左键按下
BOOL m_bDrag; ///< 是否拖拽
CPoint m_downPoint; ///< 鼠标按下的点
CPoint m_firstPoint; ///< 鼠标开始移动的点
CPoint m_lastPoint; ///< 鼠标移动后的点
BOOL m_bInEdit; //是否内部编辑
};
};