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