|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "IView.h"
|
|
|
|
|
|
//#include "SigmaView.h"
|
|
|
|
|
|
|
|
|
|
|
|
class CSigmaDoc;
|
|
|
|
|
|
class CSigmaView;
|
|
|
|
|
|
namespace NDrawView
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
enum class MouseButtons
|
|
|
|
|
|
{
|
|
|
|
|
|
Left = 0x100000,
|
|
|
|
|
|
None = 0,
|
|
|
|
|
|
Right = 0x200000,
|
|
|
|
|
|
Middle = 0x400000,
|
|
|
|
|
|
XButton1 = 0x800000,
|
|
|
|
|
|
XButton2 = 0x1000000,
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#define ITEM_VIEW 1001 //ͼ<><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
#define ITEM_PRINT 1002 //<2F><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
class CItemBase : public CObject
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CItemBase(CSigmaDoc * ppDoc);
|
|
|
|
|
|
virtual ~CItemBase(void);
|
|
|
|
|
|
|
|
|
|
|
|
void SetType(long type);
|
|
|
|
|
|
long GetType(void);
|
|
|
|
|
|
|
|
|
|
|
|
COLORREF m_BackColor = RGB(0, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
void SetDoc(CSigmaDoc * ppDoc);
|
|
|
|
|
|
CSigmaDoc * GetDrawDoc(void);
|
|
|
|
|
|
CSigmaView * GetDrawView(void);
|
|
|
|
|
|
CXyDC * GetDC(void) const;
|
|
|
|
|
|
CDC* GetScreenDC();
|
|
|
|
|
|
void SetScreenDC(CDC* pDC);
|
|
|
|
|
|
CDC* GetImgDC();
|
|
|
|
|
|
|
|
|
|
|
|
void DrawCrossPoint(CXyDC* pDC, double x, double y);
|
|
|
|
|
|
void DrawLineScreen(int x1, int y1, int x2, int y2);
|
|
|
|
|
|
void DrawLineReal(double x1, double y1, double x2, double y2);
|
|
|
|
|
|
|
|
|
|
|
|
CPoint2D CenterPoint(void);
|
|
|
|
|
|
dfPoint GetReal(CPoint point);
|
|
|
|
|
|
CRect GetNegativeRect(CRect* pRect);
|
|
|
|
|
|
|
|
|
|
|
|
BOOL IsCaptureState(void);
|
|
|
|
|
|
BOOL IsPopupRightMenu(void);
|
|
|
|
|
|
void EnablePopupRightMenu(BOOL bPopup);
|
|
|
|
|
|
void EnableRButtonCancel(BOOL bEnable);
|
|
|
|
|
|
|
|
|
|
|
|
void InvalidateRect(CRect8 rect);
|
|
|
|
|
|
void SetStatusBarLengthInfo(double x1, double y1, double x2, double y2, BYTE*& destBuffer, int& destLen);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void OnLButtonDblClk(UINT nFlags, CPoint point);
|
|
|
|
|
|
virtual void OnLButtonDown(CDC *pDC, UINT nFlags, CPoint point, int vk);
|
|
|
|
|
|
virtual void OnLButtonUp(CDC *pDC, UINT nFlags, CPoint point, int vk);
|
|
|
|
|
|
virtual int OnMouseMove(CDC *pDC, UINT nFlags, CPoint point);
|
|
|
|
|
|
virtual void OnMouseMoveStatus(CDC *pDC, UINT nFlags, CPoint point, BYTE*& destBuffer, int& destLen);
|
|
|
|
|
|
virtual void OnRButtonDblClk(UINT nFlags, CPoint point);
|
|
|
|
|
|
virtual void OnRButtonDown(UINT nFlags, CPoint point);
|
|
|
|
|
|
virtual BOOL OnRButtonUp(UINT nFlags, CPoint point);
|
|
|
|
|
|
virtual void OnMouseWheel(uint32_t button, int32_t clicks, int32_t x, int32_t y, int32_t delta);
|
|
|
|
|
|
virtual BOOL OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
|
|
|
|
|
|
virtual BOOL OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
|
|
|
|
|
|
virtual BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
|
|
|
|
|
|
virtual void OnDraw(CXyDC* pDC);
|
|
|
|
|
|
virtual void OnDraw(CXyDC* pXyDC, CDC* pDC);
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD>Ƹ<EFBFBD>ͼ<EFBFBD><CDBC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>߶<EFBFBD>ʱ <20>ѻ<EFBFBD><D1BB>Ƴ<EFBFBD><C6B3><EFBFBD>ֱ<EFBFBD>߶<EFBFBD> <20><><EFBFBD>Ǹ<EFBFBD><C7B8><EFBFBD>ͼ<EFBFBD>Ρ<EFBFBD>
|
|
|
|
|
|
//ע:<3A><>Ϊˢ<CEAA><CBA2>ȫͼʱ <20>Ὣ<EFBFBD><E1BDAB><EFBFBD><EFBFBD>ͼ<EFBFBD>β<EFBFBD><CEB2><EFBFBD> <20><><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>»<EFBFBD><C2BB>Ƴ<EFBFBD><C6B3><EFBFBD>
|
|
|
|
|
|
virtual void DrawAssistant(CDC * pDC, int mouseX, int mouseY);
|
|
|
|
|
|
virtual int GetSubMenu();
|
|
|
|
|
|
|
|
|
|
|
|
virtual void OnOK(void);
|
|
|
|
|
|
virtual void OnCancel(void);
|
|
|
|
|
|
|
|
|
|
|
|
void SetHDC(HDC hdc);
|
|
|
|
|
|
////<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
//virtual BOOL InitPropertyGrid(CXTPPropertyGrid& grid);
|
|
|
|
|
|
//virtual BOOL OnGridItemChangeValue(CXTPPropertyGridItem* pItem);
|
|
|
|
|
|
//virtual void OnInplaceButtonDown(CXTPPropertyGridItem* pItem);
|
|
|
|
|
|
|
|
|
|
|
|
static CString GetFloatFormatString(BOOL bIsE=FALSE);
|
|
|
|
|
|
CString info;
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
//IView * m_pView = nullptr;
|
|
|
|
|
|
CSigmaDoc * m_pDoc = nullptr;
|
|
|
|
|
|
long m_type = 0; //<2F><>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>״̬ʱ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
BOOL m_bPopupRightMenu = FALSE; //Ϊ<>˽<EFBFBD>ֹһЩ<D2BB><D0A9><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD><C2B5><EFBFBD><EFBFBD>Ҽ<EFBFBD><D2BC>˵<EFBFBD>
|
|
|
|
|
|
BOOL m_bEnableRButtonCancel = FALSE; //<2F><><EFBFBD><EFBFBD><EFBFBD>갴<EFBFBD><EAB0B4>ʱ<EFBFBD>Ƿ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ǰ<EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>״̬
|
|
|
|
|
|
CPoint2D m_point;
|
|
|
|
|
|
HDC m_hdc;
|
|
|
|
|
|
CDC* m_pScreenDC = nullptr;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}//namespace
|
|
|
|
|
|
|
|
|
|
|
|
using namespace NDrawView;
|