1 // OCC_2dView.h: interface for the OCC_2dView class.
3 //////////////////////////////////////////////////////////////////////
5 #if !defined(AFX_OCC_2dVIEW_H__2E048CC9_38F9_11D7_8611_0060B0EE281E__INCLUDED_)
6 #define AFX_OCC_2dVIEW_H__2E048CC9_38F9_11D7_8611_0060B0EE281E__INCLUDED_
10 #endif // _MSC_VER > 1000
12 #include "OCC_BaseView.h"
13 #include "OCC_2dDoc.h"
14 #include "Resource2d/RectangularGrid.h"
15 #include "Resource2d/CircularGrid.h"
20 CurAction2d_DynamicZooming,
21 CurAction2d_WindowZooming,
22 CurAction2d_DynamicPanning,
23 CurAction2d_GlobalPanning,
26 class AFX_EXT_CLASS OCC_2dView : public OCC_BaseView
28 DECLARE_DYNCREATE(OCC_2dView)
34 virtual ~OCC_2dView();
36 OCC_2dDoc* GetDocument();
38 Handle(V3d_View)& GetV2dView() { return myV2dView; }
43 // ClassWizard generated virtual function overrides
44 //{{AFX_VIRTUAL(OCC_2dView)
46 virtual void OnDraw(CDC* pDC); // overridden to draw this view
47 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
49 virtual void OnInitialUpdate(); // called first time after construct
53 virtual void AssertValid() const;
54 virtual void Dump(CDumpContext& dc) const;
59 // Generated message map functions
61 //{{AFX_MSG(OCC_2dView)
62 // NOTE - the ClassWizard will add and remove member functions here.
63 // DO NOT EDIT what you see in these blocks of generated code !
64 afx_msg void OnFileExportImage();
65 afx_msg void OnBUTTONGridRectLines();
66 afx_msg void OnBUTTONGridRectPoints();
67 afx_msg void OnBUTTONGridCircLines();
68 afx_msg void OnBUTTONGridCircPoints();
69 afx_msg void OnBUTTONGridValues();
70 afx_msg void OnUpdateBUTTONGridValues(CCmdUI* pCmdUI);
71 afx_msg void OnBUTTONGridCancel();
72 afx_msg void OnUpdateBUTTONGridCancel(CCmdUI* pCmdUI);
73 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
74 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
75 afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
76 afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
77 afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
78 afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
79 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
80 afx_msg void OnSize(UINT nType, int cx, int cy);
81 afx_msg void OnBUTTONFitAll();
82 afx_msg void OnBUTTONGlobPanning();
83 afx_msg void OnBUTTONPanning();
84 afx_msg void OnBUTTONZoomProg();
85 afx_msg void OnBUTTONZoomWin();
86 afx_msg void OnUpdateBUTTON2DGlobPanning(CCmdUI* pCmdUI);
87 afx_msg void OnUpdateBUTTON2DPanning(CCmdUI* pCmdUI);
88 afx_msg void OnUpdateBUTTON2DZoomProg(CCmdUI* pCmdUI);
89 afx_msg void OnUpdateBUTTON2DZoomWin(CCmdUI* pCmdUI);
90 afx_msg void OnChangeBackground();
96 virtual void DragEvent2D (const Standard_Integer x,
97 const Standard_Integer y,
98 const Standard_Integer TheState);
100 virtual void InputEvent2D (const Standard_Integer x,
101 const Standard_Integer y);
103 virtual void MoveEvent2D (const Standard_Integer x,
104 const Standard_Integer y);
106 virtual void MultiMoveEvent2D (const Standard_Integer x,
107 const Standard_Integer y);
109 virtual void MultiDragEvent2D (const Standard_Integer x,
110 const Standard_Integer y,
111 const Standard_Integer TheState);
113 virtual void MultiInputEvent2D (const Standard_Integer x,
114 const Standard_Integer y);
116 virtual void Popup2D (const Standard_Integer x,
117 const Standard_Integer y);
121 Handle(V3d_View) myV2dView;
122 CurrentAction2d myCurrentMode;
123 CRectangularGrid TheRectangularGridDialog;
124 CCircularGrid TheCircularGridDialog;
127 #ifndef _DEBUG // debug version in 2DDisplayView.cpp
128 inline OCC_2dDoc* OCC_2dView::GetDocument()
129 { return (OCC_2dDoc*)m_pDocument; }
132 #endif // !defined(AFX_OCC_2dVIEW_H__2E048CC9_38F9_11D7_8611_0060B0EE281E__INCLUDED_)