Скачиваний:
19
Добавлен:
01.05.2014
Размер:
2 Кб
Скачать
#pragma once

class CLabView : public CView
{
	enum
	{
		Black,
		Points,
		Lines,
		Triangles,
		Quads,
		Polygon
	};

protected: // create from serialization only
	CLabView();
	DECLARE_DYNCREATE(CLabView)

// Attributes
public:
	CLabDoc* GetDocument() const;
	HGLRC	m_hrc;
	int		m_nShape;
	BOOL	bScissor;
	BOOL	bAlpha;
	BOOL	bBlend;
	
// Operations
public:
	void DrawLast();

// Overrides
public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
    virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();
protected:

// Implementation
public:
	virtual ~CLabView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnDestroy();
	afx_msg void OnPoints();
	afx_msg void OnLines();
	afx_msg void OnTriangles();
	afx_msg void OnQuads();
	afx_msg void OnPolygon();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnScissorDisable();
	afx_msg void OnScissorEnable();
	afx_msg void OnUpdateScissorEnable(CCmdUI *pCmdUI);
	afx_msg void OnUpdateScissorDisable(CCmdUI *pCmdUI);
	afx_msg void OnAlphaEnable();
	afx_msg void OnUpdateAlphaEnable(CCmdUI *pCmdUI);
	afx_msg void OnAlphaDisable();
	afx_msg void OnUpdateAlphaDisable(CCmdUI *pCmdUI);
	afx_msg void OnBlendDisable();
	afx_msg void OnBlendEnable();
	afx_msg void OnUpdateBlendDisable(CCmdUI *pCmdUI);
	afx_msg void OnUpdateBlendEnable(CCmdUI *pCmdUI);
private:
	void DrawPoint(void);
	void DrawBlack(void);
	void DrawTriangle(void);
	void DrawQuad(void);
	void DrawLine(void);	
	void DrawPolygon(void);
};

#ifndef _DEBUG  // debug version in LabView.cpp
inline CLabDoc* CLabView::GetDocument() const
   { return reinterpret_cast<CLabDoc*>(m_pDocument); }
#endif
Соседние файлы в папке Лабораторная работа №21