Salome HOME
NRI : Merge from V1_2.
[modules/kernel.git] / src / OCCViewer / OCCViewer_VService.h
1 //  SALOME OCCViewer : build OCC Viewer into Salome desktop
2 //
3 //  Copyright (C) 2003  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : OCCViewer_VService.h
25 //  Module : SALOME
26
27 #ifndef _OCCViewer_VService_HeaderFile
28 #define _OCCViewer_VService_HeaderFile
29
30 #ifndef _Handle_V3d_View_HeaderFile
31 #include <Handle_V3d_View.hxx>
32 #endif
33 #ifndef _Handle_V2d_View_HeaderFile
34 #include <Handle_V2d_View.hxx>
35 #endif
36 #ifndef _Handle_V2d_Viewer_HeaderFile
37 #include <Handle_V2d_Viewer.hxx>
38 #endif
39 #ifndef _Standard_Integer_HeaderFile
40 #include <Standard_Integer.hxx>
41 #endif
42 #ifndef _Xw_WindowQuality_HeaderFile
43 #include <Xw_WindowQuality.hxx>
44 #endif
45 #ifndef _Handle_V3d_Viewer_HeaderFile
46 #include <Handle_V3d_Viewer.hxx>
47 #endif
48 #ifndef _Standard_CString_HeaderFile
49 #include <Standard_CString.hxx>
50 #endif
51 #ifndef _Standard_ExtString_HeaderFile
52 #include <Standard_ExtString.hxx>
53 #endif
54 #ifndef _Quantity_Length_HeaderFile
55 #include <Quantity_Length.hxx>
56 #endif
57 #ifndef _Quantity_NameOfColor_HeaderFile
58 #include <Quantity_NameOfColor.hxx>
59 #endif
60 #ifndef _V3d_TypeOfOrientation_HeaderFile
61 #include <V3d_TypeOfOrientation.hxx>
62 #endif
63 #ifndef _Standard_Boolean_HeaderFile
64 #include <Standard_Boolean.hxx>
65 #endif
66 #ifndef _Handle_Graphic2d_View_HeaderFile
67 #include <Handle_Graphic2d_View.hxx>
68 #endif
69 #ifndef _Handle_Aspect_WindowDriver_HeaderFile
70 #include <Handle_Aspect_WindowDriver.hxx>
71 #endif
72
73 class V3d_View;
74 class V3d_Viewer;
75
76 class V2d_View;
77 class V2d_Viewer;
78 class Graphic2d_View;
79 class Aspect_WindowDriver;
80
81 #ifndef _Standard_HeaderFile
82 #include <Standard.hxx>
83 #endif
84 #ifndef _Standard_Macro_HeaderFile
85 #include <Standard_Macro.hxx>
86 #endif
87
88 class OCCViewer_VService  {
89
90 public:
91
92     inline void* operator new(size_t,void* anAddress) 
93       {
94         return anAddress;
95       }
96     inline void* operator new(size_t size) 
97       { 
98         return Standard::Allocate(size); 
99       }
100     inline void  operator delete(void *anAddress) 
101       { 
102         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
103       }
104
105 // Methods PUBLIC
106 // 
107 Standard_EXPORT static  void SetWindow(const Handle(V3d_View)& aView,const Standard_Integer hiwin,const Standard_Integer lowin,const Xw_WindowQuality aQuality = Xw_WQ_3DQUALITY) ;
108 Standard_EXPORT static  void SetMagnify(const Handle(V3d_View)& aView,const Standard_Integer hiwin,const Standard_Integer lowin,const Handle(V3d_View)& aPreviousView,const Standard_Integer x1,const Standard_Integer y1,const Standard_Integer x2,const Standard_Integer y2,const Xw_WindowQuality aQuality = Xw_WQ_3DQUALITY) ;
109 Standard_EXPORT static  Handle_V3d_Viewer Viewer(const Standard_CString aDisplay,const Standard_ExtString aName,const Standard_CString aDomain = "",const Quantity_Length ViewSize = 1000.0,const V3d_TypeOfOrientation ViewProj = V3d_XposYnegZpos,const Standard_Boolean ComputedMode = Standard_True,const Standard_Boolean DefaultComputedMode = Standard_True) ;
110
111 Standard_EXPORT static  Handle_V2d_View XView(const Handle(V2d_Viewer)& aViewer,const Standard_Integer hiwin,const Standard_Integer lowin,const Xw_WindowQuality aQuality = Xw_WQ_DRAWINGQUALITY,const Standard_Boolean Update = Standard_True,const Quantity_NameOfColor BackColor = Quantity_NOC_MATRAGRAY) ;
112 Standard_EXPORT static  Handle_V2d_View XdpsView(const Handle(V2d_Viewer)& aViewer,const Standard_Integer hiwin,const Standard_Integer lowin,const Xw_WindowQuality aQuality = Xw_WQ_DRAWINGQUALITY,const Standard_Boolean Update = Standard_True,const Quantity_NameOfColor BackColor = Quantity_NOC_MATRAGRAY) ;
113 Standard_EXPORT static  Handle_V2d_Viewer Viewer(const Standard_CString aDisplay,const Standard_ExtString aName,const Standard_CString aDomain = "") ;
114 Standard_EXPORT static  Handle_V2d_Viewer Viewer(const Standard_CString aDisplay,const Handle(Graphic2d_View)& aView,const Standard_ExtString aName,const Standard_CString aDomain = "") ;
115 Standard_EXPORT static  Handle_Aspect_WindowDriver WindowDriver(const Standard_CString aDisplay,const Standard_Integer ahiwin,const Standard_Integer alowin,const Quantity_NameOfColor aColor = Quantity_NOC_GRAY69) ;
116 Standard_EXPORT static  Handle_Aspect_WindowDriver XdpsDriver(const Standard_CString aDisplay,const Standard_Integer ahiwin,const Standard_Integer alowin,const Quantity_NameOfColor aColor = Quantity_NOC_GRAY69) ;
117 Standard_EXPORT static  Handle_Aspect_WindowDriver ImageDriver(const Standard_CString aDisplay,const Standard_Integer ahiwin,const Standard_Integer alowin,const Quantity_NameOfColor aColor = Quantity_NOC_GRAY69) ;
118
119
120 protected:
121
122  // Methods PROTECTED
123  // 
124
125
126  // Fields PROTECTED
127  //
128
129
130 private: 
131
132  // Methods PRIVATE
133  // 
134
135
136  // Fields PRIVATE
137  //
138
139
140 };
141
142
143
144
145
146 // other inline functions and methods (like "C++: function call" methods)
147 //
148
149
150 #endif
151