]> SALOME platform Git repositories - modules/gui.git/blob - src/OCCViewer/OCCViewer_VService.h
Salome HOME
06af9e043ee9ea7d0ba0cfb51aee35d2a278e27b
[modules/gui.git] / src / OCCViewer / OCCViewer_VService.h
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #ifndef OCCVIEWER_VSERVICE_H
24 #define OCCVIEWER_VSERVICE_H
25
26 #ifndef _Handle_V3d_View_HeaderFile
27 #include <Handle_V3d_View.hxx>
28 #endif
29 #ifndef _Standard_Integer_HeaderFile
30 #include <Standard_Integer.hxx>
31 #endif
32 #ifndef _Xw_WindowQuality_HeaderFile
33 #include <Xw_WindowQuality.hxx>
34 #endif
35 #ifndef _Handle_V3d_Viewer_HeaderFile
36 #include <Handle_V3d_Viewer.hxx>
37 #endif
38 #ifndef _Standard_CString_HeaderFile
39 #include <Standard_CString.hxx>
40 #endif
41 #ifndef _Standard_ExtString_HeaderFile
42 #include <Standard_ExtString.hxx>
43 #endif
44 #ifndef _Quantity_Length_HeaderFile
45 #include <Quantity_Length.hxx>
46 #endif
47 #ifndef _Quantity_NameOfColor_HeaderFile
48 #include <Quantity_NameOfColor.hxx>
49 #endif
50 #ifndef _V3d_TypeOfOrientation_HeaderFile
51 #include <V3d_TypeOfOrientation.hxx>
52 #endif
53 #ifndef _Standard_Boolean_HeaderFile
54 #include <Standard_Boolean.hxx>
55 #endif
56 #ifndef _Handle_Graphic2d_View_HeaderFile
57 #include <Handle_Graphic2d_View.hxx>
58 #endif
59 #ifndef _Handle_Aspect_WindowDriver_HeaderFile
60 #include <Handle_Aspect_WindowDriver.hxx>
61 #endif
62 #ifndef _Handle_Aspect_Window_HeaderFile
63 #include <Handle_Aspect_Window.hxx>
64 #endif
65
66 class V3d_View;
67 class V2d_View;
68 class V3d_Viewer;
69 class V2d_Viewer;
70 class Graphic2d_View;
71 class Aspect_WindowDriver;
72
73 #ifndef _Standard_HeaderFile
74 #include <Standard.hxx>
75 #endif
76 #ifndef _Standard_Macro_HeaderFile
77 #include <Standard_Macro.hxx>
78 #endif
79
80 class Standard_EXPORT OCCViewer_VService
81 {
82 public:
83     inline void* operator new(size_t,void* anAddress)
84     {
85         return anAddress;
86     }
87     inline void* operator new(size_t size)
88     {
89         return Standard::Allocate(size);
90     }
91     inline void  operator delete(void *anAddress)
92     {
93         if ( anAddress ) Standard::Free((Standard_Address&)anAddress);
94     }
95
96     // STATIC METHODS
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 );
102
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 );
107
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 );
125
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 );
136     */
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 );
142
143 };
144
145 #endif