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

📄 cuserview.h

📁 这是一个程序的一般架构方法
💻 H
字号:
//-- {CycleCode: 185} file [0..467]
//-- {InsertRegion: 191} module.vulnerableDeclarations [0..249]
//## begin module.additionalDeclarations preserve=yes
// Copyright (C) 1991 - 1999 Rational Software Corporation

#if defined (_MSC_VER) && (_MSC_VER >= 1000)
#pragma once
#endif
#ifndef _INC_CUSERVIEW_432274790167_INCLUDED
#define _INC_CUSERVIEW_432274790167_INCLUDED

//##Modelid=432274790167
//## end module.additionalDeclarations
//-- {AddDecl: 186} class [250..411]

class CUserView
: public CWnd , public CMessageBase
{
//-- {StartSubRegion: 187} region.wizard [284..332]
	//{{AFX_VIRTUAL(CUserView)
	//}}AFX_VIRTUAL
//-- {AddDecl: 188} region.generated [333..346]

protected:
//-- {StartSubRegion: 189} region.wizard [347..385]
	//{{AFX_MSG(CUserView)
	afx_msg void OnPaint();
	//}}AFX_MSG
//-- {AddDecl: 190} region.inlineAnnotation [386..407]
	DECLARE_MESSAGE_MAP()
	USER_DECLARE_MESSAGE_MAP
//-- {InsertRegion: 192} module.vulnerableDeclarations [408..409]
protected:
	//View中要显示的元素
	CElementManager * m_pElementManager;
	//View中要接收的命令,可以为空;
	CCMDManager * m_pCMDManager;
	//View中要发送的命令,可以为空;
	CMessageManager * m_pMessageManager;

public:
	void init( CElementManager * pElementManager \
			, CCMDManager * pCMDManager = NULL\
			, CMessageManager * pMessageManager = NULL\
			);
	void CreateWnd( CWnd * pParent ,DWORD dwStyle, DWORD ExStyle );

protected:
	//视图操作
	CDrawCoord m_DrawCoord;
	
public:
	//视图操作
	void ViewOffset(double dOffsetX,double dOffsetY){m_DrawCoord.ViewOffset(dOffsetX, dOffsetY );};
	void ViewScale(double dScale , CPoint2D & toPoint){m_DrawCoord.ViewScale(dScale, toPoint );};
	void ViewRect(CRect2D & rect){m_DrawCoord.ViewRect( rect );};
	BOOL CanRedo(){m_DrawCoord.CanRedo();};
	BOOL CanUndo(){m_DrawCoord.CanUndo();};
	void ViewRedo(){m_DrawCoord.ViewRedo();};
	void ViewUndo(){m_DrawCoord.ViewUndo();};
	
	CRect2D GetViewRect(){m_DrawCoord.GetViewRect();};
	CRect2D GetViewRect(CPoint2D & p1,CPoint2D & p2){m_DrawCoord.GetViewRect(p1,p2);};
	
	CPoint2D PointToP2D(POINT & po){m_DrawCoord.PointToP2D( po );};
	POINT P2DToPOINT(CPoint2D & sp){ m_DrawCoord.P2DToPOINT(sp );};

};
//-- {InsertRegion: 193} module.vulnerableDeclarations [412..467]
//## begin module.epilog preserve=yes

#endif /* _INC_CUSERVIEW_432274790167_INCLUDED */ 
//## end module.epilog

⌨️ 快捷键说明

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