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 // File: SALOME_Prs.cxx
20 // Created: Wed Apr 28 15:03:43 2004
21 // Author: Sergey ANIKIN
22 // <san@startrex.nnov.opencascade.com>
25 #include "SALOME_Prs.h"
27 //#include "utilities.h"
29 //using namespace std;
31 //===========================================================
33 * Function: SALOME_OCCPrs::DisplayIn \n
34 * Purpose: Dispatches display operation to proper Display() \n
35 * method of SALOME_View
37 //===========================================================
38 void SALOME_OCCPrs::DisplayIn( SALOME_View* v ) const
40 if ( v ) v->Display( this );
43 //===========================================================
45 * Function: SALOME_OCCPrs::EraseIn \n
46 * Purpose: Dispatches display operation to proper Erase() \n
47 * method of SALOME_View
49 //===========================================================
50 void SALOME_OCCPrs::EraseIn( SALOME_View* v, const bool forced ) const
52 if ( v ) v->Erase( this, forced );
55 //===========================================================
57 * Function: SALOME_OCCPrs::LocalSelectionIn \n
58 * Purpose: Dispatches operation to proper LocalSelectionIn() \n
59 * method of SALOME_View
61 //===========================================================
62 void SALOME_OCCPrs::LocalSelectionIn( SALOME_View* v, const int mode ) const
64 if ( v ) v->LocalSelection( this, mode );
67 //===========================================================
69 * Function: SALOME_OCCPrs::Update \n
70 * Purpose: Dispatches update operation to proper Update() \n
71 * method of SALOME_Displayer
73 //===========================================================
74 void SALOME_OCCPrs::Update( SALOME_Displayer* d )
76 if ( d ) d->Update( this );
79 //===========================================================
81 * Function: SALOME_VTKPrs::DisplayIn \n
82 * Purpose: Dispatches display operation to proper Display() \n
83 * method of SALOME_View
85 //===========================================================
86 void SALOME_VTKPrs::DisplayIn( SALOME_View* v ) const
88 if ( v ) v->Display( this );
91 //===========================================================
93 * Function: SALOME_VTKPrs::EraseIn \n
94 * Purpose: Dispatches display operation to proper Erase() \n
95 * method of SALOME_View
97 //===========================================================
98 void SALOME_VTKPrs::EraseIn( SALOME_View* v, const bool forced ) const
100 if ( v ) v->Erase( this, forced );
103 //===========================================================
105 * Function: SALOME_VTKPrs::LocalSelectionIn \n
106 * Purpose: Dispatches operation to proper LocalSelectionIn() \n
107 * method of SALOME_View
109 //===========================================================
110 void SALOME_VTKPrs::LocalSelectionIn( SALOME_View* v, const int mode ) const
112 if ( v ) v->LocalSelection( this, mode );
115 //===========================================================
117 * Function: SALOME_VTKPrs::Update \n
118 * Purpose: Dispatches update operation to proper Update() \n
119 * method of SALOME_Displayer
121 //===========================================================
122 void SALOME_VTKPrs::Update( SALOME_Displayer* d )
124 if ( d ) d->Update( this );
127 //===========================================================
129 * Function: SALOME_Prs2d::DisplayIn \n
130 * Purpose: Dispatches display operation to proper Display() \n
131 * method of SALOME_View
133 //===========================================================
134 void SALOME_Prs2d::DisplayIn( SALOME_View* v ) const
136 if ( v ) v->Display( this );
139 //===========================================================
141 * Function: SALOME_Prs2d::EraseIn \n
142 * Purpose: Dispatches display operation to proper Erase() \n
143 * method of SALOME_View
145 //===========================================================
146 void SALOME_Prs2d::EraseIn( SALOME_View* v, const bool forced ) const
148 if ( v ) v->Erase( this, forced );
151 //===========================================================
153 * Function: SALOME_Prs2d::LocalSelectionIn \n
154 * Purpose: Dispatches operation to proper LocalSelectionIn() \n
155 * method of SALOME_View
157 //===========================================================
158 void SALOME_Prs2d::LocalSelectionIn( SALOME_View* v, const int mode ) const
160 if ( v ) v->LocalSelection( this, mode );
163 //===========================================================
165 * Function: SALOME_Prs2d::Update \n
166 * Purpose: Dispatches update operation to proper Update() \n
167 * method of SALOME_Displayer
169 //===========================================================
170 void SALOME_Prs2d::Update( SALOME_Displayer* d )
172 if ( d ) d->Update( this );
175 //===========================================================
177 * Function: SALOME_View::Display \n
178 * Purpose: Gives control to SALOME_Prs object, so that \n
179 * it could perform double dispatch
181 //===========================================================
182 void SALOME_View::Display( const SALOME_Prs* prs )
184 prs->DisplayIn( this );
187 //===========================================================
189 * Function: SALOME_View::Erase \n
190 * Purpose: Gives control to SALOME_Prs object, so that \n
191 * it could perform double dispatch
193 //===========================================================
194 void SALOME_View::Erase( const SALOME_Prs* prs, const bool forced )
196 prs->EraseIn( this, forced );
199 //===========================================================
201 * Function: SALOME_View::LocalSelection \n
202 * Purpose: Gives control to SALOME_Prs object, so that \n
203 * it could perform double dispatch
205 //===========================================================
206 void SALOME_View::LocalSelection( const SALOME_Prs* prs, const int mode )
208 prs->LocalSelectionIn( this, mode );
211 //===========================================================
213 * Function: SALOME_View::Display \n
214 * Purpose: Virtual method, should be reimplemented in successors, \n
215 * by default issues a warning and does nothing.
217 //===========================================================
218 void SALOME_View::Display( const SALOME_OCCPrs* )
220 // MESSAGE( "SALOME_View::Display( const SALOME_OCCPrs& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
223 //===========================================================
225 * Function: SALOME_View::Display \n
226 * Purpose: Virtual method, should be reimplemented in successors, \n
227 * by default issues a warning and does nothing.
229 //===========================================================
230 void SALOME_View::Display( const SALOME_VTKPrs* )
232 // MESSAGE( "SALOME_View::Display( const SALOME_VTKPrs& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
235 //===========================================================
237 * Function: SALOME_View::Display \n
238 * Purpose: Virtual method, should be reimplemented in successors, \n
239 * by default issues a warning and does nothing.
241 //===========================================================
242 void SALOME_View::Display( const SALOME_Prs2d* )
244 // MESSAGE( "SALOME_View::Display( const SALOME_Prs2d& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
247 //===========================================================
249 * Function: SALOME_View::Erase \n
250 * Purpose: Virtual method, should be reimplemented in successors, \n
251 * by default issues a warning and does nothing.
253 //===========================================================
254 void SALOME_View::Erase( const SALOME_OCCPrs*, const bool )
256 // MESSAGE( "SALOME_View::Erase( const SALOME_OCCPrs& ) called! Probably, presentation is being erased in uncompatible viewframe." );
259 //===========================================================
261 * Function: SALOME_View::Erase \n
262 * Purpose: Virtual method, should be reimplemented in successors, \n
263 * by default issues a warning and does nothing.
265 //===========================================================
266 void SALOME_View::Erase( const SALOME_VTKPrs*, const bool )
268 // MESSAGE( "SALOME_View::Erase( const SALOME_VTKPrs& ) called! Probably, presentation is being erased in uncompatible viewframe." );
271 //===========================================================
273 * Function: SALOME_View::Erase \n
274 * Purpose: Virtual method, should be reimplemented in successors, \n
275 * by default issues a warning and does nothing.
277 //===========================================================
278 void SALOME_View::Erase( const SALOME_Prs2d*, const bool )
280 // MESSAGE( "SALOME_View::Erase( const SALOME_Prs2d& ) called! Probably, presentation is being erased in uncompatible viewframe." );
283 //===========================================================
285 * Function: SALOME_View::EraseAll \n
286 * Purpose: Virtual method, should be reimplemented in successors, \n
287 * by default issues a warning and does nothing.
289 //===========================================================
290 void SALOME_View::EraseAll( const bool )
292 // MESSAGE( "SALOME_View::EraseAll() called!" );
295 //===========================================================
297 * Function: SALOME_View::LocalSelection \n
298 * Purpose: Virtual method, should be reimplemented in successors, \n
299 * by default issues a warning and does nothing.
301 //===========================================================
302 void SALOME_View::LocalSelection( const SALOME_OCCPrs*, const int )
304 // MESSAGE( "SALOME_View::LocalSelection( const SALOME_OCCPrs* ) called! \
305 // Probably, selection is being activated in uncompatible viewframe." );
308 //===========================================================
310 * Function: SALOME_View::LocalSelection \n
311 * Purpose: Virtual method, should be reimplemented in successors, \n
312 * by default issues a warning and does nothing.
314 //===========================================================
315 void SALOME_View::LocalSelection( const SALOME_VTKPrs*, const int )
317 // MESSAGE( "SALOME_View::LocalSelection( const SALOME_VTKPrs* ) called! \
318 // Probably, selection is being activated in uncompatible viewframe." );
321 //===========================================================
323 * Function: SALOME_View::LocalSelection \n
324 * Purpose: Virtual method, should be reimplemented in successors, \n
325 * by default issues a warning and does nothing.
327 //===========================================================
328 void SALOME_View::LocalSelection( const SALOME_Prs2d*, const int )
330 // MESSAGE( "SALOME_View::LocalSelection( const SALOME_Prs2d* ) called! \
331 // Probably, selection is being activated in uncompatible viewframe." );
334 //===========================================================
336 * Function: SALOME_View::GlobalSelection \n
337 * Purpose: Virtual method, should be reimplemented in successors, \n
338 * by default issues a warning and does nothing.
340 //===========================================================
341 void SALOME_View::GlobalSelection( const bool ) const
343 // MESSAGE( "SALOME_View::GlobalSelection() called! \
344 // Probably, selection is being activated in uncompatible viewframe." );
347 //===========================================================
349 * Function: SALOME_Displayer::UpdatePrs \n
350 * Purpose: Gives control to SALOME_Prs object, so that \n
351 * it could perform double dispatch
353 //===========================================================
354 void SALOME_Displayer::UpdatePrs( SALOME_Prs* prs )
359 //===========================================================
361 * Function: SALOME_Displayer::Update \n
362 * Purpose: Virtual method, should be reimplemented in successors, \n
363 * by default issues a warning and does nothing.
365 //===========================================================
366 void SALOME_Displayer::Update( SALOME_OCCPrs* )
368 // MESSAGE( "SALOME_Displayer::Update( SALOME_OCCPrs* ) called! Probably, presentation is being updated in uncompatible viewframe." );
371 //===========================================================
373 * Function: SALOME_Displayer::Update \n
374 * Purpose: Virtual method, should be reimplemented in successors, \n
375 * by default issues a warning and does nothing.
377 //===========================================================
378 void SALOME_Displayer::Update( SALOME_VTKPrs* )
380 // MESSAGE( "SALOME_Displayer::Update( SALOME_VTKPrs* ) called! Probably, presentation is being updated in uncompatible viewframe." );
383 //===========================================================
385 * Function: SALOME_Displayer::Update \n
386 * Purpose: Virtual method, should be reimplemented in successors, \n
387 * by default issues a warning and does nothing.
389 //===========================================================
390 void SALOME_Displayer::Update( SALOME_Prs2d* )
392 // MESSAGE( "SALOME_Displayer::Update( SALOME_Prs2d* ) called! Probably, presentation is being updated in uncompatible viewframe." );