Click here to Skip to main content
15,886,868 members
Articles / Desktop Programming / MFC

SolidGraph CAD System

Rate me:
Please Sign up or sign in to vote.
4.97/5 (78 votes)
12 Sep 20062 min read 375.3K   29.8K   209  
A SolidGraph CAD system source code.
// SolidgraphView.h : interface of the CSolidgraphView class
//


#pragma once

#include "SolidgraphDoc.h"
#include "OpenGLView//OpenGLView.h"
#include "OpenGLView//ClientCapture.h"

class CSolidgraphView : public COpenGLView
{
protected: // create from serialization only
	CSolidgraphView();
	DECLARE_DYNCREATE(CSolidgraphView)

// Attributes
public:
	CSolidgraphDoc* GetDocument() const;

// Operations
private:
	bool    m_isPrinting;
	CClientCapture m_CapturedImage;
public:
	bool    IsPrintRegime() const {return m_isPrinting;};

// Overrides
public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	void    ResetHandAction() {m_hand_action=HA_ROTATE;};
protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);


protected:
	virtual   void DrawScene(GLenum mode = GL_RENDER, bool selSubObj=false);
	virtual   void DrawFromCommander();


// Implementation
public:
	virtual ~CSolidgraphView();
#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 void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
protected:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
public:
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	virtual void OnInitialUpdate();
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnFilePrintPreview();
};

extern CSolidgraphView*       global_opengl_view;

#ifndef _DEBUG  // debug version in SolidgraphView.cpp
inline CSolidgraphDoc* CSolidgraphView::GetDocument() const
   { return reinterpret_cast<CSolidgraphDoc*>(m_pDocument); }
#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions