diff --git a/src/AIS/AIS.cdl b/src/AIS/AIS.cdl index 6373896482..b1885a7c55 100755 --- a/src/AIS/AIS.cdl +++ b/src/AIS/AIS.cdl @@ -318,7 +318,7 @@ is class GraphicTool; - private class LocalContext; + class LocalContext; private class LocalStatus; diff --git a/src/AIS/AIS_InteractiveContext.cdl b/src/AIS/AIS_InteractiveContext.cdl index 57090f2912..bbab4298c0 100755 --- a/src/AIS/AIS_InteractiveContext.cdl +++ b/src/AIS/AIS_InteractiveContext.cdl @@ -2038,6 +2038,18 @@ is ---Category: Internal + ---Category: Internal + + LocalContext(me) returns LocalContext from AIS; + ---Level: Internal + ---Purpose: + -- This method is only intended for advanced operation, particularly with + -- the aim to improve performance when many objects have to be selected + -- together. Otherwise, you should use other (non-internal) methods of + -- class AIS_InteractiveContext without trying to obtain an instance of + -- AIS_LocalContext. + ---C++: inline + SelectionManager(me) returns any SelectionManager from SelectMgr; ---C++: inline ---C++: return const & diff --git a/src/AIS/AIS_InteractiveContext.lxx b/src/AIS/AIS_InteractiveContext.lxx index aa334668da..f9226dddc3 100755 --- a/src/AIS/AIS_InteractiveContext.lxx +++ b/src/AIS/AIS_InteractiveContext.lxx @@ -77,6 +77,9 @@ inline const Handle(PrsMgr_PresentationManager3d)& AIS_InteractiveContext::Colle inline Standard_Boolean AIS_InteractiveContext::HasOpenedContext() const {return myCurLocalIndex != 0;} +inline Handle_AIS_LocalContext AIS_InteractiveContext::LocalContext() const +{ return (myCurLocalIndex > 0) ? myLocalContexts(myCurLocalIndex) : NULL; } + inline const TCollection_AsciiString& AIS_InteractiveContext::CurrentName() const {return myCurrentName;} diff --git a/src/AIS/AIS_LocalContext.cdl b/src/AIS/AIS_LocalContext.cdl index 7245e186c0..bb3a3cb673 100755 --- a/src/AIS/AIS_LocalContext.cdl +++ b/src/AIS/AIS_LocalContext.cdl @@ -20,7 +20,7 @@ ---Copyright: Matra Datavision 1996 -private class LocalContext from AIS inherits TShared from MMgt +class LocalContext from AIS inherits TShared from MMgt ---Purpose: Defines a specific context for selection. -- It becomes possible to: @@ -531,10 +531,10 @@ is FindSelectedOwnerFromIO(me;anIObj:InteractiveObject from AIS) - returns EntityOwner from SelectMgr is private; + returns EntityOwner from SelectMgr; FindSelectedOwnerFromShape(me;aShape : Shape from TopoDS) - returns EntityOwner from SelectMgr is private; + returns EntityOwner from SelectMgr;