Salome HOME
693c6e6d36812850d4309e28aecd95add87495ec
[modules/gui.git] / src / Prs / SALOME_Prs.cxx
1 //  Copyright (C) 2007-2008  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 // File:        SALOME_Prs.cxx
23 // Created:     Wed Apr 28 15:03:43 2004
24 // Author:      Sergey ANIKIN
25 //              <san@startrex.nnov.opencascade.com>
26 //
27 #include "SALOME_Prs.h"
28
29 //#include "utilities.h"
30
31 //using namespace std;
32
33 /*!
34   Dispatches display operation to proper Display() method of SALOME_View
35 */
36 void SALOME_OCCPrs::DisplayIn( SALOME_View* v ) const
37 {
38   if ( v ) v->Display( this );
39 }
40
41 /*!
42   Dispatches display operation to proper Erase() method of SALOME_View
43 */
44 void SALOME_OCCPrs::EraseIn( SALOME_View* v, const bool forced ) const
45 {
46   if ( v ) v->Erase( this, forced );
47 }
48
49 /*!
50   Dispatches operation to proper LocalSelectionIn() method of SALOME_View
51 */
52 void SALOME_OCCPrs::LocalSelectionIn( SALOME_View* v, const int mode ) const
53 {
54   if ( v ) v->LocalSelection( this, mode );
55 }
56
57 /*!
58    Dispatches update operation to proper Update() method of SALOME_Displayer
59 */
60 void SALOME_OCCPrs::Update( SALOME_Displayer* d )
61 {
62   if ( d ) d->Update( this );
63 }
64
65 /*!
66   Dispatches display operation to proper Display() method of SALOME_View
67 */
68 void SALOME_VTKPrs::DisplayIn( SALOME_View* v ) const
69 {
70   if ( v ) v->Display( this );
71 }
72
73 /*!
74   Dispatches display operation to proper Erase() method of SALOME_View
75 */
76 void SALOME_VTKPrs::EraseIn( SALOME_View* v, const bool forced ) const
77 {
78   if ( v ) v->Erase( this, forced );
79 }
80
81 /*!
82   Dispatches operation to proper LocalSelectionIn() method of SALOME_View
83 */
84 void SALOME_VTKPrs::LocalSelectionIn( SALOME_View* v, const int mode ) const
85 {
86   if ( v ) v->LocalSelection( this, mode );
87 }
88
89 /*!
90   Dispatches update operation to proper Update() method of SALOME_Displayer
91 */
92 void SALOME_VTKPrs::Update( SALOME_Displayer* d )
93 {
94   if ( d ) d->Update( this );
95 }
96
97 /*!
98   Dispatches display operation to proper Display() method of SALOME_View
99 */
100 void SALOME_Prs2d::DisplayIn( SALOME_View* v ) const
101 {
102   if ( v ) v->Display( this );
103 }
104
105 /*!
106   Dispatches display operation to proper Erase() method of SALOME_View
107 */
108 void SALOME_Prs2d::EraseIn( SALOME_View* v, const bool forced ) const
109 {
110   if ( v ) v->Erase( this, forced );
111 }
112
113 /*!
114   Dispatches operation to proper LocalSelectionIn() method of SALOME_View
115 */
116 void SALOME_Prs2d::LocalSelectionIn( SALOME_View* v, const int mode ) const
117 {
118   if ( v ) v->LocalSelection( this, mode );
119 }
120
121 /*!
122   Dispatches update operation to proper Update() method of SALOME_Displayer
123 */
124 void SALOME_Prs2d::Update( SALOME_Displayer* d )
125 {
126   if ( d ) d->Update( this );
127 }
128
129 /*!
130   Gives control to SALOME_Prs object, so that it could perform double dispatch
131 */
132 void SALOME_View::Display( const SALOME_Prs* prs )
133 {
134   prs->DisplayIn( this );
135 }
136
137 /*!
138   Gives control to SALOME_Prs object, so that it could perform double dispatch
139 */
140 void SALOME_View::Erase( const SALOME_Prs* prs, const bool forced )
141 {
142   prs->EraseIn( this, forced );
143 }
144
145 /*!
146   Gives control to SALOME_Prs object, so that it could perform double dispatch
147 */
148 void SALOME_View::LocalSelection( const SALOME_Prs* prs, const int mode )
149 {
150   prs->LocalSelectionIn( this, mode );
151 }
152
153 /*!
154   Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
155 */
156 void SALOME_View::Display( const SALOME_OCCPrs* )
157 {
158 //  MESSAGE( "SALOME_View::Display( const SALOME_OCCPrs& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
159 }
160
161 /*!
162   Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
163 */
164 void SALOME_View::Display( const SALOME_VTKPrs* )
165 {
166 //  MESSAGE( "SALOME_View::Display( const SALOME_VTKPrs& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
167 }
168
169 /*!
170   Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
171 */
172 void SALOME_View::Display( const SALOME_Prs2d* )
173 {
174 //  MESSAGE( "SALOME_View::Display( const SALOME_Prs2d& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
175 }
176
177 /*!
178   Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
179 */
180 void SALOME_View::Erase( const SALOME_OCCPrs*, const bool )
181 {
182 //  MESSAGE( "SALOME_View::Erase( const SALOME_OCCPrs& ) called! Probably, presentation is being erased in uncompatible viewframe." );
183 }
184
185 /*!
186   Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
187 */
188 void SALOME_View::Erase( const SALOME_VTKPrs*, const bool )
189 {
190 //  MESSAGE( "SALOME_View::Erase( const SALOME_VTKPrs& ) called! Probably, presentation is being erased in uncompatible viewframe." );
191 }
192
193 /*!
194   Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
195 */
196 void SALOME_View::Erase( const SALOME_Prs2d*, const bool )
197 {
198 //  MESSAGE( "SALOME_View::Erase( const SALOME_Prs2d& ) called! Probably, presentation is being erased in uncompatible viewframe." );
199 }
200
201 /*!
202   Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
203 */
204 void SALOME_View::EraseAll( const bool )
205 {
206 //  MESSAGE( "SALOME_View::EraseAll() called!" );
207 }
208
209 /*!
210   Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
211 */
212 void SALOME_View::LocalSelection( const SALOME_OCCPrs*, const int )
213 {
214 //  MESSAGE( "SALOME_View::LocalSelection( const SALOME_OCCPrs* ) called!
215 //   Probably, selection is being activated in uncompatible viewframe." );
216 }
217
218 /*!
219   Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
220 */
221 void SALOME_View::LocalSelection( const SALOME_VTKPrs*, const int )
222 {
223 //  MESSAGE( "SALOME_View::LocalSelection( const SALOME_VTKPrs* ) called!
224 //   Probably, selection is being activated in uncompatible viewframe." );
225 }
226
227 /*!
228   Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
229 */
230 void SALOME_View::LocalSelection( const SALOME_Prs2d*, const int )
231 {
232 //  MESSAGE( "SALOME_View::LocalSelection( const SALOME_Prs2d* ) called!
233 //   Probably, selection is being activated in uncompatible viewframe." );
234 }
235
236 /*!
237   Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
238 */
239 void SALOME_View::GlobalSelection( const bool ) const
240 {
241 //  MESSAGE( "SALOME_View::GlobalSelection() called!
242 //   Probably, selection is being activated in uncompatible viewframe." );
243 }
244
245 /*!
246   Gives control to SALOME_Prs object, so that it could perform double dispatch
247 */
248 void SALOME_Displayer::UpdatePrs( SALOME_Prs* prs )
249 {
250   prs->Update( this );
251 }
252
253 /*!
254   Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
255 */
256 void SALOME_Displayer::Update( SALOME_OCCPrs* )
257 {
258 //  MESSAGE( "SALOME_Displayer::Update( SALOME_OCCPrs* ) called! Probably, presentation is being updated in uncompatible viewframe." );
259 }
260
261 /*!
262   Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
263 */
264 void SALOME_Displayer::Update( SALOME_VTKPrs* )
265 {
266 //  MESSAGE( "SALOME_Displayer::Update( SALOME_VTKPrs* ) called! Probably, presentation is being updated in uncompatible viewframe." );
267 }
268
269 /*!
270   Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
271 */
272 void SALOME_Displayer::Update( SALOME_Prs2d* )
273 {
274 //  MESSAGE( "SALOME_Displayer::Update( SALOME_Prs2d* ) called! Probably, presentation is being updated in uncompatible viewframe." );
275 }
276