Salome HOME
Copyrights update
[modules/gui.git] / src / OCCViewer / OCCViewer_VService.h
1 // Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
2 // 
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.
7 // 
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/
18 //
19 #ifndef OCCVIEWER_VSERVICE_H
20 #define OCCVIEWER_VSERVICE_H
21
22 #ifndef _Handle_V3d_View_HeaderFile
23 #include <Handle_V3d_View.hxx>
24 #endif
25 #ifndef _Standard_Integer_HeaderFile
26 #include <Standard_Integer.hxx>
27 #endif
28 #ifndef _Xw_WindowQuality_HeaderFile
29 #include <Xw_WindowQuality.hxx>
30 #endif
31 #ifndef _Handle_V3d_Viewer_HeaderFile
32 #include <Handle_V3d_Viewer.hxx>
33 #endif
34 #ifndef _Standard_CString_HeaderFile
35 #include <Standard_CString.hxx>
36 #endif
37 #ifndef _Standard_ExtString_HeaderFile
38 #include <Standard_ExtString.hxx>
39 #endif
40 #ifndef _Quantity_Length_HeaderFile
41 #include <Quantity_Length.hxx>
42 #endif
43 #ifndef _Quantity_NameOfColor_HeaderFile
44 #include <Quantity_NameOfColor.hxx>
45 #endif
46 #ifndef _V3d_TypeOfOrientation_HeaderFile
47 #include <V3d_TypeOfOrientation.hxx>
48 #endif
49 #ifndef _Standard_Boolean_HeaderFile
50 #include <Standard_Boolean.hxx>
51 #endif
52 #ifndef _Handle_Graphic2d_View_HeaderFile
53 #include <Handle_Graphic2d_View.hxx>
54 #endif
55 #ifndef _Handle_Aspect_WindowDriver_HeaderFile
56 #include <Handle_Aspect_WindowDriver.hxx>
57 #endif
58
59 class V3d_View;
60 class V2d_View;
61 class V3d_Viewer;
62 class V2d_Viewer;
63 class Graphic2d_View;
64 class Aspect_WindowDriver;
65
66 #ifndef _Standard_HeaderFile
67 #include <Standard.hxx>
68 #endif
69 #ifndef _Standard_Macro_HeaderFile
70 #include <Standard_Macro.hxx>
71 #endif
72
73 class Standard_EXPORT OCCViewer_VService
74 {
75 public:
76     inline void* operator new(size_t,void* anAddress)
77     {
78         return anAddress;
79     }
80     inline void* operator new(size_t size)
81     {
82         return Standard::Allocate(size);
83     }
84     inline void  operator delete(void *anAddress)
85     {
86         if ( anAddress ) Standard::Free((Standard_Address&)anAddress);
87     }
88
89     // STATIC METHODS
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 );
94
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 );
112
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 );
128
129 };
130
131 #endif