1 // Copyright (C) 2007-2008 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
22 #ifndef OCCVIEWER_VSERVICE_H
23 #define OCCVIEWER_VSERVICE_H
25 #ifndef _Handle_V3d_View_HeaderFile
26 #include <Handle_V3d_View.hxx>
28 #ifndef _Standard_Integer_HeaderFile
29 #include <Standard_Integer.hxx>
31 #ifndef _Xw_WindowQuality_HeaderFile
32 #include <Xw_WindowQuality.hxx>
34 #ifndef _Handle_V3d_Viewer_HeaderFile
35 #include <Handle_V3d_Viewer.hxx>
37 #ifndef _Standard_CString_HeaderFile
38 #include <Standard_CString.hxx>
40 #ifndef _Standard_ExtString_HeaderFile
41 #include <Standard_ExtString.hxx>
43 #ifndef _Quantity_Length_HeaderFile
44 #include <Quantity_Length.hxx>
46 #ifndef _Quantity_NameOfColor_HeaderFile
47 #include <Quantity_NameOfColor.hxx>
49 #ifndef _V3d_TypeOfOrientation_HeaderFile
50 #include <V3d_TypeOfOrientation.hxx>
52 #ifndef _Standard_Boolean_HeaderFile
53 #include <Standard_Boolean.hxx>
55 #ifndef _Handle_Graphic2d_View_HeaderFile
56 #include <Handle_Graphic2d_View.hxx>
58 #ifndef _Handle_Aspect_WindowDriver_HeaderFile
59 #include <Handle_Aspect_WindowDriver.hxx>
67 class Aspect_WindowDriver;
69 #ifndef _Standard_HeaderFile
70 #include <Standard.hxx>
72 #ifndef _Standard_Macro_HeaderFile
73 #include <Standard_Macro.hxx>
76 class Standard_EXPORT OCCViewer_VService
79 inline void* operator new(size_t,void* anAddress)
83 inline void* operator new(size_t size)
85 return Standard::Allocate(size);
87 inline void operator delete(void *anAddress)
89 if ( anAddress ) Standard::Free((Standard_Address&)anAddress);
93 static void SetWindow( const Handle( V3d_View )& view,
94 const Standard_Integer hiwin,
95 const Standard_Integer lowin,
96 const Xw_WindowQuality quality = Xw_WQ_3DQUALITY );
98 static void SetMagnify( const Handle( V3d_View)& view,
99 const Standard_Integer hiwin,
100 const Standard_Integer lowin,
101 const Handle( V3d_View)& aPreviousView,
102 const Standard_Integer x1,
103 const Standard_Integer y1,
104 const Standard_Integer x2,
105 const Standard_Integer y2,
106 const Xw_WindowQuality quality = Xw_WQ_3DQUALITY );
107 static Handle_V3d_Viewer
108 Viewer3d( const Standard_CString display,
109 const Standard_ExtString name,
110 const Standard_CString domain = "",
111 const Quantity_Length ViewSize = 1000.0,
112 const V3d_TypeOfOrientation ViewProj = V3d_XposYnegZpos,
113 const Standard_Boolean ComputedMode = Standard_True,
114 const Standard_Boolean DefaultComputedMode = Standard_True );
116 static Handle_Aspect_WindowDriver
117 WindowDriver( const Standard_CString display,
118 const Standard_Integer hiwin,
119 const Standard_Integer lowin,
120 const Quantity_NameOfColor color = Quantity_NOC_GRAY69 );
121 /*static Handle_Aspect_WindowDriver
122 XdpsDriver( const Standard_CString display,
123 const Standard_Integer hiwin,
124 const Standard_Integer lowin,
125 const Quantity_NameOfColor color = Quantity_NOC_GRAY69 );
127 static Handle_Aspect_WindowDriver
128 ImageDriver( const Standard_CString display,
129 const Standard_Integer hiwin,
130 const Standard_Integer lowin,
131 const Quantity_NameOfColor color = Quantity_NOC_GRAY69 );