📄 grdemoview.h
字号:
// GrDemoView.h : interface of the CGrDemoView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_GRDEMOVIEW_H__F1AC6390_183F_11D4_99BD_C08908C10000__INCLUDED_)
#define AFX_GRDEMOVIEW_H__F1AC6390_183F_11D4_99BD_C08908C10000__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Scatter.h"
class CGrDemoView : public CScrollView
{
protected: // create from serialization only
CGrDemoView();
DECLARE_DYNCREATE(CGrDemoView)
// Attributes
public:
CGrDemoDoc* GetDocument();
float m_fXScale;
float m_fYScale;
float m_fDelta;
int m_nMapMode;
CPoint sPT; // start point used for drug scroll
CPoint c_down;
CPoint c_last;
CPoint Zoom_in_First;
CPoint Zoom_in_Last;
CPoint MidPoint;
CString m_nCoord;
enum CZoomDrag { NONE, ZOOMIN, RECTZOOMIN, ZOOMOUT, DRAG };
CZoomDrag m_ZoomDrag;
CLinear<float> m_Linear;
CXLogYLinear<float> m_XLogYLinear;
CXLinearYLog<float> m_XLinearYLog;
CXLogYLog<float> m_XLogYLog;
CLinear<float>* m_pGraph;
BOOL m_bCanDraw;
bool m_bMemDraw;
BOOL m_bTitle;
bool m_bLegend;
BOOL m_bBoundary;
BOOL m_bGrid;
COLORREF m_nBkColor;
enum Maps { MAP1, MAPS2, MAPS4 };
Maps m_nMaps;
// Operations
public:
void DrawFrame(CRect& rect, COLORREF cr, const char* Title = "");
void RecalcSize();
void Redraw();
void Draw4Maps(CRect&);
void Draw2Maps(CRect&);
void Draw1Map(CRect&);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGrDemoView)
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:
virtual ~CGrDemoView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CGrDemoView)
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnTypeLinear();
afx_msg void OnUpdateTypeLinear(CCmdUI* pCmdUI);
afx_msg void OnTypeXlog();
afx_msg void OnUpdateTypeXlog(CCmdUI* pCmdUI);
afx_msg void OnTypeYlog();
afx_msg void OnUpdateTypeYlog(CCmdUI* pCmdUI);
afx_msg void OnTypeXlogylog();
afx_msg void OnUpdateTypeXlogylog(CCmdUI* pCmdUI);
afx_msg void OnTypeGrid();
afx_msg void OnUpdateTypeGrid(CCmdUI* pCmdUI);
afx_msg void OnTypeBoundary();
afx_msg void OnUpdateTypeBoundary(CCmdUI* pCmdUI);
afx_msg void OnTypeLegend();
afx_msg void OnUpdateTypeLegend(CCmdUI* pCmdUI);
afx_msg void OnTypeBackcolor();
afx_msg void OnUpdateTypeBackcolor(CCmdUI* pCmdUI);
afx_msg void OnTypeTitle();
afx_msg void OnUpdateTypeTitle(CCmdUI* pCmdUI);
afx_msg void OnTypeMemorydraw();
afx_msg void OnUpdateTypeMemorydraw(CCmdUI* pCmdUI);
afx_msg void OnMaps1map();
afx_msg void OnUpdateMaps1map(CCmdUI* pCmdUI);
afx_msg void OnMaps2maps();
afx_msg void OnUpdateMaps2maps(CCmdUI* pCmdUI);
afx_msg void OnMaps4maps();
afx_msg void OnUpdateMaps4maps(CCmdUI* pCmdUI);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnZoomRandom();
afx_msg void OnUpdateZoomRandom(CCmdUI* pCmdUI);
afx_msg void OnZoomRectangle();
afx_msg void OnUpdateZoomRectangle(CCmdUI* pCmdUI);
afx_msg void OnZoomDrag();
afx_msg void OnUpdateZoomDrag(CCmdUI* pCmdUI);
afx_msg void OnZoomIn();
afx_msg void OnUpdateZoomIn(CCmdUI* pCmdUI);
afx_msg void OnZoomOut();
afx_msg void OnUpdateZoomOut(CCmdUI* pCmdUI);
afx_msg void OnZoomNone();
afx_msg void OnUpdateZoomNone(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in GrDemoView.cpp
inline CGrDemoDoc* CGrDemoView::GetDocument()
{ return (CGrDemoDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_GRDEMOVIEW_H__F1AC6390_183F_11D4_99BD_C08908C10000__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -