📄 cg50view.h
字号:
// Cg50View.h : interface of the CCg50View class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CG50VIEW_H__0AC16D6E_AC77_11D2_B60A_444553540000__INCLUDED_)
#define AFX_CG50VIEW_H__0AC16D6E_AC77_11D2_B60A_444553540000__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#define OBJ_LINE 1
#define OBJ_ARROW 2
#define OBJ_BEZIER 3
#define OBJ_PUBLINE 4
#define OBJ_GRID 5
#define OBJ_RETANGLE 6
#define OBJ_HOUSE 7
#define OBJ_CLOCK 8
#define OBJ_DELETE 9
#define OBJ_PHONG 10
#define OBJ_FREE 11
#define STT_SELECT 0
#define STT_LINE 1
#define STT_ARROW 2
#define STT_BEZIER 3
#define STT_PUBLINE 4
#define STT_GRID 5
#define STT_RETANGLE 6
#define STT_HOUSE 7
#define STT_CLOCK 8
#define STT_DELETE 9
#define STT_PHONG 10
#define STT_FREE 11
typedef struct DRAWOBJ DrawObj;
struct DRAWOBJ{
int type;
int num;
CPoint v[10];
DrawObj *next;
};
class CCg50View : public CView
{
protected: // create from serialization only
CCg50View();
DECLARE_DYNCREATE(CCg50View)
// Attributes
public:
CCg50Doc* GetDocument();
private:
bool bMouseDelete;
bool bMouseUndeleteall;
DrawObj *obj, *end;
int state, step;
char str[100];
CPoint GridPoint,oldMousePoint,newMousePoint;
BOOL bDrawRotate, bDrawPalette, bDrawHouse, bDrawClock, bDrawPhong,bDrawFree,bEditRedo, bEditUndo,bdraw;
int Vx, Vy, Vz;
long TimeCounter;
int size;
DrawObj *ObjTemp;
int select;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCg50View)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
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 ~CCg50View();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CCg50View)
afx_msg void OnEditClear();
afx_msg void OnViewGrid();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnDrawLine();
afx_msg void OnDrawArrow();
afx_msg void OnDrawBezier();
afx_msg void OnDrawPubline();
afx_msg void OnDrawRetangle();
afx_msg void OnDrawRotate();
afx_msg void OnDrawPalette();
afx_msg void OnDrawHouse();
afx_msg void OnDrawClock();
afx_msg void OnUpdateDrawRotate(CCmdUI* pCmdUI);
afx_msg void OnUpdateDrawPalette(CCmdUI* pCmdUI);
afx_msg void OnUpdateDrawHouse(CCmdUI* pCmdUI);
afx_msg void OnUpdateDrawClock(CCmdUI* pCmdUI);
afx_msg void OnMouseDelete();
afx_msg void OnEditRedo();
afx_msg void OnMouseUndeleteall();
afx_msg void OnEditUndo();
afx_msg void OnUpdateEditRedo(CCmdUI* pCmdUI);
afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
afx_msg void OnUpdateMouseUndeleteall(CCmdUI* pCmdUI);
afx_msg void OnUpdateMouseDelete(CCmdUI* pCmdUI);
afx_msg void OnDrawPhong();
afx_msg void OnUpdateDrawPhong(CCmdUI* pCmdUI);
afx_msg void OnPalette();
afx_msg void OnDrawFree();
afx_msg void OnUpdateDrawFree(CCmdUI* pCmdUI);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in Cg50View.cpp
inline CCg50Doc* CCg50View::GetDocument()
{ return (CCg50Doc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CG50VIEW_H__0AC16D6E_AC77_11D2_B60A_444553540000__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -