1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File: SALOME_Prs.cxx
24 // Author: Sergey ANIKIN, Open CASCADE S.A.S. (sergey.anikin@opencascade.com)
26 #include "SALOME_Prs.h"
29 Dispatches display operation to proper Display() method of SALOME_View
31 void SALOME_OCCPrs::DisplayIn( SALOME_View* v ) const
33 if ( v ) v->Display( this );
37 Dispatches display operation to proper Erase() method of SALOME_View
39 void SALOME_OCCPrs::EraseIn( SALOME_View* v, const bool forced ) const
41 if ( v ) v->Erase( this, forced );
45 Dispatches display operation to proper BeforeDisplay() method of SALOME_Displayer
47 void SALOME_OCCPrs::BeforeDisplayIn( SALOME_Displayer* d, SALOME_View* v ) const
49 d->BeforeDisplay( v, this );
53 Dispatches display operation to proper AfterDisplay() method of SALOME_Displayer
55 void SALOME_OCCPrs::AfterDisplayIn( SALOME_Displayer* d, SALOME_View* v ) const
57 d->AfterDisplay( v, this );
61 Dispatches display operation to proper BeforeErase() method of SALOME_Displayer
63 void SALOME_OCCPrs::BeforeEraseIn( SALOME_Displayer* d, SALOME_View* v ) const
65 d->BeforeErase( v, this );
69 Dispatches display operation to proper AfterErase() method of SALOME_Displayer
71 void SALOME_OCCPrs::AfterEraseIn( SALOME_Displayer* d, SALOME_View* v ) const
73 d->AfterErase( v, this );
77 Dispatches operation to proper LocalSelectionIn() method of SALOME_View
79 void SALOME_OCCPrs::LocalSelectionIn( SALOME_View* v, const int mode ) const
81 if ( v ) v->LocalSelection( this, mode );
85 Dispatches update operation to proper Update() method of SALOME_Displayer
87 void SALOME_OCCPrs::Update( SALOME_Displayer* d )
89 if ( d ) d->Update( this );
93 Dispatches display operation to proper Display() method of SALOME_View
95 void SALOME_VTKPrs::DisplayIn( SALOME_View* v ) const
97 if ( v ) v->Display( this );
101 Dispatches display operation to proper Erase() method of SALOME_View
103 void SALOME_VTKPrs::EraseIn( SALOME_View* v, const bool forced ) const
105 if ( v ) v->Erase( this, forced );
109 Dispatches display operation to proper BeforeDisplay() method of SALOME_Displayer
111 void SALOME_VTKPrs::BeforeDisplayIn( SALOME_Displayer* d, SALOME_View* v ) const
113 d->BeforeDisplay( v, this );
117 Dispatches display operation to proper AfterDisplay() method of SALOME_Displayer
119 void SALOME_VTKPrs::AfterDisplayIn( SALOME_Displayer* d, SALOME_View* v ) const
121 d->AfterDisplay( v, this );
125 Dispatches display operation to proper BeforeErase() method of SALOME_Displayer
127 void SALOME_VTKPrs::BeforeEraseIn( SALOME_Displayer* d, SALOME_View* v ) const
129 d->BeforeErase( v, this );
133 Dispatches display operation to proper AfterErase() method of SALOME_Displayer
135 void SALOME_VTKPrs::AfterEraseIn( SALOME_Displayer* d, SALOME_View* v ) const
137 d->AfterErase( v, this );
141 Dispatches operation to proper LocalSelectionIn() method of SALOME_View
143 void SALOME_VTKPrs::LocalSelectionIn( SALOME_View* v, const int mode ) const
145 if ( v ) v->LocalSelection( this, mode );
149 Dispatches update operation to proper Update() method of SALOME_Displayer
151 void SALOME_VTKPrs::Update( SALOME_Displayer* d )
153 if ( d ) d->Update( this );
157 Dispatches display operation to proper Display() method of SALOME_View
159 void SALOME_Prs2d::DisplayIn( SALOME_View* v ) const
161 if ( v ) v->Display( this );
165 Dispatches display operation to proper Erase() method of SALOME_View
167 void SALOME_Prs2d::EraseIn( SALOME_View* v, const bool forced ) const
169 if ( v ) v->Erase( this, forced );
173 Dispatches display operation to proper BeforeDisplay() method of SALOME_Displayer
175 void SALOME_Prs2d::BeforeDisplayIn( SALOME_Displayer* d, SALOME_View* v ) const
177 d->BeforeDisplay( v, this );
181 Dispatches display operation to proper AfterDisplay() method of SALOME_Displayer
183 void SALOME_Prs2d::AfterDisplayIn( SALOME_Displayer* d, SALOME_View* v ) const
185 d->AfterDisplay( v, this );
189 Dispatches display operation to proper BeforeErase() method of SALOME_Displayer
191 void SALOME_Prs2d::BeforeEraseIn( SALOME_Displayer* d, SALOME_View* v ) const
193 d->BeforeErase( v, this );
197 Dispatches display operation to proper AfterErase() method of SALOME_Displayer
199 void SALOME_Prs2d::AfterEraseIn( SALOME_Displayer* d, SALOME_View* v ) const
201 d->AfterErase( v, this );
205 Dispatches operation to proper LocalSelectionIn() method of SALOME_View
207 void SALOME_Prs2d::LocalSelectionIn( SALOME_View* v, const int mode ) const
209 if ( v ) v->LocalSelection( this, mode );
213 Dispatches update operation to proper Update() method of SALOME_Displayer
215 void SALOME_Prs2d::Update( SALOME_Displayer* d )
217 if ( d ) d->Update( this );
221 Gives control to SALOME_Prs object, so that it could perform double dispatch
223 void SALOME_View::Display( const SALOME_Prs* prs )
225 prs->DisplayIn( this );
229 Gives control to SALOME_Prs object, so that it could perform double dispatch
231 void SALOME_View::Erase( const SALOME_Prs* prs, const bool forced )
233 prs->EraseIn( this, forced );
237 Gives control to SALOME_Prs object, so that it could perform double dispatch
239 void SALOME_View::LocalSelection( const SALOME_Prs* prs, const int mode )
241 prs->LocalSelectionIn( this, mode );
245 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
247 void SALOME_View::Display( const SALOME_OCCPrs* )
249 // MESSAGE( "SALOME_View::Display( const SALOME_OCCPrs& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
253 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
255 void SALOME_View::Display( const SALOME_VTKPrs* )
257 // MESSAGE( "SALOME_View::Display( const SALOME_VTKPrs& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
261 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
263 void SALOME_View::Display( const SALOME_Prs2d* )
265 // MESSAGE( "SALOME_View::Display( const SALOME_Prs2d& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
269 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
271 void SALOME_View::Erase( const SALOME_OCCPrs*, const bool )
273 // MESSAGE( "SALOME_View::Erase( const SALOME_OCCPrs& ) called! Probably, presentation is being erased in uncompatible viewframe." );
277 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
279 void SALOME_View::Erase( const SALOME_VTKPrs*, const bool )
281 // MESSAGE( "SALOME_View::Erase( const SALOME_VTKPrs& ) called! Probably, presentation is being erased in uncompatible viewframe." );
285 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
287 void SALOME_View::Erase( const SALOME_Prs2d*, const bool )
289 // MESSAGE( "SALOME_View::Erase( const SALOME_Prs2d& ) called! Probably, presentation is being erased in uncompatible viewframe." );
293 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
295 void SALOME_View::EraseAll( const bool )
297 // MESSAGE( "SALOME_View::EraseAll() called!" );
301 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
303 void SALOME_View::LocalSelection( const SALOME_OCCPrs*, const int )
305 // MESSAGE( "SALOME_View::LocalSelection( const SALOME_OCCPrs* ) called!
306 // Probably, selection is being activated in uncompatible viewframe." );
310 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
312 void SALOME_View::LocalSelection( const SALOME_VTKPrs*, const int )
314 // MESSAGE( "SALOME_View::LocalSelection( const SALOME_VTKPrs* ) called!
315 // Probably, selection is being activated in uncompatible viewframe." );
319 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
321 void SALOME_View::LocalSelection( const SALOME_Prs2d*, const int )
323 // MESSAGE( "SALOME_View::LocalSelection( const SALOME_Prs2d* ) called!
324 // Probably, selection is being activated in uncompatible viewframe." );
328 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
330 void SALOME_View::GlobalSelection( const bool ) const
332 // MESSAGE( "SALOME_View::GlobalSelection() called!
333 // Probably, selection is being activated in uncompatible viewframe." );
336 void SALOME_View::BeforeDisplay( SALOME_Displayer* d, const SALOME_Prs* p )
338 p->BeforeDisplayIn( d, this );
341 void SALOME_View::AfterDisplay( SALOME_Displayer* d, const SALOME_Prs* p )
343 p->AfterDisplayIn( d, this );
346 void SALOME_View::BeforeErase( SALOME_Displayer* d, const SALOME_Prs* p )
348 p->BeforeEraseIn( d, this );
351 void SALOME_View::AfterErase ( SALOME_Displayer* d, const SALOME_Prs* p )
353 p->AfterEraseIn( d, this );
357 Gives control to SALOME_Prs object, so that it could perform double dispatch
359 void SALOME_Displayer::UpdatePrs( SALOME_Prs* prs )
365 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
367 void SALOME_Displayer::Update( SALOME_OCCPrs* )
369 // MESSAGE( "SALOME_Displayer::Update( SALOME_OCCPrs* ) called! Probably, presentation is being updated in uncompatible viewframe." );
373 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
375 void SALOME_Displayer::Update( SALOME_VTKPrs* )
377 // MESSAGE( "SALOME_Displayer::Update( SALOME_VTKPrs* ) called! Probably, presentation is being updated in uncompatible viewframe." );
381 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
383 void SALOME_Displayer::Update( SALOME_Prs2d* )
385 // MESSAGE( "SALOME_Displayer::Update( SALOME_Prs2d* ) called! Probably, presentation is being updated in uncompatible viewframe." );