1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #ifndef OCCVIEWER_VSERVICE_H
24 #define OCCVIEWER_VSERVICE_H
26 #ifndef _Handle_V3d_View_HeaderFile
27 #include <Handle_V3d_View.hxx>
29 #ifndef _Standard_Integer_HeaderFile
30 #include <Standard_Integer.hxx>
32 #ifndef _Xw_WindowQuality_HeaderFile
33 #include <Xw_WindowQuality.hxx>
35 #ifndef _Handle_V3d_Viewer_HeaderFile
36 #include <Handle_V3d_Viewer.hxx>
38 #ifndef _Standard_CString_HeaderFile
39 #include <Standard_CString.hxx>
41 #ifndef _Standard_ExtString_HeaderFile
42 #include <Standard_ExtString.hxx>
44 #ifndef _Quantity_Length_HeaderFile
45 #include <Quantity_Length.hxx>
47 #ifndef _Quantity_NameOfColor_HeaderFile
48 #include <Quantity_NameOfColor.hxx>
50 #ifndef _V3d_TypeOfOrientation_HeaderFile
51 #include <V3d_TypeOfOrientation.hxx>
53 #ifndef _Standard_Boolean_HeaderFile
54 #include <Standard_Boolean.hxx>
56 #ifndef _Handle_Graphic2d_View_HeaderFile
57 #include <Handle_Graphic2d_View.hxx>
59 #ifndef _Handle_Aspect_WindowDriver_HeaderFile
60 #include <Handle_Aspect_WindowDriver.hxx>
62 #ifndef _Handle_Aspect_Window_HeaderFile
63 #include <Handle_Aspect_Window.hxx>
71 class Aspect_WindowDriver;
73 #ifndef _Standard_HeaderFile
74 #include <Standard.hxx>
76 #ifndef _Standard_Macro_HeaderFile
77 #include <Standard_Macro.hxx>
80 class Standard_EXPORT OCCViewer_VService
83 inline void* operator new(size_t,void* anAddress)
87 inline void* operator new(size_t size)
89 return Standard::Allocate(size);
91 inline void operator delete(void *anAddress)
93 if ( anAddress ) Standard::Free((Standard_Address&)anAddress);
97 static Handle(Aspect_Window)
98 CreateWindow( const Handle(V3d_View)& view,
99 const Standard_Integer hiwin,
100 const Standard_Integer lowin,
101 const Xw_WindowQuality quality );
103 static void SetWindow( const Handle( V3d_View )& view,
104 const Standard_Integer hiwin,
105 const Standard_Integer lowin,
106 const Xw_WindowQuality quality = Xw_WQ_3DQUALITY );
108 static void SetMagnify( const Handle( V3d_View)& view,
109 const Standard_Integer hiwin,
110 const Standard_Integer lowin,
111 const Handle( V3d_View)& aPreviousView,
112 const Standard_Integer x1,
113 const Standard_Integer y1,
114 const Standard_Integer x2,
115 const Standard_Integer y2,
116 const Xw_WindowQuality quality = Xw_WQ_3DQUALITY );
117 static Handle_V3d_Viewer
118 Viewer3d( const Standard_CString display,
119 const Standard_ExtString name,
120 const Standard_CString domain = "",
121 const Quantity_Length ViewSize = 1000.0,
122 const V3d_TypeOfOrientation ViewProj = V3d_XposYnegZpos,
123 const Standard_Boolean ComputedMode = Standard_True,
124 const Standard_Boolean DefaultComputedMode = Standard_True );
126 static Handle_Aspect_WindowDriver
127 WindowDriver( const Standard_CString display,
128 const Standard_Integer hiwin,
129 const Standard_Integer lowin,
130 const Quantity_NameOfColor color = Quantity_NOC_GRAY69 );
131 /*static Handle_Aspect_WindowDriver
132 XdpsDriver( const Standard_CString display,
133 const Standard_Integer hiwin,
134 const Standard_Integer lowin,
135 const Quantity_NameOfColor color = Quantity_NOC_GRAY69 );
137 static Handle_Aspect_WindowDriver
138 ImageDriver( const Standard_CString display,
139 const Standard_Integer hiwin,
140 const Standard_Integer lowin,
141 const Quantity_NameOfColor color = Quantity_NOC_GRAY69 );