www.pudn.com > Poly.rar > PolyTopView.h
// PolyTopView.h : interface of the CPolyTopView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_POLYTOPVIEW_H__32636180_BDB8_489D_9F6A_70B4FBC4C3B2__INCLUDED_)
#define AFX_POLYTOPVIEW_H__32636180_BDB8_489D_9F6A_70B4FBC4C3B2__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ptpdata.h"
#include "ScrollAssist.h"
class CPolyTopView : public CView
{
protected: // create from serialization only
CPolyTopView();
DECLARE_DYNCREATE(CPolyTopView)
// Attributes
public:
CPolyTopDoc* GetDocument();
// Operations
public:
CScrollAssist_zhang m_Assist;
float m_zoomRate;
bool m_dirMode;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPolyTopView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void OnInitialUpdate();
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
void ZoomOut(CPoint point);
void ZoomIn(CPoint point);
void WorldToClient(float center_x, float center_y, CPoint &point);
void ZoomSource();
virtual ~CPolyTopView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
private:
void ClientToWorld(CPoint point, int ¢er_x, int ¢er_y);
void DrawLine(Point p1,Point p2,COLORREF color);
void DrawPt(Point p,COLORREF color);
// Generated message map functions
protected:
//{{AFX_MSG(CPolyTopView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnAllview();
afx_msg void OnNormalview();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnUpdateAllview(CCmdUI* pCmdUI);
afx_msg void OnUpdateNormalview(CCmdUI* pCmdUI);
//}}AFX_MSG
afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
DECLARE_MESSAGE_MAP()
public:
UINT m_nState;
};
#ifndef _DEBUG // debug version in PolyTopView.cpp
inline CPolyTopDoc* CPolyTopView::GetDocument()
{ return (CPolyTopDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_POLYTOPVIEW_H__32636180_BDB8_489D_9F6A_70B4FBC4C3B2__INCLUDED_)