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