1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/
19 #ifndef OCCVIEWER_VSERVICE_H
20 #define OCCVIEWER_VSERVICE_H
22 #ifndef _Handle_V3d_View_HeaderFile
23 #include <Handle_V3d_View.hxx>
25 #ifndef _Standard_Integer_HeaderFile
26 #include <Standard_Integer.hxx>
28 #ifndef _Xw_WindowQuality_HeaderFile
29 #include <Xw_WindowQuality.hxx>
31 #ifndef _Handle_V3d_Viewer_HeaderFile
32 #include <Handle_V3d_Viewer.hxx>
34 #ifndef _Standard_CString_HeaderFile
35 #include <Standard_CString.hxx>
37 #ifndef _Standard_ExtString_HeaderFile
38 #include <Standard_ExtString.hxx>
40 #ifndef _Quantity_Length_HeaderFile
41 #include <Quantity_Length.hxx>
43 #ifndef _Quantity_NameOfColor_HeaderFile
44 #include <Quantity_NameOfColor.hxx>
46 #ifndef _V3d_TypeOfOrientation_HeaderFile
47 #include <V3d_TypeOfOrientation.hxx>
49 #ifndef _Standard_Boolean_HeaderFile
50 #include <Standard_Boolean.hxx>
52 #ifndef _Handle_Graphic2d_View_HeaderFile
53 #include <Handle_Graphic2d_View.hxx>
55 #ifndef _Handle_Aspect_WindowDriver_HeaderFile
56 #include <Handle_Aspect_WindowDriver.hxx>
64 class Aspect_WindowDriver;
66 #ifndef _Standard_HeaderFile
67 #include <Standard.hxx>
69 #ifndef _Standard_Macro_HeaderFile
70 #include <Standard_Macro.hxx>
73 class Standard_EXPORT OCCViewer_VService
76 inline void* operator new(size_t,void* anAddress)
80 inline void* operator new(size_t size)
82 return Standard::Allocate(size);
84 inline void operator delete(void *anAddress)
86 if ( anAddress ) Standard::Free((Standard_Address&)anAddress);
90 static void SetWindow( const Handle( V3d_View )& view,
91 const Standard_Integer hiwin,
92 const Standard_Integer lowin,
93 const Xw_WindowQuality quality = Xw_WQ_3DQUALITY );
95 static void SetMagnify( const Handle( V3d_View)& view,
96 const Standard_Integer hiwin,
97 const Standard_Integer lowin,
98 const Handle( V3d_View)& aPreviousView,
99 const Standard_Integer x1,
100 const Standard_Integer y1,
101 const Standard_Integer x2,
102 const Standard_Integer y2,
103 const Xw_WindowQuality quality = Xw_WQ_3DQUALITY );
104 static Handle_V3d_Viewer
105 Viewer3d( const Standard_CString display,
106 const Standard_ExtString name,
107 const Standard_CString domain = "",
108 const Quantity_Length ViewSize = 1000.0,
109 const V3d_TypeOfOrientation ViewProj = V3d_XposYnegZpos,
110 const Standard_Boolean ComputedMode = Standard_True,
111 const Standard_Boolean DefaultComputedMode = Standard_True );
113 static Handle_Aspect_WindowDriver
114 WindowDriver( const Standard_CString display,
115 const Standard_Integer hiwin,
116 const Standard_Integer lowin,
117 const Quantity_NameOfColor color = Quantity_NOC_GRAY69 );
118 static Handle_Aspect_WindowDriver
119 XdpsDriver( const Standard_CString display,
120 const Standard_Integer hiwin,
121 const Standard_Integer lowin,
122 const Quantity_NameOfColor color = Quantity_NOC_GRAY69 );
123 static Handle_Aspect_WindowDriver
124 ImageDriver( const Standard_CString display,
125 const Standard_Integer hiwin,
126 const Standard_Integer lowin,
127 const Quantity_NameOfColor color = Quantity_NOC_GRAY69 );