Click here to Skip to main content
Click here to Skip to main content
Articles » Multimedia » OpenGL » General » Downloads
 
Add your own
alternative version

StL Data File Viewer

, 5 Mar 2003
A simple StereoLithography data file viewer.
// StLViewerView.h : interface of the CStLViewerView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_GLVIEWERVIEW_H__887DAAE3_D52F_49B9_A12E_9222A1F21CAC__INCLUDED_)
#define AFX_GLVIEWERVIEW_H__887DAAE3_D52F_49B9_A12E_9222A1F21CAC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "GLView.h"

class CStLViewerView : public CView
{
protected: // create from serialization only
	CStLViewerView();
	DECLARE_DYNCREATE(CStLViewerView)

// Attributes
public:
	CStLViewerDoc* GetDocument();

// Operations
public:
	enum LineStyle { Solid, Dot, ShortDash, LongDash };
	CPen*  m_Pen;
    virtual void DrawRectangle (const bool  Draw =true,
                                const LineStyle aLineStyle = Solid  );
	
private:
	CGLView* myView;

	bool lbutdown;
	bool mbutdown;
	bool rbutdown;

	CPoint lDownPnt;
	CPoint mDownPnt;
	CPoint rDownPnt;

	bool m_bShaded;
	bool winZoom;
	bool antialiased;

	int     myXmin;
    int     myYmin;  
    int     myXmax;
    int     myYmax;

	CString coord;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CStLViewerView)
	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 ~CStLViewerView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CStLViewerView)
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnDestroy();
	afx_msg void OnTopview();
	afx_msg void OnBottomview();
	afx_msg void OnFrontview();
	afx_msg void OnRearview();
	afx_msg void OnLeftview();
	afx_msg void OnRightview();
	afx_msg void OnAxonview();
	afx_msg void OnFitall();
	afx_msg void OnZoomwin();
	afx_msg void OnReset();
	afx_msg void OnDisplaymode();
	afx_msg void OnHlremoved();
	afx_msg void OnAntial();
	afx_msg void OnUpdateCoordViewer(CCmdUI* pCmdUI); //Coordinates in Status Bar
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg void OnScreenBackgroundcolor();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in StLViewerView.cpp
inline CStLViewerDoc* CStLViewerView::GetDocument()
   { return (CStLViewerDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GLVIEWERVIEW_H__887DAAE3_D52F_49B9_A12E_9222A1F21CAC__INCLUDED_)

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, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

About the Author

Sharjith
Engineer Tata Technologies Ltd
India India
Sharjith is a Mechanical Engineer with strong passion for Automobiles, Aircrafts and Software development.

| Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 6 Mar 2003
Article Copyright 2003 by Sharjith
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid