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 Standard_EXPORT OCC_BaseDoc : public CDocument
29 virtual ~OCC_BaseDoc();
31 const Handle(AIS_InteractiveContext)& GetAISContext() const { return myAISContext; }
32 const Handle(AIS_InteractiveContext)& GetInteractiveContext() const { return myAISContext; };
34 const Handle(V3d_Viewer)& GetViewer() const { return myViewer; }
36 // Returns string with supported export pixel and vector images formats.
37 const CString SupportedImageFormats() const;
39 // Exports the given view into of the supported formats.
40 void ExportView (const Handle(V3d_View)& theView) const;
43 virtual void DragEvent (const Standard_Integer /*theMouseX*/,
44 const Standard_Integer /*theMouseY*/,
45 const Standard_Integer /*theState*/,
46 const Handle(V3d_View)& /*theView*/) {}
48 virtual void InputEvent (const Standard_Integer /*theMouseX*/,
49 const Standard_Integer /*theMouseY*/,
50 const Handle(V3d_View)& /*theView*/) {}
52 virtual void MoveEvent (const Standard_Integer /*theMouseX*/,
53 const Standard_Integer /*theMouseY*/,
54 const Handle(V3d_View)& /*theView*/) {}
56 virtual void ShiftMoveEvent (const Standard_Integer /*theMouseX*/,
57 const Standard_Integer /*theMouseY*/,
58 const Handle(V3d_View)& /*theView*/) {}
60 virtual void ShiftDragEvent (const Standard_Integer /*theMouseX*/,
61 const Standard_Integer /*theMouseY*/,
62 const Standard_Integer /*theState*/,
63 const Handle(V3d_View)& /*theView*/) {}
65 virtual void ShiftInputEvent(const Standard_Integer /*theMouseX*/,
66 const Standard_Integer /*theMouseY*/,
67 const Handle(V3d_View)& /*theView*/) {}
69 virtual void Popup (const Standard_Integer /*theMouseX*/,
70 const Standard_Integer /*theMouseY*/,
71 const Handle(V3d_View)& /*theView*/) {}
73 //! Callback called by handleMoveTo() on Selection in 3D Viewer.
74 virtual void OnSelectionChanged (const Handle(AIS_InteractiveContext)& ,
75 const Handle(V3d_View)& ) {}
77 void ResetDocumentViews (CDocTemplate* theTemplate);
81 Handle(V3d_Viewer) myViewer;
82 Handle(AIS_InteractiveContext) myAISContext;
85 #endif // !defined(AFX_OCC_BASEDOC_H__2E048CC8_38F9_11D7_8611_0060B0EE281E__INCLUDED_)