1 // OCC_3dView.h: interface for the OCC_3dView class.
3 //////////////////////////////////////////////////////////////////////
5 #if !defined(AFX_OCC_3DVIEW_H__1F4065AE_39C4_11D7_8611_0060B0EE281E__INCLUDED_)
6 #define AFX_OCC_3DVIEW_H__1F4065AE_39C4_11D7_8611_0060B0EE281E__INCLUDED_
10 #endif // _MSC_VER > 1000
12 #include "OCC_BaseView.h"
13 #include "OCC_3dDoc.h"
14 #include <Standard_Macro.hxx>
18 CurAction3d_DynamicZooming,
19 CurAction3d_WindowZooming,
20 CurAction3d_DynamicPanning,
21 CurAction3d_GlobalPanning,
22 CurAction3d_DynamicRotation
25 class AFX_EXT_CLASS OCC_3dView : public OCC_BaseView
27 DECLARE_DYNCREATE(OCC_3dView)
30 virtual ~OCC_3dView();
32 OCC_3dDoc* GetDocument();
33 void FitAll() { if ( !myView.IsNull() ) myView->FitAll(); myView->ZFitAll(); };
34 void Redraw() { if ( !myView.IsNull() ) myView->Redraw(); };
36 void SetZoom ( const Quantity_Factor& Coef ) { myView->SetZoom ( Coef ); };
38 Handle_V3d_View& GetView() { return myView; }
40 // ClassWizard generated virtual function overrides
41 //{{AFX_VIRTUAL(OCC_3dView)
43 virtual void OnDraw(CDC* pDC); // overridden to draw this view
44 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
45 virtual void OnInitialUpdate();
48 // Generated message map functions
50 //{{AFX_MSG(OCC_3dView)
51 afx_msg void OnBUTTONAxo();
52 afx_msg void OnBUTTONBack();
53 afx_msg void OnBUTTONBottom();
54 afx_msg void OnBUTTONFront();
55 afx_msg void OnBUTTONHlrOff();
56 afx_msg void OnBUTTONHlrOn();
57 afx_msg void OnBUTTONLeft();
58 afx_msg void OnBUTTONPan();
59 afx_msg void OnBUTTONPanGlo();
60 afx_msg void OnBUTTONReset();
61 afx_msg void OnBUTTONRight();
62 afx_msg void OnBUTTONRot();
63 afx_msg void OnBUTTONTop();
64 afx_msg void OnBUTTONZoomAll();
65 afx_msg void OnFileExportImage();
66 afx_msg void OnSize(UINT nType, int cx, int cy);
67 afx_msg void OnBUTTONZoomProg();
68 afx_msg void OnBUTTONZoomWin();
69 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
70 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
71 afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
72 afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
73 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
74 afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
75 afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
76 afx_msg void OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI);
77 afx_msg void OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI);
78 afx_msg void OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI);
79 afx_msg void OnUpdateBUTTONPan(CCmdUI* pCmdUI);
80 afx_msg void OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI);
81 afx_msg void OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI);
82 afx_msg void OnUpdateBUTTONRot(CCmdUI* pCmdUI);
83 afx_msg void OnModifyChangeBackground();
88 virtual void AssertValid() const;
89 virtual void Dump(CDumpContext& dc) const;
94 Handle_V3d_View myView;
95 CurAction3d myCurrentMode;
96 Standard_Integer myXmin;
97 Standard_Integer myYmin;
98 Standard_Integer myXmax;
99 Standard_Integer myYmax;
100 Quantity_Factor myCurZoom;
101 Standard_Integer myWidth;
102 Standard_Integer myHeight;
103 Standard_Boolean myHlrModeIsOn;
105 enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };
108 virtual void DrawRectangle (const Standard_Integer MinX ,
109 const Standard_Integer MinY ,
110 const Standard_Integer MaxX ,
111 const Standard_Integer MaxY ,
112 const Standard_Boolean Draw ,
113 const LineStyle aLineStyle = Default );
116 #ifndef _DEBUG // debug version in OCC_3dView.cpp
117 inline OCC_3dDoc* OCC_3dView::GetDocument()
118 { return (OCC_3dDoc*)m_pDocument; }
121 #endif // !defined(AFX_OCC_3DVIEW_H__1F4065AE_39C4_11D7_8611_0060B0EE281E__INCLUDED_)