1 // OCCDemoView.h : interface of the COCCDemoView class
3 /////////////////////////////////////////////////////////////////////////////
5 #if !defined(AFX_OCCDEMOVIEW_H__57A6A230_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_)
6 #define AFX_OCCDEMOVIEW_H__57A6A230_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_
10 #endif // _MSC_VER > 1000
12 enum View3D_CurrentAction {
14 CurAction3d_DynamicZooming,
15 CurAction3d_WindowZooming,
16 CurAction3d_DynamicPanning,
17 CurAction3d_GlobalPanning,
18 CurAction3d_DynamicRotation
21 class COCCDemoView : public CView
23 protected: // create from serialization only
25 DECLARE_DYNCREATE(COCCDemoView)
29 COCCDemoDoc* GetDocument();
35 void GetViewAt (V3d_Coordinate& theX, V3d_Coordinate& theY, V3d_Coordinate& theZ) const;
36 void SetViewAt (const V3d_Coordinate theX, const V3d_Coordinate theY, const V3d_Coordinate theZ);
37 void GetViewEye (V3d_Coordinate& X, V3d_Coordinate& Y, V3d_Coordinate& Z);
38 void SetViewEye (const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z);
39 Quantity_Factor GetViewScale();
40 void SetViewScale(const Quantity_Factor Coef);
41 void Translate (const V3d_Coordinate theX, const V3d_Coordinate theY);
50 // ClassWizard generated virtual function overrides
51 //{{AFX_VIRTUAL(COCCDemoView)
53 virtual void OnDraw(CDC* pDC); // overridden to draw this view
54 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
55 virtual void OnInitialUpdate();
61 virtual ~COCCDemoView();
63 virtual void AssertValid() const;
64 virtual void Dump(CDumpContext& dc) const;
69 // Generated message map functions
71 //{{AFX_MSG(COCCDemoView)
72 afx_msg void OnBUTTONAxo();
73 afx_msg void OnBUTTONBack();
74 afx_msg void OnBUTTONBottom();
75 afx_msg void OnBUTTONFront();
76 afx_msg void OnBUTTONHlrOn();
77 afx_msg void OnBUTTONLeft();
78 afx_msg void OnBUTTONPan();
79 afx_msg void OnBUTTONPanGlo();
80 afx_msg void OnBUTTONReset();
81 afx_msg void OnBUTTONRight();
82 afx_msg void OnBUTTONRot();
83 afx_msg void OnBUTTONTop();
84 afx_msg void OnBUTTONZoomAll();
85 afx_msg void OnSize(UINT nType, int cx, int cy);
86 afx_msg void OnBUTTONZoomProg();
87 afx_msg void OnBUTTONZoomWin();
88 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
89 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
90 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
91 afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
92 afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
93 afx_msg void OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI);
94 afx_msg void OnUpdateBUTTONPan(CCmdUI* pCmdUI);
95 afx_msg void OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI);
96 afx_msg void OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI);
97 afx_msg void OnUpdateBUTTONRot(CCmdUI* pCmdUI);
98 afx_msg void OnBUTTONWire();
99 afx_msg void OnBUTTONShade();
100 afx_msg void OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI);
101 afx_msg void OnUpdateBUTTONShade(CCmdUI* pCmdUI);
102 afx_msg void OnUpdateBUTTONWire(CCmdUI* pCmdUI);
104 DECLARE_MESSAGE_MAP()
107 void RedrawVisMode();
110 enum VisMode { VIS_WIREFRAME, VIS_SHADE, VIS_HLR };
111 Handle_V3d_View myView;
112 Handle_Graphic3d_GraphicDriver myGraphicDriver;
113 View3D_CurrentAction myCurrentMode;
115 Standard_Integer myXmin;
116 Standard_Integer myYmin;
117 Standard_Integer myXmax;
118 Standard_Integer myYmax;
119 Quantity_Factor myCurZoom;
122 enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };
124 virtual void DrawRectangle (const Standard_Integer MinX ,
125 const Standard_Integer MinY ,
126 const Standard_Integer MaxX ,
127 const Standard_Integer MaxY ,
128 const Standard_Boolean Draw ,
129 const LineStyle aLineStyle = Default );
133 #ifndef _DEBUG // debug version in OCCDemoView.cpp
134 inline COCCDemoDoc* COCCDemoView::GetDocument()
135 { return (COCCDemoDoc*)m_pDocument; }
138 /////////////////////////////////////////////////////////////////////////////
140 //{{AFX_INSERT_LOCATION}}
141 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
143 #endif // !defined(AFX_OCCDEMOVIEW_H__57A6A230_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_)