7fd59977 |
1 | // OCC_BaseDoc.h: interface for the OCC_BaseDoc class. |
2 | // |
3 | ////////////////////////////////////////////////////////////////////// |
4 | |
5 | #if !defined(AFX_OCC_BASEDOC_H__2E048CC8_38F9_11D7_8611_0060B0EE281E__INCLUDED_) |
6 | #define AFX_OCC_BASEDOC_H__2E048CC8_38F9_11D7_8611_0060B0EE281E__INCLUDED_ |
7 | |
8 | #if _MSC_VER > 1000 |
9 | #pragma once |
10 | #endif // _MSC_VER > 1000 |
11 | |
12c76bee |
12 | #include <AIS_InteractiveContext.hxx> |
13 | #include <V3d_Viewer.hxx> |
14 | |
15 | // Base class for all documents in the sample. |
16 | // Declares base functionlaity and interface for the sample documents. |
17 | // Common properties: |
18 | // - interactive context |
19 | // - 3d viewer |
20 | // Common methods: |
21 | // - base events |
22 | // - export into one of supported export formats. |
23 | class AFX_EXT_CLASS OCC_BaseDoc : public CDocument |
7fd59977 |
24 | { |
25 | public: |
7fd59977 |
26 | |
5c1f974e |
27 | OCC_BaseDoc(); |
28 | |
29 | virtual ~OCC_BaseDoc(); |
30 | |
31 | Handle(AIS_InteractiveContext)& GetAISContext() { return myAISContext; } |
32 | |
12c76bee |
33 | Handle(V3d_Viewer) GetViewer() { return myViewer; } |
34 | |
35 | // Returns string with supported export pixel and vector images formats. |
36 | const CString SupportedImageFormats() const; |
37 | |
38 | // Exports the given view into of the supported formats. |
39 | void ExportView (const Handle(V3d_View)& theView) const; |
5c1f974e |
40 | |
41 | //Events |
5c573e69 |
42 | virtual void DragEvent (const Standard_Integer /*theMouseX*/, |
43 | const Standard_Integer /*theMouseY*/, |
44 | const Standard_Integer /*theState*/, |
45 | const Handle(V3d_View)& /*theView*/) {} |
46 | |
47 | virtual void InputEvent (const Standard_Integer /*theMouseX*/, |
48 | const Standard_Integer /*theMouseY*/, |
49 | const Handle(V3d_View)& /*theView*/) {} |
50 | |
51 | virtual void MoveEvent (const Standard_Integer /*theMouseX*/, |
52 | const Standard_Integer /*theMouseY*/, |
53 | const Handle(V3d_View)& /*theView*/) {} |
54 | |
55 | virtual void ShiftMoveEvent (const Standard_Integer /*theMouseX*/, |
56 | const Standard_Integer /*theMouseY*/, |
57 | const Handle(V3d_View)& /*theView*/) {} |
58 | |
59 | virtual void ShiftDragEvent (const Standard_Integer /*theMouseX*/, |
60 | const Standard_Integer /*theMouseY*/, |
61 | const Standard_Integer /*theState*/, |
62 | const Handle(V3d_View)& /*theView*/) {} |
63 | |
64 | virtual void ShiftInputEvent(const Standard_Integer /*theMouseX*/, |
65 | const Standard_Integer /*theMouseY*/, |
66 | const Handle(V3d_View)& /*theView*/) {} |
67 | |
68 | virtual void Popup (const Standard_Integer /*theMouseX*/, |
69 | const Standard_Integer /*theMouseY*/, |
70 | const Handle(V3d_View)& /*theView*/) {} |
b5ac8292 |
71 | |
b5ac8292 |
72 | void ResetDocumentViews (CDocTemplate* theTemplate); |
73 | |
5c1f974e |
74 | protected: |
75 | |
76 | Handle(V3d_Viewer) myViewer; |
77 | Handle(AIS_InteractiveContext) myAISContext; |
7fd59977 |
78 | }; |
79 | |
80 | #endif // !defined(AFX_OCC_BASEDOC_H__2E048CC8_38F9_11D7_8611_0060B0EE281E__INCLUDED_) |