1 // OCC_BaseDoc.h: interface for the OCC_BaseDoc class.
3 //////////////////////////////////////////////////////////////////////
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_
10 #endif // _MSC_VER > 1000
12 #include <AIS_InteractiveContext.hxx>
13 #include <V3d_Viewer.hxx>
15 // Base class for all documents in the sample.
16 // Declares base functionlaity and interface for the sample documents.
18 // - interactive context
22 // - export into one of supported export formats.
23 class AFX_EXT_CLASS OCC_BaseDoc : public CDocument
29 virtual ~OCC_BaseDoc();
31 Handle(AIS_InteractiveContext)& GetAISContext() { return myAISContext; }
33 Handle(V3d_Viewer) GetViewer() { return myViewer; }
35 // Returns string with supported export pixel and vector images formats.
36 const CString SupportedImageFormats() const;
38 // Exports the given view into of the supported formats.
39 void ExportView (const Handle(V3d_View)& theView) const;
42 virtual void DragEvent (const Standard_Integer /*theMouseX*/,
43 const Standard_Integer /*theMouseY*/,
44 const Standard_Integer /*theState*/,
45 const Handle(V3d_View)& /*theView*/) {}
47 virtual void InputEvent (const Standard_Integer /*theMouseX*/,
48 const Standard_Integer /*theMouseY*/,
49 const Handle(V3d_View)& /*theView*/) {}
51 virtual void MoveEvent (const Standard_Integer /*theMouseX*/,
52 const Standard_Integer /*theMouseY*/,
53 const Handle(V3d_View)& /*theView*/) {}
55 virtual void ShiftMoveEvent (const Standard_Integer /*theMouseX*/,
56 const Standard_Integer /*theMouseY*/,
57 const Handle(V3d_View)& /*theView*/) {}
59 virtual void ShiftDragEvent (const Standard_Integer /*theMouseX*/,
60 const Standard_Integer /*theMouseY*/,
61 const Standard_Integer /*theState*/,
62 const Handle(V3d_View)& /*theView*/) {}
64 virtual void ShiftInputEvent(const Standard_Integer /*theMouseX*/,
65 const Standard_Integer /*theMouseY*/,
66 const Handle(V3d_View)& /*theView*/) {}
68 virtual void Popup (const Standard_Integer /*theMouseX*/,
69 const Standard_Integer /*theMouseY*/,
70 const Handle(V3d_View)& /*theView*/) {}
73 Handle(V3d_Viewer) myViewer;
74 Handle(AIS_InteractiveContext) myAISContext;
77 #endif // !defined(AFX_OCC_BASEDOC_H__2E048CC8_38F9_11D7_8611_0060B0EE281E__INCLUDED_)