Salome HOME
Merge remote branch 'origin/V7_4_BR'
[modules/geom.git] / src / DisplayGUI / DisplayGUI.cxx
1 // Copyright (C) 2007-2014  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, or (at your option) any later version.
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   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
92   if ( !appStudy ) return false;
93
94   LightApp_SelectionMgr *Sel = app->selectionMgr();
95   SALOME_ListIO selected;
96   Sel->selectedObjects( selected );
97
98   switch ( theCommandID ) {
99   case GEOMOp::OpDMWireframe:         // MENU VIEW - DISPLAY MODE - WIREFRAME
100     SetDisplayMode( 0 );
101     break;
102   case GEOMOp::OpDMShading:           // MENU VIEW - DISPLAY MODE - SHADING
103     SetDisplayMode( 1 );
104     break;
105   case GEOMOp::OpDMShadingWithEdges:  // MENU VIEW - DISPLAY MODE - SHADING WITH EDGES
106     SetDisplayMode( 2 );
107     break;
108   case GEOMOp::OpDMTexture:           // MENU VIEW - DISPLAY MODE - TEXTURE
109     SetDisplayMode( 3 );
110     break;
111   case GEOMOp::OpShowAll:        // MENU VIEW - SHOW ALL
112     getGeometryGUI()->EmitSignalDeactivateDialog();
113     DisplayAll();
114     break;
115   case GEOMOp::OpShowOnly:       // POPUP MENU - SHOW ONLY
116     getGeometryGUI()->EmitSignalDeactivateDialog();
117     DisplayOnly();
118     break;
119   case GEOMOp::OpShowOnlyChildren: // POPUP MENU - SHOW ONLY CHILDREN
120     getGeometryGUI()->EmitSignalDeactivateDialog();
121     DisplayOnlyChildren();
122     break;
123   case GEOMOp::OpHideAll:        // MENU VIEW - HIDE ALL
124     EraseAll();
125     break;
126   case GEOMOp::OpHide:           // POPUP MENU - HIDE
127     Erase();
128     break;
129   case GEOMOp::OpShow:           // POPUP MENU - SHOW
130     getGeometryGUI()->EmitSignalDeactivateDialog();
131     Display();
132     break;
133   case GEOMOp::OpSwitchVectors:  // MENU VIEW - DISPLAY MODE - SHOW EDGE DIRECTION
134     SetVectorMode(!GetVectorMode());
135     getGeometryGUI()->action( GEOMOp::OpSwitchVectors )->setText
136       ( GetVectorMode() ? tr("MEN_VECTOR_MODE_ON") : tr( "MEN_VECTOR_MODE_OFF" ) );
137     getGeometryGUI()->menuMgr()->update();
138     break;
139   case GEOMOp::OpSwitchVertices:  // MENU VIEW - DISPLAY MODE - SHOW/HIDE VERTICES
140     SetVerticesMode(!GetVerticesMode());
141     getGeometryGUI()->action( GEOMOp::OpSwitchVertices )->setText
142       ( GetVerticesMode() ? tr("MEN_VERTICES_MODE_ON") : tr( "MEN_VERTICES_MODE_OFF" ) );
143     getGeometryGUI()->menuMgr()->update();
144     break;
145   case GEOMOp::OpWireframe:      // POPUP MENU - DISPLAY MODE - WIREFRAME
146     ChangeDisplayMode( 0 );
147     break;
148   case GEOMOp::OpShading:        // POPUP MENU - DISPLAY MODE - SHADING
149     ChangeDisplayMode( 1 );
150     break;
151   case GEOMOp::OpShadingWithEdges: // POPUP MENU - DISPLAY MODE - SHADING WITH EDGES
152     ChangeDisplayMode( 2 );
153     break;
154   case GEOMOp::OpTexture:        // POPUP MENU - DISPLAY MODE - TEXTURE
155     ChangeDisplayMode( 3 );
156     break;
157     case GEOMOp::OpVectors:        // POPUP MENU - DISPLAY MODE - SHOW EDGE DIRECTION
158     ChangeDisplayMode( 4 );
159     break;
160     case GEOMOp::OpVertices:       // POPUP MENU - DISPLAY MODE - SHOW VERTICES
161     ChangeDisplayMode( 5 );
162     break;
163   default:
164     app->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
165     break;
166   }
167   Sel->setSelectedObjects( selected );
168   GEOM_Displayer( appStudy ).UpdateColorScale();
169   return true;
170 }
171
172 //=====================================================================================
173 // function : DisplayGUI::DisplayAll()
174 // purpose  : Display all GEOM objects
175 //=====================================================================================
176 void DisplayGUI::DisplayAll()
177 {
178   SalomeApp_Application* app = getGeometryGUI()->getApp();
179   if ( !app ) return;
180
181   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
182   if ( !appStudy ) return;
183   _PTR(Study) aStudy = appStudy->studyDS();
184   if ( !aStudy ) return;
185   _PTR(SComponent) SC ( aStudy->FindComponent( "GEOM" ) );
186   if ( !SC )
187     return;
188
189   SALOME_ListIO listIO;
190   _PTR(ChildIterator) anIter ( aStudy->NewChildIterator( SC ) );
191   anIter->InitEx( true );
192
193   SUIT_OverrideCursor();
194
195   while( anIter->More() ) {
196     _PTR(SObject) valSO ( anIter->Value() );
197     _PTR(SObject) refSO;
198     if ( !valSO->ReferencedObject( refSO ) ) {
199       listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(),
200                                                   SC->ComponentDataType().c_str(),
201                                                   valSO->GetName().c_str()) );
202     } 
203     anIter->Next();
204   }
205   GEOM_Displayer( appStudy ).Display( listIO, true );
206 }
207
208 //=====================================================================================
209 // function : DisplayGUI::EraseAll()
210 // purpose  : Erase all GEOM objects
211 //=====================================================================================
212 void DisplayGUI::EraseAll()
213 {
214   SUIT_OverrideCursor();
215
216   SUIT_Application* app = getGeometryGUI()->getApp();
217   if ( app ) {
218     SUIT_ViewWindow* vw = app->desktop()->activeWindow();
219     if ( vw ) {
220       SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
221       SUIT_ViewManager* vman = vw->getViewManager();
222       if ( vman->getType() == OCCViewer_Viewer::Type() || 
223            vman->getType() == SVTK_Viewer::Type() ) {
224         GEOM_Displayer( appStudy ).EraseAll(true);
225       }
226     }
227   }
228 }
229
230 //=====================================================================================
231 // function : DisplayGUI::DisplayOnly()
232 // purpose  : Display selected GEOM objects and erase other
233 //=====================================================================================
234 void DisplayGUI::DisplayOnly()
235 {
236   EraseAll();
237   Display();
238 }
239
240 //=====================================================================================
241 // function : DisplayGUI::DisplayOnlyChildren()
242 // purpose  : Display only children of selected GEOM objects and erase other
243 //=====================================================================================
244 void DisplayGUI::DisplayOnlyChildren()
245 {
246   EraseAll();
247
248   SALOME_ListIO listIO;
249
250   SalomeApp_Application* app = getGeometryGUI()->getApp();
251   if (!app) return;
252
253   SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
254   if (!anActiveStudy) return;
255
256   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
257   if (!aSelMgr) return;
258
259   // get selection
260   SALOME_ListIO aList;
261   //aSelMgr->selectedObjects(aList);
262   aSelMgr->selectedObjects(aList, "ObjectBrowser", false);
263   SALOME_ListIteratorOfListIO It (aList);
264
265   SUIT_OverrideCursor();
266
267   for (; It.More(); It.Next()) {
268     Handle(SALOME_InteractiveObject) anIObject = It.Value();
269     if (anIObject->hasEntry()) {
270       _PTR(SObject) SO (anActiveStudy->studyDS()->FindObjectID(anIObject->getEntry()));
271       if (SO) {
272         _PTR(SComponent) SC (SO->GetFatherComponent());
273         if (QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str())) {
274           // if component is selected, pass it
275         }
276         else {
277           _PTR(ChildIterator) anIter (anActiveStudy->studyDS()->NewChildIterator(SO));
278           anIter->InitEx(true);
279           while (anIter->More()) {
280             _PTR(SObject) valSO (anIter->Value());
281             _PTR(SObject) refSO;
282             if (!valSO->ReferencedObject(refSO)) {
283               listIO.Append(new SALOME_InteractiveObject(valSO->GetID().c_str(),
284                                                          SC->ComponentDataType().c_str(),
285                                                          valSO->GetName().c_str()));
286             }
287             anIter->Next();
288           }
289         }
290       }
291     }
292   }
293   GEOM_Displayer(anActiveStudy).Display(listIO, true);
294 }
295
296 //=====================================================================================
297 // function : DisplayGUI::Display()
298 // purpose  : Display selected GEOM objects
299 //=====================================================================================
300 void DisplayGUI::Display()
301 {
302   SALOME_ListIO listIO;
303
304   SalomeApp_Application* app = getGeometryGUI()->getApp();
305   if ( !app ) return;
306
307   SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
308   if ( !anActiveStudy ) return;
309
310   //get SalomeApp selection manager
311   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
312   if ( !aSelMgr ) return;
313
314   SALOME_ListIO aList;
315   aSelMgr->selectedObjects( aList );
316   SALOME_ListIteratorOfListIO It( aList );
317
318   SUIT_OverrideCursor();
319
320   for( ;It.More();It.Next() ) {
321     Handle(SALOME_InteractiveObject) anIObject = It.Value();
322     if ( anIObject->hasEntry() ) {
323       _PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
324       if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
325         _PTR(SComponent) SC ( SO->GetFatherComponent() );
326         // if component is selected
327         listIO.Clear();
328         _PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
329         anIter->InitEx( true );
330         while( anIter->More() ) {
331           _PTR(SObject) valSO ( anIter->Value() );
332           _PTR(SObject) refSO;
333           if ( !valSO->ReferencedObject( refSO ) ) {
334             listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(),
335                                                         SC->ComponentDataType().c_str(),
336                                                         valSO->GetName().c_str()) );
337           }
338           anIter->Next();
339         }
340         break;
341       }
342       else {
343         listIO.Append( anIObject );
344       }
345     }
346     else {
347       listIO.Append( anIObject );
348     }
349   }
350   GEOM_Displayer( anActiveStudy ).Display( listIO, true );
351 }
352
353
354 //=====================================================================================
355 // function : DisplayGUI::Erase()
356 // purpose  : Erase selected GEOM objects
357 //=====================================================================================
358 void DisplayGUI::Erase()
359 {
360   SALOME_ListIO listIO;
361
362   SalomeApp_Application* app = getGeometryGUI()->getApp();
363   if ( !app ) return;
364
365   SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
366   if ( !anActiveStudy ) return;
367
368   //get SalomeApp selection manager
369   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
370   if ( !aSelMgr ) return;
371
372   SALOME_ListIO aList;
373   aSelMgr->selectedObjects( aList );
374   SALOME_ListIteratorOfListIO It( aList );
375
376   SUIT_OverrideCursor();
377
378   for( ; It.More(); It.Next() ) {
379     Handle(SALOME_InteractiveObject) anIObject = It.Value();
380     if ( anIObject->hasEntry() ) {
381       _PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
382       if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
383         _PTR(SComponent) SC ( SO->GetFatherComponent() );
384         // if component is selected
385         listIO.Clear();
386         _PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
387         anIter->InitEx( true );
388         while( anIter->More() ) {
389           _PTR(SObject) valSO ( anIter->Value() );
390           _PTR(SObject) refSO;
391           if ( !valSO->ReferencedObject( refSO ) ) {
392             listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(),
393                                                         SC->ComponentDataType().c_str(),
394                                                         valSO->GetName().c_str()) );
395           }
396           anIter->Next();
397         }
398         break;
399       }
400       else {
401         listIO.Append( anIObject );
402       }
403     }
404     else {
405       listIO.Append( anIObject );
406     }
407   }
408
409   SUIT_ViewWindow* viewWindow = app->desktop()->activeWindow();
410   bool aIsForced = true;
411   if(viewWindow->getViewManager()->getType() == SVTK_Viewer::Type())
412     aIsForced = false;
413
414   GEOM_Displayer(anActiveStudy).Erase( listIO, aIsForced);
415   getGeometryGUI()->getApp()->selectionMgr()->clearSelected();
416 }
417
418 //=====================================================================================
419 // function : DisplayGUI::SetDisplayMode()
420 // purpose  : Set display mode for the viewer (current viewer if <viewWindow> - 0 )
421 //=====================================================================================
422 void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
423 {
424   SUIT_OverrideCursor();
425
426   SalomeApp_Application* app = getGeometryGUI()->getApp();
427   if ( !app ) return;
428
429   if ( !viewWindow ) 
430     viewWindow = app->desktop()->activeWindow();
431
432   SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
433   if ( !aStudy ) return;
434
435   GEOM_Displayer displayer( aStudy );
436
437   int mgrId = viewWindow->getViewManager()->getGlobalId();
438
439   SALOME_ListIO anIOlst;
440   displayer.GetActiveView()->GetVisible( anIOlst );
441
442   for ( SALOME_ListIteratorOfListIO It( anIOlst ); It.More(); It.Next() ) {
443     Handle( SALOME_InteractiveObject ) io = It.Value();
444     aStudy->setObjectProperty( mgrId, io->getEntry(), GEOM::propertyName( GEOM::DisplayMode ), mode );
445     displayer.Redisplay( io, false );
446   }
447   displayer.UpdateViewer();
448   GeometryGUI::Modified();
449 }
450
451 //=====================================================================================
452 // function : DisplayGUI::SetVectorsMode()
453 // purpose  : Set vector mode for the viewer
454 //=====================================================================================
455 void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
456 {
457   SUIT_OverrideCursor();
458
459   SalomeApp_Application* app = getGeometryGUI()->getApp();
460   if ( !app ) return;
461
462   SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
463   if ( !aStudy ) return;
464
465   if ( !viewWindow ) 
466     viewWindow = app->desktop()->activeWindow();
467
468   GEOM_Displayer displayer( aStudy );
469
470   viewWindow->setProperty( "VectorsMode", mode );
471
472   int aMgrId = viewWindow->getViewManager()->getGlobalId();
473
474   SALOME_ListIO anIOlst;
475   displayer.GetActiveView()->GetVisible( anIOlst );
476
477   for ( SALOME_ListIteratorOfListIO It( anIOlst ); It.More(); It.Next() ) {
478     Handle( SALOME_InteractiveObject ) io = It.Value();
479     aStudy->setObjectProperty( aMgrId, io->getEntry(), GEOM::propertyName( GEOM::EdgesDirection ), mode );
480     displayer.Redisplay( io, false );
481   }
482   displayer.UpdateViewer();
483   GeometryGUI::Modified();
484 }
485
486 //=====================================================================================
487 // function : DisplayGUI::GetVectorMode()
488 // purpose  : Get the "show edge direction" mode of the viewer
489 //=====================================================================================
490 int DisplayGUI::GetVectorMode( SUIT_ViewWindow* viewWindow )
491 {
492   if ( !viewWindow ) 
493     viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow();
494   return viewWindow->property( "VectorsMode" ).toBool();
495 }
496
497 //=====================================================================================
498 // function : DisplayGUI::SetVerticesMode()
499 // purpose  : Set vertices mode for the viewer
500 //=====================================================================================
501 void DisplayGUI::SetVerticesMode( const bool mode, SUIT_ViewWindow* viewWindow )
502 {
503   SUIT_OverrideCursor();
504
505   SalomeApp_Application* app = getGeometryGUI()->getApp();
506   if ( !app ) return;
507
508   SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
509   if ( !aStudy ) return;
510
511   if ( !viewWindow ) 
512     viewWindow = app->desktop()->activeWindow();
513
514   GEOM_Displayer displayer( aStudy );
515
516   viewWindow->setProperty( "VerticesMode", mode );
517
518   int aMgrId = viewWindow->getViewManager()->getGlobalId();
519
520   SALOME_ListIO anIOlst;
521   displayer.GetActiveView()->GetVisible( anIOlst );
522
523   for ( SALOME_ListIteratorOfListIO It( anIOlst ); It.More(); It.Next() ) {
524     Handle( SALOME_InteractiveObject ) io = It.Value();
525     aStudy->setObjectProperty( aMgrId, io->getEntry(), GEOM::propertyName( GEOM::Vertices ), mode );
526     displayer.Redisplay( io, false );
527   }
528   displayer.UpdateViewer();
529   GeometryGUI::Modified();
530 }
531
532 //=====================================================================================
533 // function : DisplayGUI::GetVerticesMode()
534 // purpose  : Get the "show vertices" mode of the viewer
535 //=====================================================================================
536 int DisplayGUI::GetVerticesMode( SUIT_ViewWindow* viewWindow )
537 {
538   if ( !viewWindow ) 
539     viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow();
540   return viewWindow->property( "VerticesMode" ).toBool();
541 }
542
543 //=====================================================================================
544 // function : DisplayGUI::ChangeDisplayMode()
545 // purpose  : Set display mode for selected objects in the viewer given
546 //            (current viewer if <viewWindow> = 0 )
547 //=====================================================================================
548 void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
549 {
550   SalomeApp_Application* app = getGeometryGUI()->getApp();
551   if ( !app ) return;
552
553   if ( !viewWindow ) 
554     viewWindow = app->desktop()->activeWindow();
555
556   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
557   if ( !aSelMgr ) return;
558
559   SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
560   if ( !aStudy ) return;
561
562   SUIT_OverrideCursor();
563
564   SALOME_ListIO selected;
565   aSelMgr->selectedObjects( selected );
566   if ( selected.IsEmpty() ) return;
567
568   GEOM_Displayer displayer( aStudy );
569
570   int mgrId = viewWindow->getViewManager()->getGlobalId();
571
572   QVariant v = aStudy->getObjectProperty( mgrId, selected.First()->getEntry(), GEOM::propertyName( GEOM::EdgesDirection ), QVariant() );
573   bool vectorMode =  v.isValid() ? !v.toBool() : false;
574   v = aStudy->getObjectProperty( mgrId, selected.First()->getEntry(), GEOM::propertyName( GEOM::Vertices ), QVariant() );
575   bool verticesMode =  v.isValid() ? !v.toBool() : false;
576
577   for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
578     Handle( SALOME_InteractiveObject ) io = It.Value();
579     if ( mode == 0 || mode == 1 || mode == 2 || mode == 3 ) {
580       aStudy->setObjectProperty( mgrId, io->getEntry(), GEOM::propertyName( GEOM::DisplayMode ), mode );
581     }
582     else if ( mode == 4 ) {
583       aStudy->setObjectProperty( mgrId, io->getEntry(), GEOM::propertyName( GEOM::EdgesDirection ), vectorMode );
584     }
585     else if ( mode == 5 ) {
586       aStudy->setObjectProperty( mgrId, io->getEntry(), GEOM::propertyName( GEOM::Vertices ), verticesMode );
587     }
588     displayer.Redisplay( io, false );
589   }
590   displayer.UpdateViewer();
591   GeometryGUI::Modified();
592 }
593
594 //=====================================================================================
595 // EXPORTED METHODS
596 //=====================================================================================
597 extern "C"
598 {
599 #ifdef WIN32
600   __declspec( dllexport )
601 #endif
602   GEOMGUI* GetLibGUI( GeometryGUI* parent )
603   {
604     return new DisplayGUI( parent );
605   }
606 }