Adding svn:eol-style=LF property
[occt.git] / samples / mfc / standard / 01_Geometry / src / GeometryDoc.h
... / ...
CommitLineData
1// GeometryDoc.h : interface of the CGeometryDoc class
2//
3/////////////////////////////////////////////////////////////////////////////
4
5#if !defined(AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_)
6#define AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_
7
8#if _MSC_VER >= 1000
9#pragma once
10#endif // _MSC_VER >= 1000
11
12#include "ISession2D_InteractiveContext.h"
13#include "ResultDialog.h"
14
15class Handle_AIS_Point;
16
17class CGeometryDoc : public CDocument
18{
19public:
20 void Put2DOnTop(bool isMax = true);
21 void Put3DOnTop(bool isMax = true);
22 void Fit2DViews();
23 void Set3DViewsZoom(const Quantity_Factor& Coef );
24 void Fit3DViews(Quantity_Coefficient Coef);
25 void simplify(const TopoDS_Shape& aShape);
26
27
28 static void Fit();
29
30 // 2D
31
32 void DragEvent2D (const Standard_Integer x ,
33 const Standard_Integer y ,
34 const Standard_Integer TheState,
35 const Handle_V2d_View& aView );
36 void InputEvent2D (const Standard_Integer x ,
37 const Standard_Integer y ,
38 const Handle_V2d_View& aView );
39 void MoveEvent2D (const Standard_Integer x ,
40 const Standard_Integer y ,
41 const Handle_V2d_View& aView );
42 void ShiftMoveEvent2D (const Standard_Integer x ,
43 const Standard_Integer y ,
44 const Handle_V2d_View& aView );
45 void ShiftDragEvent2D (const Standard_Integer x ,
46 const Standard_Integer y ,
47 const Standard_Integer TheState,
48 const Handle_V2d_View& aView );
49 void ShiftInputEvent2D (const Standard_Integer x ,
50 const Standard_Integer y ,
51 const Handle_V2d_View& aView );
52 void Popup2D (const Standard_Integer x ,
53 const Standard_Integer y ,
54 const Handle_V2d_View& aView );
55
56 Handle_AIS_InteractiveObject drawSurface
57 (const Handle_Geom_Surface& theSurface,
58 const Quantity_Color& theColor,
59 const Standard_Boolean toDisplay);
60
61 Standard_Boolean WaitForInput (unsigned long aMilliSeconds);
62 // Waits for a user input or a period of time has been elapsed
63
64 Handle_AIS_Point drawPoint (const gp_Pnt& thePnt,
65 const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_GREEN),
66 const Standard_Boolean toDisplay = Standard_True);
67 // creates a presentation of the given point
68 // and displays it in the viewer if toDisplay = Standard_True
69
70 Handle_AIS_Shape drawShape (const TopoDS_Shape& theShape,
71 const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NOM_BRASS,
72 const Standard_Boolean toDisplay = Standard_True);
73 // creates a presentation of the given shape with the given material
74 // (color is default for a given material)
75 // and displays it in the viewer if toDisplay = Standard_True
76
77protected: // create from serialization only
78 CGeometryDoc();
79 DECLARE_DYNCREATE(CGeometryDoc)
80
81// Attributes
82public:
83
84// Operations
85public:
86
87// Overrides
88 // ClassWizard generated virtual function overrides
89 //{{AFX_VIRTUAL(CGeometryDoc)
90 public:
91 virtual BOOL OnNewDocument();
92 virtual void Serialize(CArchive& ar);
93 virtual void OnCloseDocument();
94 //}}AFX_VIRTUAL
95
96// Implementation
97public:
98 virtual ~CGeometryDoc();
99#ifdef _DEBUG
100 virtual void AssertValid() const;
101 virtual void Dump(CDumpContext& dc) const;
102#endif
103
104protected:
105
106// Generated message map functions
107protected:
108 //{{AFX_MSG(CGeometryDoc)
109 afx_msg void OnWindowNew2d();
110 afx_msg void OnBUTTONTest1();
111 afx_msg void OnBUTTONTest2();
112 afx_msg void OnBUTTONTest3();
113 afx_msg void OnBUTTONTest4();
114 afx_msg void OnBUTTONTest5();
115 afx_msg void OnBUTTONTest6();
116 afx_msg void OnBUTTONTest7();
117 afx_msg void OnBUTTONTest8();
118 afx_msg void OnBUTTONTest9();
119 afx_msg void OnBUTTONTest10();
120 afx_msg void OnBUTTONTest11();
121 afx_msg void OnBUTTONTest12();
122 afx_msg void OnBUTTONTest13();
123 afx_msg void OnBUTTONTest14();
124 afx_msg void OnBUTTONTest15();
125 afx_msg void OnBUTTONTest16();
126 afx_msg void OnBUTTONTest17();
127 afx_msg void OnBUTTONTest18();
128 afx_msg void OnBUTTONTest19();
129 afx_msg void OnBUTTONTest20();
130 afx_msg void OnBUTTONTest21();
131 afx_msg void OnBUTTONTest22();
132 afx_msg void OnBUTTONTest23();
133 afx_msg void OnBUTTONTest24();
134 afx_msg void OnBUTTONTest25();
135 afx_msg void OnBUTTONTest26();
136 afx_msg void OnBUTTONTest27();
137 afx_msg void OnBUTTONTest28();
138 afx_msg void OnBUTTONTest29();
139 afx_msg void OnBUTTONTest30();
140 afx_msg void OnBUTTONTest31();
141 afx_msg void OnBUTTONTest32();
142 afx_msg void OnBUTTONTest33();
143 afx_msg void OnBUTTONTest34();
144 afx_msg void OnBUTTONTest35();
145 afx_msg void OnBUTTONTest36();
146 afx_msg void OnBUTTONTest37();
147 afx_msg void OnBUTTONTest38();
148 afx_msg void OnBUTTONTest39();
149 afx_msg void OnBUTTONTest40();
150 afx_msg void OnBUTTONTest41();
151 afx_msg void OnBUTTONTest42();
152 afx_msg void OnBUTTONTest43();
153 afx_msg void OnBUTTONTest44();
154 afx_msg void OnBUTTONTest45();
155 afx_msg void OnBUTTONTest46();
156 afx_msg void OnBUTTONTest47();
157 afx_msg void OnBUTTONTest48();
158 afx_msg void OnBUTTONTest49();
159 afx_msg void OnBUTTONTest50();
160 afx_msg void OnUpdateBUTTONTest1(CCmdUI* pCmdUI);
161 afx_msg void OnUpdateBUTTONTest2(CCmdUI* pCmdUI);
162 afx_msg void OnUpdateBUTTONTest3(CCmdUI* pCmdUI);
163 afx_msg void OnUpdateBUTTONTest4(CCmdUI* pCmdUI);
164 afx_msg void OnUpdateBUTTONTest5(CCmdUI* pCmdUI);
165 afx_msg void OnUpdateBUTTONTest6(CCmdUI* pCmdUI);
166 afx_msg void OnUpdateBUTTONTest7(CCmdUI* pCmdUI);
167 afx_msg void OnUpdateBUTTONTest8(CCmdUI* pCmdUI);
168 afx_msg void OnUpdateBUTTONTest9(CCmdUI* pCmdUI);
169 afx_msg void OnUpdateBUTTONTest10(CCmdUI* pCmdUI);
170 afx_msg void OnUpdateBUTTONTest11(CCmdUI* pCmdUI);
171 afx_msg void OnUpdateBUTTONTest12(CCmdUI* pCmdUI);
172 afx_msg void OnUpdateBUTTONTest13(CCmdUI* pCmdUI);
173 afx_msg void OnUpdateBUTTONTest14(CCmdUI* pCmdUI);
174 afx_msg void OnUpdateBUTTONTest15(CCmdUI* pCmdUI);
175 afx_msg void OnUpdateBUTTONTest16(CCmdUI* pCmdUI);
176 afx_msg void OnUpdateBUTTONTest17(CCmdUI* pCmdUI);
177 afx_msg void OnUpdateBUTTONTest18(CCmdUI* pCmdUI);
178 afx_msg void OnUpdateBUTTONTest19(CCmdUI* pCmdUI);
179 afx_msg void OnUpdateBUTTONTest20(CCmdUI* pCmdUI);
180 afx_msg void OnUpdateBUTTONTest21(CCmdUI* pCmdUI);
181 afx_msg void OnUpdateBUTTONTest22(CCmdUI* pCmdUI);
182 afx_msg void OnUpdateBUTTONTest23(CCmdUI* pCmdUI);
183 afx_msg void OnUpdateBUTTONTest24(CCmdUI* pCmdUI);
184 afx_msg void OnUpdateBUTTONTest25(CCmdUI* pCmdUI);
185 afx_msg void OnUpdateBUTTONTest26(CCmdUI* pCmdUI);
186 afx_msg void OnUpdateBUTTONTest27(CCmdUI* pCmdUI);
187 afx_msg void OnUpdateBUTTONTest28(CCmdUI* pCmdUI);
188 afx_msg void OnUpdateBUTTONTest29(CCmdUI* pCmdUI);
189 afx_msg void OnUpdateBUTTONTest30(CCmdUI* pCmdUI);
190 afx_msg void OnUpdateBUTTONTest31(CCmdUI* pCmdUI);
191 afx_msg void OnUpdateBUTTONTest32(CCmdUI* pCmdUI);
192 afx_msg void OnUpdateBUTTONTest33(CCmdUI* pCmdUI);
193 afx_msg void OnUpdateBUTTONTest34(CCmdUI* pCmdUI);
194 afx_msg void OnUpdateBUTTONTest35(CCmdUI* pCmdUI);
195 afx_msg void OnUpdateBUTTONTest36(CCmdUI* pCmdUI);
196 afx_msg void OnUpdateBUTTONTest37(CCmdUI* pCmdUI);
197 afx_msg void OnUpdateBUTTONTest38(CCmdUI* pCmdUI);
198 afx_msg void OnUpdateBUTTONTest39(CCmdUI* pCmdUI);
199 afx_msg void OnUpdateBUTTONTest40(CCmdUI* pCmdUI);
200 afx_msg void OnUpdateBUTTONTest41(CCmdUI* pCmdUI);
201 afx_msg void OnUpdateBUTTONTest42(CCmdUI* pCmdUI);
202 afx_msg void OnUpdateBUTTONTest43(CCmdUI* pCmdUI);
203 afx_msg void OnUpdateBUTTONTest44(CCmdUI* pCmdUI);
204 afx_msg void OnUpdateBUTTONTest45(CCmdUI* pCmdUI);
205 afx_msg void OnUpdateBUTTONTest46(CCmdUI* pCmdUI);
206 afx_msg void OnUpdateBUTTONTest47(CCmdUI* pCmdUI);
207 afx_msg void OnUpdateBUTTONTest48(CCmdUI* pCmdUI);
208 afx_msg void OnUpdateBUTTONTest49(CCmdUI* pCmdUI);
209 afx_msg void OnUpdateBUTTONTest50(CCmdUI* pCmdUI);
210 afx_msg void OnCreateSol();
211 afx_msg void OnSimplify();
212 //}}AFX_MSG
213 DECLARE_MESSAGE_MAP()
214
215
216private:
217 Handle_V3d_Viewer myViewer;
218 Handle_V3d_Viewer myViewerCollector;
219 Handle_AIS_InteractiveContext myAISContext;
220public :
221 Handle_AIS_InteractiveContext& GetAISContext(){ return myAISContext; };
222 Handle_V3d_Viewer GetViewer() { return myViewer; };
223 Handle_V3d_Viewer GetViewerCollector() { return myViewerCollector; };
224
225
226private:
227 Handle_V2d_Viewer myViewer2D;
228 Handle_ISession2D_InteractiveContext myISessionContext;
229public :
230 int Current;
231 void Minimize3D();
232 void Minimize2D();
233 Handle_V2d_Viewer GetViewer2D() { return myViewer2D; };
234 Handle_ISession2D_InteractiveContext& GetISessionContext(){ return myISessionContext; };
235 BOOL FitMode;
236
237public :
238 CResultDialog myCResultDialog;
239
240};
241
242/////////////////////////////////////////////////////////////////////////////
243
244#endif // !defined(AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_)