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