MiniCADView.h
上传用户:netltd
上传日期:2013-02-12
资源大小:7234k
文件大小:4k
- // MiniCADView.h : interface of the CMiniCADView class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_MINICADVIEW_H__7F0987A0_D806_11D2_8830_E0646867975D__INCLUDED_)
- #define AFX_MINICADVIEW_H__7F0987A0_D806_11D2_8830_E0646867975D__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "MiniCAD.h"
- #include "MainFrm.h"
- #include "MiniCADDoc.h"
- class CMiniCADView : public CScrollView
- {
- protected: // create from serialization only
- CMiniCADView();
- DECLARE_DYNCREATE(CMiniCADView)
- public:
- CMiniCADDoc* GetDocument();
- void DrawCursor(CDC* pDC, CPoint OldPoint, CPoint NewPoint, int style);
-
- protected:
- CMiniCADApp* pApp;
- CMainFrame* pMainWnd;
- CMiniCADDoc* pDoc;
- SIZE size; //滚动视(客户区)的尺寸
- float Proportion; //图形缩放比例,因各个视图的比例不一样,所以不在CADInfo.h中定义
- //Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMiniCADView)
- public:
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- virtual void OnInitialUpdate();
- virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
- virtual BOOL OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll = TRUE);
- protected:
- virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
- virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
- virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
- virtual void OnDraw(CDC* pDC);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~CMiniCADView();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- // Generated message map functions
- protected:
- //{{AFX_MSG(CMiniCADView)
- afx_msg void OnDrawCircle();
- afx_msg void OnDrawLine();
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
- afx_msg void OnDestroy();
- afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
- afx_msg void OnZoomout();
- afx_msg void OnZoomin();
- afx_msg void OnSelchangeColor();
- afx_msg void OnSelchangeLinestyle();
- afx_msg void OnDrawRect();
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnViewRedraw();
- afx_msg void OnDrawSelect();
- afx_msg void OnEditUndo();
- afx_msg void OnEditRedo();
- afx_msg void OnDrawArc();
- afx_msg void OnDrawText();
- afx_msg void OnUpdateDrawSelect(CCmdUI* pCmdUI);
- afx_msg void OnUpdateDrawLine(CCmdUI* pCmdUI);
- afx_msg void OnUpdateDrawRect(CCmdUI* pCmdUI);
- afx_msg void OnUpdateDrawCircle(CCmdUI* pCmdUI);
- afx_msg void OnUpdateDrawArc(CCmdUI* pCmdUI);
- afx_msg void OnUpdateDrawText(CCmdUI* pCmdUI);
- afx_msg void OnUpdateEditRedo(CCmdUI* pCmdUI);
- afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
- afx_msg void OnUpdateChangeDelete(CCmdUI* pCmdUI);
- afx_msg void OnEraseBkgnd (CDC* pDC);
- afx_msg void OnSelchangeFilesize();
- afx_msg void OnDrawMultiline();
- afx_msg void OnDrawPolygon();
- afx_msg void OnDrawEllipse();
- afx_msg void OnModifyDelete();
- afx_msg void OnModifyCopy();
- afx_msg void OnModifyCut();
- afx_msg void OnModifyCuttoangle();
- afx_msg void OnModifyLengthento();
- afx_msg void OnModifyJoin();
- afx_msg void OnModifyMirror();
- afx_msg void OnModifyVertical();
- afx_msg void OnDrawDot();
- afx_msg void OnDrawCurve();
- afx_msg void OnModifyMove();
- afx_msg void OnModifyRotate();
- afx_msg void OnDrawDefineline();
- afx_msg void OnModifyExcursion();
- afx_msg void OnEditCopy();
- afx_msg void OnEditCut();
- afx_msg void OnEditPaste();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- #ifndef _DEBUG // debug version in MiniCADView.cpp
- inline CMiniCADDoc* CMiniCADView::GetDocument()
- { return (CMiniCADDoc*)m_pDocument; }
- #endif
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_MINICADVIEW_H__7F0987A0_D806_11D2_8830_E0646867975D__INCLUDED_)