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