Salome HOME
cb35bb80bbe2a4307a1169beec61b6878bcc5cf2
[modules/gui.git] / src / Prs / SALOME_Prs.cxx
1 // Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
2 // 
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.
7 // 
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/
18 //
19 // File:        SALOME_Prs.cxx
20 // Created:     Wed Apr 28 15:03:43 2004
21 // Author:      Sergey ANIKIN
22 //              <san@startrex.nnov.opencascade.com>
23
24
25 #include "SALOME_Prs.h"
26
27 //#include "utilities.h"
28
29 //using namespace std;
30
31 //===========================================================
32 /*!
33  *  Function: SALOME_OCCPrs::DisplayIn \n
34  *  Purpose:  Dispatches display operation to proper Display() \n
35  *            method of SALOME_View
36  */
37 //===========================================================
38 void SALOME_OCCPrs::DisplayIn( SALOME_View* v ) const
39 {
40   if ( v ) v->Display( this );
41 }
42
43 //===========================================================
44 /*!
45  *  Function: SALOME_OCCPrs::EraseIn \n
46  *  Purpose:  Dispatches display operation to proper Erase() \n
47  *            method of SALOME_View
48  */
49 //===========================================================
50 void SALOME_OCCPrs::EraseIn( SALOME_View* v, const bool forced ) const
51 {
52   if ( v ) v->Erase( this, forced );
53 }
54
55 //===========================================================
56 /*!
57  *  Function: SALOME_OCCPrs::LocalSelectionIn \n
58  *  Purpose:  Dispatches operation to proper LocalSelectionIn() \n
59  *            method of SALOME_View
60  */
61 //===========================================================
62 void SALOME_OCCPrs::LocalSelectionIn( SALOME_View* v, const int mode ) const
63 {
64   if ( v ) v->LocalSelection( this, mode );
65 }
66
67 //===========================================================
68 /*!
69  *  Function: SALOME_OCCPrs::Update \n
70  *  Purpose:  Dispatches update operation to proper Update() \n
71  *            method of SALOME_Displayer
72  */
73 //===========================================================
74 void SALOME_OCCPrs::Update( SALOME_Displayer* d )
75 {
76   if ( d ) d->Update( this );
77 }
78
79 //===========================================================
80 /*!
81  *  Function: SALOME_VTKPrs::DisplayIn \n
82  *  Purpose:  Dispatches display operation to proper Display() \n
83  *            method of SALOME_View
84  */
85 //===========================================================
86 void SALOME_VTKPrs::DisplayIn( SALOME_View* v ) const
87 {
88   if ( v ) v->Display( this );
89 }
90
91 //===========================================================
92 /*!
93  *  Function: SALOME_VTKPrs::EraseIn \n
94  *  Purpose:  Dispatches display operation to proper Erase() \n
95  *            method of SALOME_View
96  */
97 //===========================================================
98 void SALOME_VTKPrs::EraseIn( SALOME_View* v, const bool forced ) const
99 {
100   if ( v ) v->Erase( this, forced );
101 }
102
103 //===========================================================
104 /*!
105  *  Function: SALOME_VTKPrs::LocalSelectionIn \n
106  *  Purpose:  Dispatches operation to proper LocalSelectionIn() \n
107  *            method of SALOME_View
108  */
109 //===========================================================
110 void SALOME_VTKPrs::LocalSelectionIn( SALOME_View* v, const int mode ) const
111 {
112   if ( v ) v->LocalSelection( this, mode );
113 }
114
115 //===========================================================
116 /*!
117  *  Function: SALOME_VTKPrs::Update \n
118  *  Purpose:  Dispatches update operation to proper Update() \n
119  *            method of SALOME_Displayer
120  */
121 //===========================================================
122 void SALOME_VTKPrs::Update( SALOME_Displayer* d )
123 {
124   if ( d ) d->Update( this );
125 }
126
127 //===========================================================
128 /*!
129  *  Function: SALOME_Prs2d::DisplayIn \n
130  *  Purpose:  Dispatches display operation to proper Display() \n
131  *            method of SALOME_View
132  */
133 //===========================================================
134 void SALOME_Prs2d::DisplayIn( SALOME_View* v ) const
135 {
136   if ( v ) v->Display( this );
137 }
138
139 //===========================================================
140 /*!
141  *  Function: SALOME_Prs2d::EraseIn \n
142  *  Purpose:  Dispatches display operation to proper Erase() \n
143  *            method of SALOME_View
144  */
145 //===========================================================
146 void SALOME_Prs2d::EraseIn( SALOME_View* v, const bool forced ) const
147 {
148   if ( v ) v->Erase( this, forced );
149 }
150
151 //===========================================================
152 /*!
153  *  Function: SALOME_Prs2d::LocalSelectionIn \n
154  *  Purpose:  Dispatches operation to proper LocalSelectionIn() \n
155  *            method of SALOME_View
156  */
157 //===========================================================
158 void SALOME_Prs2d::LocalSelectionIn( SALOME_View* v, const int mode ) const
159 {
160   if ( v ) v->LocalSelection( this, mode );
161 }
162
163 //===========================================================
164 /*!
165  *  Function: SALOME_Prs2d::Update \n
166  *  Purpose:  Dispatches update operation to proper Update() \n
167  *            method of SALOME_Displayer
168  */
169 //===========================================================
170 void SALOME_Prs2d::Update( SALOME_Displayer* d )
171 {
172   if ( d ) d->Update( this );
173 }
174
175 //===========================================================
176 /*!
177  *  Function: SALOME_View::Display \n
178  *  Purpose:  Gives control to SALOME_Prs object, so that \n
179  *            it could perform double dispatch
180  */
181 //===========================================================
182 void SALOME_View::Display( const SALOME_Prs* prs )
183 {
184   prs->DisplayIn( this );
185 }
186
187 //===========================================================
188 /*!
189  *  Function: SALOME_View::Erase \n
190  *  Purpose:  Gives control to SALOME_Prs object, so that \n
191  *            it could perform double dispatch
192  */
193 //===========================================================
194 void SALOME_View::Erase( const SALOME_Prs* prs, const bool forced )
195 {
196   prs->EraseIn( this, forced );
197 }
198
199 //===========================================================
200 /*!
201  *  Function: SALOME_View::LocalSelection \n
202  *  Purpose:  Gives control to SALOME_Prs object, so that \n
203  *            it could perform double dispatch
204  */
205 //===========================================================
206 void SALOME_View::LocalSelection( const SALOME_Prs* prs, const int mode )
207 {
208   prs->LocalSelectionIn( this, mode );
209 }
210
211 //===========================================================
212 /*!
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.
216  */
217 //===========================================================
218 void SALOME_View::Display( const SALOME_OCCPrs* )
219 {
220 //  MESSAGE( "SALOME_View::Display( const SALOME_OCCPrs& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
221 }
222
223 //===========================================================
224 /*!
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.
228  */
229 //===========================================================
230 void SALOME_View::Display( const SALOME_VTKPrs* )
231 {
232 //  MESSAGE( "SALOME_View::Display( const SALOME_VTKPrs& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
233 }
234
235 //===========================================================
236 /*!
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.
240  */
241 //===========================================================
242 void SALOME_View::Display( const SALOME_Prs2d* )
243 {
244 //  MESSAGE( "SALOME_View::Display( const SALOME_Prs2d& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
245 }
246
247 //===========================================================
248 /*!
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.
252  */
253 //===========================================================
254 void SALOME_View::Erase( const SALOME_OCCPrs*, const bool )
255 {
256 //  MESSAGE( "SALOME_View::Erase( const SALOME_OCCPrs& ) called! Probably, presentation is being erased in uncompatible viewframe." );
257 }
258
259 //===========================================================
260 /*!
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.
264  */
265 //===========================================================
266 void SALOME_View::Erase( const SALOME_VTKPrs*, const bool )
267 {
268 //  MESSAGE( "SALOME_View::Erase( const SALOME_VTKPrs& ) called! Probably, presentation is being erased in uncompatible viewframe." );
269 }
270
271 //===========================================================
272 /*!
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.
276  */
277 //===========================================================
278 void SALOME_View::Erase( const SALOME_Prs2d*, const bool )
279 {
280 //  MESSAGE( "SALOME_View::Erase( const SALOME_Prs2d& ) called! Probably, presentation is being erased in uncompatible viewframe." );
281 }
282
283 //===========================================================
284 /*!
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.
288  */
289 //===========================================================
290 void SALOME_View::EraseAll( const bool )
291 {
292 //  MESSAGE( "SALOME_View::EraseAll() called!" );
293 }
294
295 //===========================================================
296 /*!
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.
300  */
301 //===========================================================
302 void SALOME_View::LocalSelection( const SALOME_OCCPrs*, const int )
303 {
304 //  MESSAGE( "SALOME_View::LocalSelection( const SALOME_OCCPrs* ) called! \
305 //   Probably, selection is being activated in uncompatible viewframe." );
306 }
307
308 //===========================================================
309 /*!
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.
313  */
314 //===========================================================
315 void SALOME_View::LocalSelection( const SALOME_VTKPrs*, const int )
316 {
317 //  MESSAGE( "SALOME_View::LocalSelection( const SALOME_VTKPrs* ) called! \
318 //   Probably, selection is being activated in uncompatible viewframe." );
319 }
320
321 //===========================================================
322 /*!
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.
326  */
327 //===========================================================
328 void SALOME_View::LocalSelection( const SALOME_Prs2d*, const int )
329 {
330 //  MESSAGE( "SALOME_View::LocalSelection( const SALOME_Prs2d* ) called! \
331 //   Probably, selection is being activated in uncompatible viewframe." );
332 }
333
334 //===========================================================
335 /*!
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.
339  */
340 //===========================================================
341 void SALOME_View::GlobalSelection( const bool ) const
342 {
343 //  MESSAGE( "SALOME_View::GlobalSelection() called! \
344 //   Probably, selection is being activated in uncompatible viewframe." );
345 }
346
347 //===========================================================
348 /*!
349  *  Function: SALOME_Displayer::UpdatePrs \n
350  *  Purpose:  Gives control to SALOME_Prs object, so that \n
351  *            it could perform double dispatch
352  */
353 //===========================================================
354 void SALOME_Displayer::UpdatePrs( SALOME_Prs* prs )
355 {
356   prs->Update( this );
357 }
358
359 //===========================================================
360 /*!
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.
364  */
365 //===========================================================
366 void SALOME_Displayer::Update( SALOME_OCCPrs* )
367 {
368 //  MESSAGE( "SALOME_Displayer::Update( SALOME_OCCPrs* ) called! Probably, presentation is being updated in uncompatible viewframe." );
369 }
370
371 //===========================================================
372 /*!
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.
376  */
377 //===========================================================
378 void SALOME_Displayer::Update( SALOME_VTKPrs* )
379 {
380 //  MESSAGE( "SALOME_Displayer::Update( SALOME_VTKPrs* ) called! Probably, presentation is being updated in uncompatible viewframe." );
381 }
382
383 //===========================================================
384 /*!
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.
388  */
389 //===========================================================
390 void SALOME_Displayer::Update( SALOME_Prs2d* )
391 {
392 //  MESSAGE( "SALOME_Displayer::Update( SALOME_Prs2d* ) called! Probably, presentation is being updated in uncompatible viewframe." );
393 }
394