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