Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/geom.git] / src / DisplayGUI / DisplayGUI.cxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // GEOM GEOMGUI : GUI for Geometry component
24 // File   : DisplayGUI.cxx
25 // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
26 //
27 #include "DisplayGUI.h"
28 #include <GeometryGUI.h>
29 #include "GeometryGUI_Operations.h"
30 #include <GEOM_Constants.h>
31 #include <GEOM_Displayer.h>
32 #include <GEOM_AISShape.hxx>
33 #include <GEOM_Actor.h>
34
35 #include <SUIT_Desktop.h>
36 #include <SUIT_ViewWindow.h>
37 #include <SUIT_OverrideCursor.h>
38
39 #include <OCCViewer_ViewManager.h>
40 #include <OCCViewer_ViewModel.h>
41
42 #include <SALOME_ListIO.hxx>
43 #include <SALOME_ListIteratorOfListIO.hxx>
44
45 #include <SVTK_ViewWindow.h>
46 #include <SVTK_View.h>
47 #include <SVTK_ViewModel.h>
48 #include <SOCC_ViewModel.h>
49 #include <SVTK_Prs.h>
50 #include <SOCC_Prs.h>
51
52 #include <QtxActionMenuMgr.h>
53
54 #include <SalomeApp_Application.h>
55 #include <LightApp_SelectionMgr.h>
56 #include <SalomeApp_Study.h>
57
58 #include <AIS_ListIteratorOfListOfInteractive.hxx>
59
60 #include <vtkActorCollection.h>
61 #include <vtkRenderer.h>
62
63 #include <QAction>
64
65 //=======================================================================
66 // function : DisplayGUI::DisplayGUI()
67 // purpose  : Constructor
68 //=======================================================================
69 DisplayGUI::DisplayGUI( GeometryGUI* parent ) : GEOMGUI( parent )
70 {
71 }
72
73 //=======================================================================
74 // function : DisplayGUI::~DisplayGUI()
75 // purpose  : Destructor
76 //=======================================================================
77 DisplayGUI::~DisplayGUI()
78 {
79 }
80
81
82 //=======================================================================
83 // function : DisplayGUI::OnGUIEvent()
84 // purpose  : Dispatch menu command
85 //=======================================================================
86 bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
87 {
88   SalomeApp_Application* app = getGeometryGUI()->getApp();
89   if (!app) return false;
90
91   LightApp_SelectionMgr *Sel = app->selectionMgr();
92   SALOME_ListIO selected;
93   Sel->selectedObjects( selected );
94
95   switch ( theCommandID ) {
96   case GEOMOp::OpDMWireframe:         // MENU VIEW - DISPLAY MODE - WIREFRAME
97     SetDisplayMode( 0 );
98     break;
99   case GEOMOp::OpDMShading:           // MENU VIEW - DISPLAY MODE - SHADING
100     SetDisplayMode( 1 );
101     break;
102   case GEOMOp::OpDMShadingWithEdges:  // MENU VIEW - DISPLAY MODE - SHADING WITH EDGES
103     SetDisplayMode( 2 );
104     break;
105   case GEOMOp::OpShowAll:        // MENU VIEW - SHOW ALL
106     getGeometryGUI()->EmitSignalDeactivateDialog();
107     DisplayAll();
108     break;
109   case GEOMOp::OpShowOnly:       // POPUP MENU - SHOW ONLY
110     getGeometryGUI()->EmitSignalDeactivateDialog();
111     DisplayOnly();
112     break;
113   case GEOMOp::OpHideAll:        // MENU VIEW - HIDE ALL
114     EraseAll();
115     break;
116   case GEOMOp::OpHide:           // POPUP MENU - HIDE
117     Erase();
118     break;
119   case GEOMOp::OpShow:           // POPUP MENU - SHOW
120     getGeometryGUI()->EmitSignalDeactivateDialog();
121     Display();
122     break;
123   case GEOMOp::OpSwitchVectors:  // MENU VIEW - DISPLAY MODE - SHOW EDGE DIRECTION
124     SetVectorMode(!GetVectorMode());
125     getGeometryGUI()->action( GEOMOp::OpSwitchVectors )->setText
126       ( GetVectorMode() ? tr("MEN_VECTOR_MODE_ON") : tr( "MEN_VECTOR_MODE_OFF" ) );
127     getGeometryGUI()->menuMgr()->update();
128     break;
129   case GEOMOp::OpWireframe:      // POPUP MENU - DISPLAY MODE - WIREFRAME
130     ChangeDisplayMode( 0 );
131     break;
132   case GEOMOp::OpShading:        // POPUP MENU - DISPLAY MODE - SHADING
133     ChangeDisplayMode( 1 );
134     break;
135   case GEOMOp::OpShadingWithEdges: // POPUP MENU - DISPLAY MODE - SHADING WITH EDGES
136     ChangeDisplayMode( 2 );
137     break;
138   case GEOMOp::OpTexture:        // POPUP MENU - DISPLAY MODE - TEXTURE
139     ChangeDisplayMode( 3 );
140     break;
141     case GEOMOp::OpVectors:        // POPUP MENU - DISPLAY MODE - SHOW EDGE DIRECTION
142     ChangeDisplayMode( 4 );
143     break;
144   default:
145     app->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
146     break;
147   }
148   Sel->setSelectedObjects( selected );
149   return true;
150 }
151
152 //=====================================================================================
153 // function : DisplayGUI::DisplayAll()
154 // purpose  : Display all GEOM objects
155 //=====================================================================================
156 void DisplayGUI::DisplayAll()
157 {
158   SalomeApp_Application* app = getGeometryGUI()->getApp();
159   if ( !app ) return;
160
161   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
162   if ( !appStudy ) return;
163   _PTR(Study) aStudy = appStudy->studyDS();
164   if ( !aStudy ) return;
165   _PTR(SComponent) SC ( aStudy->FindComponent( "GEOM" ) );
166   if ( !SC )
167     return;
168
169   SALOME_ListIO listIO;
170   _PTR(ChildIterator) anIter ( aStudy->NewChildIterator( SC ) );
171   anIter->InitEx( true );
172
173   SUIT_OverrideCursor();
174
175   while( anIter->More() ) {
176     _PTR(SObject) valSO ( anIter->Value() );
177     _PTR(SObject) refSO;
178     if ( !valSO->ReferencedObject( refSO ) ) {
179       listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(),
180                                                   SC->ComponentDataType().c_str(),
181                                                   valSO->GetName().c_str()) );
182     } 
183     anIter->Next();
184   }
185   GEOM_Displayer( appStudy ).Display( listIO, true );
186 }
187
188 //=====================================================================================
189 // function : DisplayGUI::EraseAll()
190 // purpose  : Erase all GEOM objects
191 //=====================================================================================
192 void DisplayGUI::EraseAll()
193 {
194   SUIT_OverrideCursor();
195
196   SUIT_Application* app = getGeometryGUI()->getApp();
197   if ( app ) {
198     SUIT_ViewWindow* vw = app->desktop()->activeWindow();
199     if ( vw ) {
200       SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
201       SUIT_ViewManager* vman = vw->getViewManager();
202       if ( vman->getType() == OCCViewer_Viewer::Type() || 
203            vman->getType() == SVTK_Viewer::Type() ) {
204         GEOM_Displayer( appStudy ).EraseAll();
205       }
206     }
207   }
208 }
209
210 //=====================================================================================
211 // function : DisplayGUI::DisplayOnly()
212 // purpose  : Display selected GEOM objects and erase other
213 //=====================================================================================
214 void DisplayGUI::DisplayOnly()
215 {
216   EraseAll();
217   Display();
218 }
219
220 //=====================================================================================
221 // function : DisplayGUI::Display()
222 // purpose  : Display selected GEOM objects
223 //=====================================================================================
224 void DisplayGUI::Display()
225 {
226   SALOME_ListIO listIO;
227
228   SalomeApp_Application* app = getGeometryGUI()->getApp();
229   if ( !app ) return;
230
231   SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
232   if ( !anActiveStudy ) return;
233
234   //get SalomeApp selection manager
235   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
236   if ( !aSelMgr ) return;
237
238   SALOME_ListIO aList;
239   aSelMgr->selectedObjects( aList );
240   SALOME_ListIteratorOfListIO It( aList );
241
242   SUIT_OverrideCursor();
243
244   for( ;It.More();It.Next() ) {
245     Handle(SALOME_InteractiveObject) anIObject = It.Value();
246     if ( anIObject->hasEntry() ) {
247       _PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
248       if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
249         _PTR(SComponent) SC ( SO->GetFatherComponent() );
250         // if component is selected
251         listIO.Clear();
252         _PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
253         anIter->InitEx( true );
254         while( anIter->More() ) {
255           _PTR(SObject) valSO ( anIter->Value() );
256           _PTR(SObject) refSO;
257           if ( !valSO->ReferencedObject( refSO ) ) {
258             listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(),
259                                                         SC->ComponentDataType().c_str(),
260                                                         valSO->GetName().c_str()) );
261           }
262           anIter->Next();
263         }
264         break;
265       }
266       else {
267         listIO.Append( anIObject );
268       }
269     }
270     else {
271       listIO.Append( anIObject );
272     }
273   }
274   GEOM_Displayer( anActiveStudy ).Display( listIO, true );
275 }
276
277
278 //=====================================================================================
279 // function : DisplayGUI::Erase()
280 // purpose  : Erase selected GEOM objects
281 //=====================================================================================
282 void DisplayGUI::Erase()
283 {
284   SALOME_ListIO listIO;
285
286   SalomeApp_Application* app = getGeometryGUI()->getApp();
287   if ( !app ) return;
288
289   SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
290   if ( !anActiveStudy ) return;
291
292   //get SalomeApp selection manager
293   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
294   if ( !aSelMgr ) return;
295
296   SALOME_ListIO aList;
297   aSelMgr->selectedObjects( aList );
298   SALOME_ListIteratorOfListIO It( aList );
299
300   SUIT_OverrideCursor();
301
302   for( ; It.More(); It.Next() ) {
303     Handle(SALOME_InteractiveObject) anIObject = It.Value();
304     if ( anIObject->hasEntry() ) {
305       _PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
306       if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
307         _PTR(SComponent) SC ( SO->GetFatherComponent() );
308         // if component is selected
309         listIO.Clear();
310         _PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
311         anIter->InitEx( true );
312         while( anIter->More() ) {
313           _PTR(SObject) valSO ( anIter->Value() );
314           _PTR(SObject) refSO;
315           if ( !valSO->ReferencedObject( refSO ) ) {
316             listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(),
317                                                         SC->ComponentDataType().c_str(),
318                                                         valSO->GetName().c_str()) );
319           }
320           anIter->Next();
321         }
322         break;
323       }
324       else {
325         listIO.Append( anIObject );
326       }
327     }
328     else {
329       listIO.Append( anIObject );
330     }
331   }
332
333   SUIT_ViewWindow* viewWindow = app->desktop()->activeWindow();
334   bool aIsForced = true;
335   if(viewWindow->getViewManager()->getType() == SVTK_Viewer::Type())
336     aIsForced = false;
337
338   GEOM_Displayer(anActiveStudy).Erase( listIO, aIsForced);
339   getGeometryGUI()->getApp()->selectionMgr()->clearSelected();
340 }
341
342 //=====================================================================================
343 // function : DisplayGUI::SetDisplayMode()
344 // purpose  : Set display mode for the viewer (current viewer if <viewWindow> - 0 )
345 //=====================================================================================
346 void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
347 {
348   SUIT_OverrideCursor();
349
350   if ( !viewWindow ) 
351     viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow();
352   if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
353     SVTK_View* aView = ((SVTK_ViewWindow*)viewWindow)->getView();
354     aView->SetDisplayMode( mode );
355     GeometryGUI::Modified();
356   } 
357   else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
358     OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer();
359     Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
360
361     AIS_DisplayMode newmode;
362     switch (mode) {
363     case 0:
364       newmode = AIS_WireFrame;
365       break;
366     case 1:
367       newmode = AIS_Shaded;
368       break;
369     case 2:
370       newmode = AIS_DisplayMode( GEOM_AISShape::ShadingWithEdges );
371       break;
372     case 3:
373       newmode = AIS_DisplayMode( GEOM_AISShape::TexturedShape );
374       break;
375     default:
376       break;
377     }
378
379     AIS_ListOfInteractive List;
380     ic->DisplayedObjects( List );
381     AIS_ListOfInteractive List1;
382     ic->ObjectsInCollector( List1 );
383     List.Append( List1 );
384     
385     AIS_ListIteratorOfListOfInteractive ite( List );
386     while( ite.More() ) {
387       if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
388         Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() );
389         if(aSh->isTopLevel()) {
390            aSh->setPrevDisplayMode(Standard_Integer( newmode ));
391         }
392         else {
393            ic->SetDisplayMode( aSh, Standard_Integer( newmode ),true );
394         }
395       }
396       ite.Next();
397     }
398       
399     ic->SetDisplayMode( newmode, Standard_False );
400
401     GeometryGUI::Modified();
402   }
403 }
404
405 //=====================================================================================
406 // function : DisplayGUI::SetVectorsMode()
407 // purpose  : Set vector mode for the viewer
408 //=====================================================================================
409 void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
410 {
411   SUIT_OverrideCursor();
412
413   if ( !viewWindow ) 
414     viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow();
415   if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
416     viewWindow->setProperty( "VectorsMode", mode );
417     SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>( viewWindow );
418     vtkActorCollection* allActors = vw->getRenderer()->GetActors();
419     allActors->InitTraversal();
420     while (vtkActor* actor = allActors->GetNextActor()) {
421       if (actor->GetVisibility()) { // only for visible actors
422         GEOM_Actor* aGeomActor = 0;
423         if ( actor->IsA( "GEOM_Actor" ) ) {
424           aGeomActor = GEOM_Actor::SafeDownCast( actor );
425           if ( aGeomActor )
426             aGeomActor->SetVectorMode( mode );
427         }
428       }
429     }
430     GeometryGUI::Modified();
431   }
432   else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
433     viewWindow->setProperty( "VectorsMode", mode );
434     OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer();
435     Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
436     AIS_ListOfInteractive List;
437     ic->DisplayedObjects( List );
438     AIS_ListOfInteractive List1;
439     ic->ObjectsInCollector( List1 );
440     List.Append( List1 );
441
442     AIS_ListIteratorOfListOfInteractive ite( List );
443     while( ite.More() ) {
444       if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
445         Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() );
446         aSh->SetDisplayVectors(mode);
447         ic->RecomputePrsOnly(ite.Value());
448       }
449       ite.Next();
450     }
451     GeometryGUI::Modified();
452   }
453 }
454
455 //=====================================================================================
456 // function : DisplayGUI::GetVectorMode()
457 // purpose  : Get the "show edge direction" mode of the viewer
458 //=====================================================================================
459 int DisplayGUI::GetVectorMode( SUIT_ViewWindow* viewWindow )
460 {
461   if ( !viewWindow ) 
462     viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow();
463   return viewWindow->property( "VectorsMode" ).toBool();
464 }
465
466 //=====================================================================================
467 // function : DisplayGUI::ChangeDisplayMode()
468 // purpose  : Set display mode for selected objects in the viewer given
469 //            (current viewer if <viewWindow> = 0 )
470 //=====================================================================================
471 void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
472 {
473   SalomeApp_Application* app = getGeometryGUI()->getApp();
474   if ( !app ) return;
475
476   if ( !viewWindow ) 
477     viewWindow = app->desktop()->activeWindow();
478
479   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
480   if ( !aSelMgr ) return;
481
482   SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
483   
484   if(!aStudy)
485     return;
486
487   SUIT_OverrideCursor();
488
489   SALOME_ListIO aList;
490
491   if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
492     SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>( viewWindow );
493     SVTK_View* aView = vw->getView();
494     int mgrId = viewWindow->getViewManager()->getGlobalId();
495     bool vectorMode = false;
496
497     aSelMgr->selectedObjects( aList );
498     SALOME_ListIteratorOfListIO It( aList );
499
500     for( ;It.More(); It.Next() ) {
501       SVTK_Viewer* stvkViewer = dynamic_cast<SVTK_Viewer*>(vw->getViewManager()->getViewModel());
502       SVTK_Prs* vtkPrs =
503         stvkViewer ? dynamic_cast<SVTK_Prs*>( stvkViewer->CreatePrs( It.Value()->getEntry() ) ) : 0;
504       if ( vtkPrs && !vtkPrs->IsNull() ) {
505         if (mode == 0 )
506           aView->ChangeRepresentationToWireframe( vtkPrs->GetObjects() );
507         else if ( mode == 1 )
508           aView->ChangeRepresentationToSurface( vtkPrs->GetObjects() );
509         else if ( mode == 2 )
510           aView->ChangeRepresentationToSurfaceWithEdges( vtkPrs->GetObjects() );
511         else if ( mode == 4 ) {
512           vtkActorCollection* anActors = vtkPrs->GetObjects();
513           anActors->InitTraversal();
514           while (vtkActor* anAct = anActors->GetNextActor()) {
515             GEOM_Actor* aGeomActor = GEOM_Actor::SafeDownCast(anAct);
516             vectorMode = !aGeomActor->GetVectorMode();
517             aGeomActor->SetVectorMode(vectorMode);
518           }
519         }
520         if(mode == 0 || mode == 1 || mode == 2) {
521           aStudy->setObjectProperty(mgrId,It.Value()->getEntry(),DISPLAY_MODE_PROP, mode);
522         }
523         else if (mode == 4) {
524           aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),VECTOR_MODE_PROP, vectorMode);        
525         }
526       }
527     }
528     aView->Repaint();
529     GeometryGUI::Modified();
530   }
531   else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
532     OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer();
533     Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
534
535     aSelMgr->selectedObjects( aList );
536     SALOME_ListIteratorOfListIO It( aList );
537     int mgrId = viewWindow->getViewManager()->getGlobalId();
538     bool vectorMode = 0;
539
540     for( ;It.More(); It.Next() ) {
541       SOCC_Viewer* soccViewer = (SOCC_Viewer*)(viewWindow->getViewManager()->getViewModel());
542       SOCC_Prs* occPrs = dynamic_cast<SOCC_Prs*>( soccViewer->CreatePrs( It.Value()->getEntry() ) );
543       if ( occPrs && !occPrs->IsNull() ) {
544         AIS_ListOfInteractive shapes; occPrs->GetObjects( shapes );
545         AIS_ListIteratorOfListOfInteractive interIter( shapes );
546         for ( ; interIter.More(); interIter.Next() ) {
547           Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( interIter.Value() );
548           if ( !aSh.IsNull() ) {
549             if(!aSh->isTopLevel()) {
550                     if ( mode == 0 )
551                 ic->SetDisplayMode( interIter.Value(), AIS_WireFrame, false );
552                     else if ( mode == 1 )
553                 ic->SetDisplayMode( interIter.Value(), AIS_Shaded, false );
554                     else if ( mode == 2 )
555                       ic->SetDisplayMode( interIter.Value(), GEOM_AISShape::ShadingWithEdges, false );
556                     else if ( mode == 3 )
557                 ic->SetDisplayMode( interIter.Value(), AIS_ExactHLR, false );
558             } else {
559               aSh->setPrevDisplayMode(mode);
560             }
561                 if (mode == 4 ) {           
562               vectorMode = !aSh->isShowVectors();      
563               aSh->SetDisplayVectors(vectorMode);
564               ic->RecomputePrsOnly(interIter.Value());
565             }
566           }
567         }
568         if(mode == 0 || mode == 1 || mode == 2 || mode == 3) {
569           aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),DISPLAY_MODE_PROP, mode);
570         }
571         else if (mode == 4) {
572           aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),VECTOR_MODE_PROP, vectorMode);
573         }
574       }
575     }
576     ic->UpdateCurrentViewer();
577     GeometryGUI::Modified();
578   }
579 }
580
581 //=====================================================================================
582 // EXPORTED METHODS
583 //=====================================================================================
584 extern "C"
585 {
586 #ifdef WIN32
587   __declspec( dllexport )
588 #endif
589   GEOMGUI* GetLibGUI( GeometryGUI* parent )
590   {
591     return new DisplayGUI( parent );
592   }
593 }