1 // SALOME OCCViewer : build OCC Viewer into Salome desktop
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : OCCViewer_VService.h
27 #ifndef _OCCViewer_VService_HeaderFile
28 #define _OCCViewer_VService_HeaderFile
30 #ifndef _Handle_V3d_View_HeaderFile
31 #include <Handle_V3d_View.hxx>
33 #ifndef _Handle_V2d_View_HeaderFile
34 #include <Handle_V2d_View.hxx>
36 #ifndef _Handle_V2d_Viewer_HeaderFile
37 #include <Handle_V2d_Viewer.hxx>
39 #ifndef _Standard_Integer_HeaderFile
40 #include <Standard_Integer.hxx>
42 #ifndef _Xw_WindowQuality_HeaderFile
43 #include <Xw_WindowQuality.hxx>
45 #ifndef _Handle_V3d_Viewer_HeaderFile
46 #include <Handle_V3d_Viewer.hxx>
48 #ifndef _Standard_CString_HeaderFile
49 #include <Standard_CString.hxx>
51 #ifndef _Standard_ExtString_HeaderFile
52 #include <Standard_ExtString.hxx>
54 #ifndef _Quantity_Length_HeaderFile
55 #include <Quantity_Length.hxx>
57 #ifndef _Quantity_NameOfColor_HeaderFile
58 #include <Quantity_NameOfColor.hxx>
60 #ifndef _V3d_TypeOfOrientation_HeaderFile
61 #include <V3d_TypeOfOrientation.hxx>
63 #ifndef _Standard_Boolean_HeaderFile
64 #include <Standard_Boolean.hxx>
66 #ifndef _Handle_Graphic2d_View_HeaderFile
67 #include <Handle_Graphic2d_View.hxx>
69 #ifndef _Handle_Aspect_WindowDriver_HeaderFile
70 #include <Handle_Aspect_WindowDriver.hxx>
79 class Aspect_WindowDriver;
81 #ifndef _Standard_HeaderFile
82 #include <Standard.hxx>
84 #ifndef _Standard_Macro_HeaderFile
85 #include <Standard_Macro.hxx>
88 class OCCViewer_VService {
92 inline void* operator new(size_t,void* anAddress)
96 inline void* operator new(size_t size)
98 return Standard::Allocate(size);
100 inline void operator delete(void *anAddress)
102 if (anAddress) Standard::Free((Standard_Address&)anAddress);
107 Standard_EXPORT static void SetWindow(const Handle(V3d_View)& aView,const Standard_Integer hiwin,const Standard_Integer lowin,const Xw_WindowQuality aQuality = Xw_WQ_3DQUALITY) ;
108 Standard_EXPORT static void SetMagnify(const Handle(V3d_View)& aView,const Standard_Integer hiwin,const Standard_Integer lowin,const Handle(V3d_View)& aPreviousView,const Standard_Integer x1,const Standard_Integer y1,const Standard_Integer x2,const Standard_Integer y2,const Xw_WindowQuality aQuality = Xw_WQ_3DQUALITY) ;
109 Standard_EXPORT static Handle_V3d_Viewer Viewer(const Standard_CString aDisplay,const Standard_ExtString aName,const Standard_CString aDomain = "",const Quantity_Length ViewSize = 1000.0,const V3d_TypeOfOrientation ViewProj = V3d_XposYnegZpos,const Standard_Boolean ComputedMode = Standard_True,const Standard_Boolean DefaultComputedMode = Standard_True) ;
111 Standard_EXPORT static Handle_V2d_View XView(const Handle(V2d_Viewer)& aViewer,const Standard_Integer hiwin,const Standard_Integer lowin,const Xw_WindowQuality aQuality = Xw_WQ_DRAWINGQUALITY,const Standard_Boolean Update = Standard_True,const Quantity_NameOfColor BackColor = Quantity_NOC_MATRAGRAY) ;
112 Standard_EXPORT static Handle_V2d_View XdpsView(const Handle(V2d_Viewer)& aViewer,const Standard_Integer hiwin,const Standard_Integer lowin,const Xw_WindowQuality aQuality = Xw_WQ_DRAWINGQUALITY,const Standard_Boolean Update = Standard_True,const Quantity_NameOfColor BackColor = Quantity_NOC_MATRAGRAY) ;
113 Standard_EXPORT static Handle_V2d_Viewer Viewer(const Standard_CString aDisplay,const Standard_ExtString aName,const Standard_CString aDomain = "") ;
114 Standard_EXPORT static Handle_V2d_Viewer Viewer(const Standard_CString aDisplay,const Handle(Graphic2d_View)& aView,const Standard_ExtString aName,const Standard_CString aDomain = "") ;
115 Standard_EXPORT static Handle_Aspect_WindowDriver WindowDriver(const Standard_CString aDisplay,const Standard_Integer ahiwin,const Standard_Integer alowin,const Quantity_NameOfColor aColor = Quantity_NOC_GRAY69) ;
116 Standard_EXPORT static Handle_Aspect_WindowDriver XdpsDriver(const Standard_CString aDisplay,const Standard_Integer ahiwin,const Standard_Integer alowin,const Quantity_NameOfColor aColor = Quantity_NOC_GRAY69) ;
117 Standard_EXPORT static Handle_Aspect_WindowDriver ImageDriver(const Standard_CString aDisplay,const Standard_Integer ahiwin,const Standard_Integer alowin,const Quantity_NameOfColor aColor = Quantity_NOC_GRAY69) ;
146 // other inline functions and methods (like "C++: function call" methods)