Click here to Skip to main content
12,890,879 members (54,932 online)
Click here to Skip to main content
Articles » Multimedia » OpenGL » General » Downloads


53 bookmarked
Posted 5 Mar 2003

StL Data File Viewer

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

#if !defined(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

// Attributes
	CStLViewerDoc* GetDocument();

// Operations
	enum LineStyle { Solid, Dot, ShortDash, LongDash };
	CPen*  m_Pen;
    virtual void DrawRectangle (const bool  Draw =true,
                                const LineStyle aLineStyle = Solid  );
	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
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);

// Implementation
	virtual ~CStLViewerView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;


// Generated message map functions
	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();

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


// 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.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Product Manager Mahindra & Mahindra
India India
Sharjith is a Mechanical Engineer with strong passion for Automobiles, Aircrafts and Software development.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170424.1 | Last Updated 6 Mar 2003
Article Copyright 2003 by Sharjith
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid