1 // Created on: 1997-01-29
2 // Created by: Robert COUBLANC
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
18 #include <AIS_DataMapIteratorOfDataMapOfILC.hxx>
19 #include <AIS_DataMapIteratorOfDataMapOfIOStatus.hxx>
20 #include <AIS_GlobalStatus.hxx>
21 #include <AIS_InteractiveContext.hxx>
22 #include <AIS_InteractiveObject.hxx>
23 #include <AIS_LocalContext.hxx>
24 #include <AIS_Selection.hxx>
25 #include <Graphic3d_MapIteratorOfMapOfStructure.hxx>
26 #include <Graphic3d_MapOfStructure.hxx>
27 #include <Graphic3d_Structure.hxx>
28 #include <Graphic3d_StructureManager.hxx>
29 #include <Prs3d_BasicAspect.hxx>
30 #include <Prs3d_LineAspect.hxx>
31 #include <Quantity_Color.hxx>
32 #include <SelectMgr_EntityOwner.hxx>
33 #include <SelectMgr_Filter.hxx>
34 #include <SelectMgr_OrFilter.hxx>
35 #include <SelectMgr_SelectionManager.hxx>
36 #include <Standard_Transient.hxx>
37 #include <StdSelect_ViewerSelector3d.hxx>
38 #include <TCollection_AsciiString.hxx>
39 #include <TCollection_ExtendedString.hxx>
40 #include <TColStd_ListIteratorOfListOfInteger.hxx>
41 #include <TopLoc_Location.hxx>
42 #include <TopoDS_Shape.hxx>
43 #include <V3d_View.hxx>
44 #include <V3d_Viewer.hxx>
46 //=======================================================================
47 //function : OpenLocalContext
49 //=======================================================================
50 Standard_Integer AIS_InteractiveContext::
51 OpenLocalContext(const Standard_Boolean UseDisplayedObjects,
52 const Standard_Boolean AllowShapeDecomposition,
53 const Standard_Boolean AcceptEraseOfTemporary,
54 const Standard_Boolean /*BothViewers*/)
57 // the entities eventually detected just before the context was opened are unhighlighted...
58 if(!IsSelected(myLastPicked)){
59 if(!myLastPicked.IsNull()){
60 const Handle(AIS_InteractiveObject) aLastPickedAIS =
61 Handle(AIS_InteractiveObject)::DownCast (myLastPicked->Selectable());
62 Standard_Integer HiMod = aLastPickedAIS->HasHilightMode()?aLastPickedAIS->HilightMode():0;
63 myMainPM->Unhighlight (aLastPickedAIS, HiMod);
66 if(!mylastmoveview.IsNull()){
68 myLocalContexts(myCurLocalIndex)->UnhilightLastDetected(mylastmoveview);
71 // entities connected to dynamic selection at neutral point are set to 0.
73 myLastinMain.Nullify();
74 myLastPicked.Nullify();
75 myWasLastMain = Standard_True;
77 myCurLocalIndex = HighestIndex() + 1;
79 Handle(AIS_LocalContext) NewLocal= new AIS_LocalContext(this,myCurLocalIndex,
81 AllowShapeDecomposition,
82 AcceptEraseOfTemporary);
83 // the AIS_LocalContext bind itself to myLocalContexts
84 // because procedures performed in AIS_LocalContext constructor
85 // already may access myLocalContexts(myCurLocalIndex) (like methods AIS_LocalContext::IsSelected()).
88 cout<<"\tOpen Local Context No "<<myCurLocalIndex<<endl;
89 if(UseDisplayedObjects){
90 cout<<"\t\tObjects from Neutral Point loaded"<<endl;
91 if(AllowShapeDecomposition)
92 cout<<"\t\tDecomposition Authorized for Loaded Shapes"<<endl;
94 cout<<"\t\tNo Decomposition Authorized for Loaded Shapes"<<endl;
97 cout<<"\t\tNo Objects Were Loaded "<<endl;
99 return myCurLocalIndex;
102 //=======================================================================
103 //function : CloseLocalContext
105 //=======================================================================
107 void AIS_InteractiveContext::CloseLocalContext(const Standard_Integer Index,
108 const Standard_Boolean updateviewer)
111 Standard_Boolean debugmode(Standard_False);
113 debugmode = Standard_True;
116 Standard_Integer GoodIndex = (Index ==-1) ? myCurLocalIndex : Index;
118 if(debugmode) cout<<"Call to CloseLocalContext - Index "<<GoodIndex<<endl;
119 if(!HasOpenedContext()){
120 if(debugmode) cout<<"\t But No Local Context is opened"<<endl;
123 if(!myLocalContexts.IsBound(GoodIndex)) {
124 if(debugmode) cout<<" Attempt to Close a non-existent Local Context"<<endl;
128 // the only open local context is closed...
129 if(myLocalContexts.Extent()==1 && GoodIndex == myCurLocalIndex){
131 myLocalContexts(myCurLocalIndex)->Terminate( updateviewer );
132 myLocalContexts.UnBind(myCurLocalIndex);
135 ResetOriginalState(Standard_False);
137 cout<<"No More Opened Local Context "<<endl;
140 // Otherwise the local context will be still open after the current is closed
142 Handle(StdSelect_ViewerSelector3d) VS = myLocalContexts(GoodIndex)->MainSelector();
143 myLocalContexts(GoodIndex)->Terminate();
144 myLocalContexts.UnBind(GoodIndex);
145 // the current is closed...
146 if(GoodIndex==myCurLocalIndex){
147 myCurLocalIndex = HighestIndex();
150 cout<<"a No Current Local Context WasClosed"<<endl;
152 // restore activated selections of current local context
153 myLocalContexts (myCurLocalIndex)->RestoreActivatedModes();
155 if(debugmode) cout<<"Index Of CurrentLocalContext:"<<myCurLocalIndex<<endl;
160 if(updateviewer) myMainVwr->Update();
163 //=======================================================================
164 //function : CloseAllContexts
166 //=======================================================================
168 void AIS_InteractiveContext::CloseAllContexts(const Standard_Boolean updateviewer)
171 while(!myLocalContexts.IsEmpty()){
172 CloseLocalContext(myCurLocalIndex,Standard_False);
175 ResetOriginalState(Standard_False);
177 if(updateviewer) myMainVwr->Update();
180 //=======================================================================
181 //function : IndexOfCurrentLocal
183 //=======================================================================
185 Standard_Integer AIS_InteractiveContext::IndexOfCurrentLocal() const
187 return myCurLocalIndex;
190 //=======================================================================
191 //function : ClearLocalContext
193 //=======================================================================
195 void AIS_InteractiveContext::ClearLocalContext(const AIS_ClearMode aMode)
197 if (!HasOpenedContext()) return;
198 myLocalContexts(myCurLocalIndex)->Clear(aMode);
202 //=======================================================================
203 //function : HighestIndex
205 //=======================================================================
207 Standard_Integer AIS_InteractiveContext::HighestIndex() const
209 AIS_DataMapIteratorOfDataMapOfILC It(myLocalContexts);
210 Standard_Integer HiInd = 0;
211 for(;It.More();It.Next())
212 HiInd = (It.Key()>HiInd) ? It.Key() : HiInd;
218 //=======================================================================
219 //function : Activate
221 //=======================================================================
223 void AIS_InteractiveContext::
224 Activate(const Handle(AIS_InteractiveObject)& anIObj,
225 const Standard_Integer aMode,
226 const Standard_Boolean theIsForce)
228 if(!HasOpenedContext()){
229 if(!myObjects.IsBound(anIObj)) return;
230 const Handle(AIS_GlobalStatus)& STAT = myObjects(anIObj);
231 if(STAT->GraphicStatus()==AIS_DS_Displayed || theIsForce)
232 mgrSelector->Activate(anIObj,aMode,myMainSel);
233 STAT ->AddSelectionMode(aMode);
236 myLocalContexts(myCurLocalIndex)->ActivateMode(anIObj,aMode);
240 //=======================================================================
241 //function : LocalSelector
243 //=======================================================================
244 Handle( StdSelect_ViewerSelector3d ) AIS_InteractiveContext::LocalSelector() const
246 if( !HasOpenedContext() )
247 return Handle( StdSelect_ViewerSelector3d )();
249 return myLocalContexts( myCurLocalIndex )->MainSelector();
253 //=======================================================================
254 //function : DeActivate
256 //=======================================================================
257 void AIS_InteractiveContext::
258 Deactivate(const Handle(AIS_InteractiveObject)& anIObj)
260 if(!HasOpenedContext()){
261 if(!myObjects.IsBound(anIObj)) return;
262 TColStd_ListIteratorOfListOfInteger ItL;
263 for(ItL.Initialize(myObjects(anIObj)->SelectionModes());
266 if(myObjects(anIObj)->GraphicStatus() == AIS_DS_Displayed)
267 mgrSelector->Deactivate(anIObj,ItL.Value(),myMainSel);
269 myObjects(anIObj)->ClearSelectionModes();
272 const Handle(AIS_LocalContext)& LC = myLocalContexts(myCurLocalIndex);
273 LC->Deactivate(anIObj);
277 //=======================================================================
278 //function : Deactivate
280 //=======================================================================
282 void AIS_InteractiveContext::Deactivate(const Handle(AIS_InteractiveObject)& anIObj,
283 const Standard_Integer aMode)
285 if(!HasOpenedContext()){
286 if(!myObjects.IsBound(anIObj)) return;
287 const Handle(AIS_GlobalStatus)& STAT = myObjects(anIObj);
289 if(STAT->GraphicStatus() == AIS_DS_Displayed)
290 mgrSelector->Deactivate(anIObj,aMode,myMainSel);
291 STAT->RemoveSelectionMode(aMode);
294 myLocalContexts(myCurLocalIndex)->DeactivateMode(anIObj,aMode);
298 //=======================================================================
299 //function : ActivatedModes
301 //=======================================================================
303 void AIS_InteractiveContext::
304 ActivatedModes(const Handle(AIS_InteractiveObject)& anIObj,
305 TColStd_ListOfInteger& theList) const
307 TColStd_ListIteratorOfListOfInteger ItL;
308 if(!HasOpenedContext()){
309 if(myObjects.IsBound(anIObj)){
310 for(ItL.Initialize(myObjects(anIObj)->SelectionModes());
313 theList.Append(ItL.Value());
318 if(myLocalContexts(myCurLocalIndex)->IsIn(anIObj)){
319 for(ItL.Initialize(myLocalContexts(myCurLocalIndex)->SelectionModes(anIObj));
322 theList.Append(ItL.Value());
327 //=======================================================================
328 //function : SetShapeDecomposition
330 //=======================================================================
332 void AIS_InteractiveContext::SetShapeDecomposition(const Handle(AIS_InteractiveObject)& anIObj,
333 const Standard_Boolean StdModeSensitive)
335 if(!HasOpenedContext()) return;
336 myLocalContexts(myCurLocalIndex)->SetShapeDecomposition(anIObj,StdModeSensitive);
339 //=======================================================================
340 //function : SetTemporaryAttributes
342 //=======================================================================
344 void AIS_InteractiveContext::
345 SetTemporaryAttributes(const Handle(AIS_InteractiveObject)& /*anObj*/,
346 const Handle(Prs3d_Drawer)& /*aDrawer*/,
347 const Standard_Boolean /*updateviewer*/)
351 //=======================================================================
352 //function : SubIntensityOn
354 //=======================================================================
355 void AIS_InteractiveContext::
356 SubIntensityOn(const Handle(AIS_InteractiveObject)& anIObj,
357 const Standard_Boolean updateviewer)
359 if(!HasOpenedContext()){
360 if(!myObjects.IsBound(anIObj))
362 const Handle(AIS_GlobalStatus)& GB=myObjects(anIObj);
363 if(GB->IsSubIntensityOn())
365 GB->SubIntensityOn();
366 Standard_Boolean UpdMain(Standard_False);
368 if (GB->GraphicStatus() == AIS_DS_Displayed)
370 myMainPM->Color (anIObj, mySubIntensity, GB->DisplayMode());
371 UpdMain = Standard_True;
379 if(myObjects.IsBound(anIObj)){
380 const Handle(AIS_GlobalStatus)& STAT = myObjects(anIObj);
381 STAT->SubIntensityOn();
382 myMainPM->Color (anIObj, mySubIntensity, STAT->DisplayMode());
385 myLocalContexts(myCurLocalIndex)->SubIntensityOn(anIObj);
387 if(updateviewer) myMainVwr->Update();
390 //=======================================================================
391 //function : SubIntensityOff
393 //=======================================================================
395 void AIS_InteractiveContext::
396 SubIntensityOff(const Handle(AIS_InteractiveObject)& anIObj,
397 const Standard_Boolean updateviewer)
399 if(!HasOpenedContext()){
400 if(!myObjects.IsBound(anIObj))
402 const Handle(AIS_GlobalStatus)& GB=myObjects(anIObj);
403 if(!GB->IsSubIntensityOn())
405 GB->SubIntensityOff();
406 Standard_Boolean UpdMain(Standard_False);
408 if(GB->GraphicStatus() == AIS_DS_Displayed)
410 myMainPM->Unhighlight (anIObj, GB->DisplayMode());
411 UpdMain = Standard_True;
414 Standard_Integer DM,HM,SM;
415 GetDefModes(anIObj,DM,HM,SM);
416 if(IsSelected(anIObj))
417 myMainPM->Highlight(anIObj,HM);
425 if(myObjects.IsBound(anIObj)){
426 const Handle(AIS_GlobalStatus)& STAT = myObjects(anIObj);
427 STAT->SubIntensityOff();
428 myMainPM->Unhighlight (anIObj, STAT->DisplayMode());
429 if(STAT->IsHilighted())
433 myLocalContexts(myCurLocalIndex)->SubIntensityOff(anIObj);
434 if(IsSelected(anIObj))
437 if(updateviewer) myMainVwr->Update();
441 //=======================================================================
442 //function : SubIntensityOn
443 //purpose : ALL THE DISPLAYED OBJECTS HAVE SUBINTENSITY...
444 //=======================================================================
446 void AIS_InteractiveContext::SubIntensityOn(const Standard_Boolean updateviewer)
448 if(!HasOpenedContext()) return;
450 AIS_DataMapIteratorOfDataMapOfIOStatus It (myObjects);
451 for(;It.More();It.Next()){
452 const Handle(AIS_GlobalStatus)& STAT = It.Value();
453 if(STAT->GraphicStatus()==AIS_DS_Displayed)
455 STAT->SubIntensityOn();
456 myMainPM->Color (It.Key(), mySubIntensity, STAT->DisplayMode());
459 if(updateviewer) myMainVwr->Update();
462 //=======================================================================
463 //function : SubIntensityOff
465 //=======================================================================
466 void AIS_InteractiveContext::SubIntensityOff(const Standard_Boolean updateviewer)
468 if(!HasOpenedContext()) return;
470 AIS_DataMapIteratorOfDataMapOfIOStatus It (myObjects);
471 for(;It.More();It.Next()){
472 const Handle(AIS_GlobalStatus)& STAT = It.Value();
473 if(STAT->IsSubIntensityOn())
474 STAT->SubIntensityOff();
475 myMainPM->Unhighlight (It.Key());
478 if(updateviewer) myMainVwr->Update();
481 //=======================================================================
482 //function : AddFilter
484 //=======================================================================
485 void AIS_InteractiveContext::AddFilter(const Handle(SelectMgr_Filter)& aFilter)
487 if(HasOpenedContext())
488 myLocalContexts(myCurLocalIndex)->AddFilter(aFilter);
490 myFilters->Add(aFilter);
493 //=======================================================================
494 //function : ActivateStandardMode
496 //=======================================================================
497 void AIS_InteractiveContext::ActivateStandardMode(const TopAbs_ShapeEnum aStandardActivation)
499 if(!HasOpenedContext()) return;
500 myLocalContexts(myCurLocalIndex)->ActivateStandardMode (aStandardActivation);
503 //=======================================================================
504 //function : DeActivateStandardMode
506 //=======================================================================
507 void AIS_InteractiveContext::DeactivateStandardMode(const TopAbs_ShapeEnum aStandardActivation)
509 if(!HasOpenedContext()) return;
510 myLocalContexts(myCurLocalIndex)->DeactivateStandardMode (aStandardActivation);
513 //=======================================================================
514 //function : RemoveFilter
516 //=======================================================================
517 void AIS_InteractiveContext::RemoveFilter(const Handle(SelectMgr_Filter)& aFilter)
519 if(HasOpenedContext())
520 myLocalContexts(myCurLocalIndex)->RemoveFilter (aFilter);
522 myFilters->Remove(aFilter);
525 //=======================================================================
526 //function : RemoveFilters
528 //=======================================================================
530 void AIS_InteractiveContext::RemoveFilters()
532 if(!HasOpenedContext())
535 myLocalContexts(myCurLocalIndex)->Clear(AIS_CM_Filters);
538 //=======================================================================
539 //function : ActivatedStandardModes
541 //=======================================================================
542 const TColStd_ListOfInteger& AIS_InteractiveContext::ActivatedStandardModes() const
544 return myLocalContexts(myCurLocalIndex)->StandardModes();
547 //=======================================================================
550 //=======================================================================
551 const SelectMgr_ListOfFilter& AIS_InteractiveContext::Filters() const
553 if(HasOpenedContext())
554 return myLocalContexts(myCurLocalIndex)->ListOfFilter();
555 return myFilters->StoredFilters();
558 //=======================================================================
559 //function : DisplayActiveSensitive
561 //=======================================================================
562 void AIS_InteractiveContext::DisplayActiveSensitive(const Handle(V3d_View)& aviou)
564 if(HasOpenedContext())
565 myLocalContexts(myCurLocalIndex)->DisplaySensitive(aviou);
567 myMainSel->DisplaySensitive(aviou);
569 //=======================================================================
570 //function : DisplayActiveSensitive
572 //=======================================================================
574 void AIS_InteractiveContext::DisplayActiveSensitive(const Handle(AIS_InteractiveObject)& anIObj,
575 const Handle(V3d_View)& aviou)
577 TColStd_ListIteratorOfListOfInteger It;
578 Handle(StdSelect_ViewerSelector3d) VS;
579 if(HasOpenedContext()){
580 const Handle(AIS_LocalContext)& LC = myLocalContexts(myCurLocalIndex);
581 if(!LC->IsIn(anIObj)) return;
582 It.Initialize(LC->SelectionModes(anIObj));
583 VS = LC->MainSelector();
586 if(!myObjects.IsBound(anIObj)) return;
587 It.Initialize(myObjects(anIObj)->SelectionModes());
592 for(;It.More();It.Next()){
593 const Handle(SelectMgr_Selection)& Sel = anIObj->Selection(It.Value());
594 VS->DisplaySensitive(Sel,anIObj->Transformation(), aviou,Standard_False);
599 //=======================================================================
600 //function : ClearActiveSensitive
602 //=======================================================================
603 void AIS_InteractiveContext::ClearActiveSensitive(const Handle(V3d_View)& aviou)
606 if(HasOpenedContext())
607 myLocalContexts(myCurLocalIndex)->ClearSensitive(aviou);
609 myMainSel->ClearSensitive(aviou);
612 //=======================================================================
613 //function : SetAutomaticHilight
615 //=======================================================================
616 void AIS_InteractiveContext::SetAutomaticHilight(const Standard_Boolean aStatus)
619 if(HasOpenedContext())
620 myLocalContexts(myCurLocalIndex)->SetAutomaticHilight(aStatus);
623 //=======================================================================
624 //function : AutomaticHilight
626 //=======================================================================
627 Standard_Boolean AIS_InteractiveContext::AutomaticHilight() const
629 if(HasOpenedContext())
630 return myLocalContexts(myCurLocalIndex)->AutomaticHilight();
631 return Standard_True;
634 //=======================================================================
635 //function : UseDisplayedObjects
637 //=======================================================================
639 void AIS_InteractiveContext::UseDisplayedObjects()
641 if(HasOpenedContext())
642 myLocalContexts(myCurLocalIndex)->LoadContextObjects();
645 //=======================================================================
646 //function : NotUseDisplayedObjects
648 //=======================================================================
650 void AIS_InteractiveContext::NotUseDisplayedObjects()
652 if(HasOpenedContext())
653 myLocalContexts(myCurLocalIndex)->UnloadContextObjects();
659 //=======================================================================
660 //function : PurgeDisplay
662 //=======================================================================
664 Standard_Integer AIS_InteractiveContext::PurgeDisplay()
666 if(HasOpenedContext()) return 0;
668 Standard_Integer NbStr = PurgeViewer(myMainVwr);
675 //=======================================================================
676 //function : PurgeViewer
678 //=======================================================================
679 Standard_Integer AIS_InteractiveContext::PurgeViewer(const Handle(V3d_Viewer)& Vwr)
681 Handle(Graphic3d_StructureManager) GSM = Vwr->StructureManager();
682 Standard_Integer NbCleared(0);
683 Graphic3d_MapOfStructure SOS;
684 GSM->DisplayedStructures(SOS);
686 Handle(Graphic3d_Structure) G;
687 for(Graphic3d_MapIteratorOfMapOfStructure It(SOS); It.More();It.Next()){
689 Standard_Address Add = G->Owner();
692 G->Clear();// it means that it is not referenced as a presentation of InterfactiveObject...
695 Handle(AIS_InteractiveObject) IO = (AIS_InteractiveObject*)Add;
696 if(!myObjects.IsBound(IO)){
704 //=======================================================================
705 //function : IsImmediateModeOn
707 //=======================================================================
709 Standard_Boolean AIS_InteractiveContext::IsImmediateModeOn() const
711 if(!HasOpenedContext()) return Standard_False;
712 return myLocalContexts(myCurLocalIndex)->IsImmediateModeOn();
715 //=======================================================================
716 //function : BeginImmediateDraw
718 //=======================================================================
720 Standard_Boolean AIS_InteractiveContext::BeginImmediateDraw()
722 return HasOpenedContext()
723 && myLocalContexts (myCurLocalIndex)->BeginImmediateDraw();
726 //=======================================================================
727 //function : ImmediateAdd
729 //=======================================================================
731 Standard_Boolean AIS_InteractiveContext::ImmediateAdd (const Handle(AIS_InteractiveObject)& theObj,
732 const Standard_Integer theMode)
734 return HasOpenedContext()
735 && myLocalContexts (myCurLocalIndex)->ImmediateAdd (theObj, theMode);
738 //=======================================================================
739 //function : EndImmediateDraw
741 //=======================================================================
743 Standard_Boolean AIS_InteractiveContext::EndImmediateDraw (const Handle(V3d_View)& theView)
745 return HasOpenedContext()
746 && myLocalContexts (myCurLocalIndex)->EndImmediateDraw (theView->Viewer());
749 //=======================================================================
750 //function : EndImmediateDraw
752 //=======================================================================
754 Standard_Boolean AIS_InteractiveContext::EndImmediateDraw()
756 if (!HasOpenedContext())
758 return Standard_False;
761 myMainVwr->InitActiveViews();
762 if (!myMainVwr->MoreActiveViews())
764 return Standard_False;
767 Handle(V3d_View) aView = myMainVwr->ActiveView();
768 return myLocalContexts (myCurLocalIndex)->EndImmediateDraw (aView->Viewer());
772 //=======================================================================
773 //function : ResetOriginalState
775 //=======================================================================
777 void AIS_InteractiveContext::ResetOriginalState(const Standard_Boolean updateviewer)
779 Standard_Boolean upd_main(Standard_False);
780 TColStd_ListIteratorOfListOfInteger itl;
781 myMainSel->ResetSelectionActivationStatus();
783 for (AIS_DataMapIteratorOfDataMapOfIOStatus it(myObjects);it.More();it.Next()){
784 const Handle(AIS_InteractiveObject)& iobj = it.Key();
785 const Handle(AIS_GlobalStatus)& STAT = it.Value();
786 switch(STAT->GraphicStatus()){
787 case AIS_DS_Displayed:{
788 upd_main = Standard_True;
791 myMainPM->Display (iobj, STAT->DisplayMode());
792 if(STAT->IsHilighted()){
793 if(STAT->HilightColor()!=Quantity_NOC_WHITE)
794 HilightWithColor(iobj,STAT->HilightColor(),Standard_False);
796 Hilight(iobj,Standard_False);
799 for(itl.Initialize(STAT->SelectionModes());itl.More();itl.Next()){
801 mgrSelector->Activate(iobj,itl.Value(),myMainSel);
806 EraseGlobal(iobj,Standard_False);
819 //=======================================================================
820 //function : SetZDetection
822 //=======================================================================
823 void AIS_InteractiveContext::SetZDetection(const Standard_Boolean aStatus)
825 myZDetectionFlag = aStatus;
828 //=======================================================================
829 //function : ZDetection
831 //=======================================================================
832 Standard_Boolean AIS_InteractiveContext::ZDetection() const
834 return myZDetectionFlag;