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 "OCC_StereoConfigDlg.h"
15 #include <Standard_Macro.hxx>
19 CurAction3d_DynamicZooming,
20 CurAction3d_WindowZooming,
21 CurAction3d_DynamicPanning,
22 CurAction3d_GlobalPanning,
23 CurAction3d_DynamicRotation
26 class Standard_EXPORT OCC_3dView : public OCC_BaseView
28 DECLARE_DYNCREATE(OCC_3dView)
31 virtual ~OCC_3dView();
33 OCC_3dDoc* GetDocument();
34 void FitAll() { if ( !myView.IsNull() ) myView->FitAll(); myView->ZFitAll(); };
35 void Redraw() { if ( !myView.IsNull() ) myView->Redraw(); };
37 void SetZoom ( const Standard_Real& Coef ) { myView->SetZoom ( Coef ); };
39 Handle(V3d_View)& GetView() { return myView; }
41 // ClassWizard generated virtual function overrides
42 //{{AFX_VIRTUAL(OCC_3dView)
44 virtual void OnDraw(CDC* pDC); // overridden to draw this view
45 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
46 virtual void OnInitialUpdate();
49 // Generated message map functions
51 //{{AFX_MSG(OCC_3dView)
52 afx_msg void OnBUTTONAxo();
53 afx_msg void OnBUTTONBack();
54 afx_msg void OnBUTTONBottom();
55 afx_msg void OnBUTTONFront();
56 afx_msg void OnBUTTONHlrOff();
57 afx_msg void OnBUTTONHlrOn();
58 afx_msg void OnBUTTONLeft();
59 afx_msg void OnBUTTONPan();
60 afx_msg void OnBUTTONPanGlo();
61 afx_msg void OnBUTTONReset();
62 afx_msg void OnBUTTONRight();
63 afx_msg void OnBUTTONRot();
64 afx_msg void OnBUTTONTop();
65 afx_msg void OnBUTTONZoomAll();
66 afx_msg void OnFileExportImage();
67 afx_msg void OnSize(UINT nType, int cx, int cy);
68 afx_msg void OnBUTTONZoomProg();
69 afx_msg void OnBUTTONZoomWin();
70 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
71 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
72 afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
73 afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
74 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
75 afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
76 afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
77 afx_msg void OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI);
78 afx_msg void OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI);
79 afx_msg void OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI);
80 afx_msg void OnUpdateBUTTONPan(CCmdUI* pCmdUI);
81 afx_msg void OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI);
82 afx_msg void OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI);
83 afx_msg void OnUpdateBUTTONRot(CCmdUI* pCmdUI);
84 afx_msg void OnModifyChangeBackground();
85 afx_msg void OnStereoConfigButton();
86 afx_msg void OnUpdateStereoConfigButton (CCmdUI* theCmdUI);
91 virtual void AssertValid() const;
92 virtual void Dump(CDumpContext& dc) const;
97 Handle(V3d_View) myView;
98 CurAction3d myCurrentMode;
99 Standard_Integer myWidth;
100 Standard_Integer myHeight;
101 Standard_Boolean myHlrModeIsOn;
105 //! Persistent non blocking stereo configuration dialog
106 OCC_StereoConfigDlg* m_pStereoDlg;
109 #ifndef _DEBUG // debug version in OCC_3dView.cpp
110 inline OCC_3dDoc* OCC_3dView::GetDocument()
111 { return (OCC_3dDoc*)m_pDocument; }
114 #endif // !defined(AFX_OCC_3DVIEW_H__1F4065AE_39C4_11D7_8611_0060B0EE281E__INCLUDED_)