Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions
SelectMgr_SelectionManager Class Reference

A framework to manage selection from the point of
view of viewer selectors. These can be added and
removed, and selection modes can be activated and
deactivated. In addition, objects may be known to all
selectors or only to some.
More...

#include <SelectMgr_SelectionManager.hxx>

Inheritance diagram for SelectMgr_SelectionManager:
Inheritance graph
[legend]

Public Member Functions

 SelectMgr_SelectionManager ()
 Constructs an empty selection manager object.
More...
 
void Add (const Handle< SelectMgr_ViewerSelector > &aSelector)
 Adds the viewer selector aSelector to this framework.
More...
 
void Remove (const Handle< SelectMgr_ViewerSelector > &aSelector)
 
Standard_Boolean Contains (const Handle< SelectMgr_ViewerSelector > &aSelector) const
 Returns true if this framework contains the viewer selector aSelector.
More...
 
Standard_Boolean Contains (const Handle< SelectMgr_SelectableObject > &aSelectableObject) const
 
 Returns true if this framework contains the <br>

selectable object aSelectableObject.
More...

 
void Load (const Handle< SelectMgr_SelectableObject > &anObject, const Standard_Integer aMode=-1)
 Loads and computes one mode of
selection if <aMode> notequal -1 ;
if <anObject> already has a
selection with this mode, it's emptied and the sensitive
entities are computed for this mode else one Selection
is created with this mode before computing.
More...
 
void Load (const Handle< SelectMgr_SelectableObject > &anObject, const Handle< SelectMgr_ViewerSelector > &aSelector, const Standard_Integer aMode=-1)
 Local object available for
<aSelector> Only. the sensitive entities for selection
of mode <aMode> are computed if <aMode> not equal -1.
if <aMode> =-1 oc compute is done
More...
 
void Remove (const Handle< SelectMgr_SelectableObject > &anObject)
 removes the object from All the ViewerSelectors where it was;
More...
 
void Remove (const Handle< SelectMgr_SelectableObject > &anObject, const Handle< SelectMgr_ViewerSelector > &aSelector)
 removes the object from aSelector;
More...
 
void Activate (const Handle< SelectMgr_SelectableObject > &anObject, const Standard_Integer aMode=0, const Standard_Boolean AutomaticProj=Standard_True)
 
 Activates the selection mode aMode in a selector <br>

for the selectable object anObject.
More...

 
void Activate (const Handle< SelectMgr_SelectableObject > &anObject, const Standard_Integer aMode, const Handle< SelectMgr_ViewerSelector > &aSelector, const Standard_Boolean AutomaticProj=Standard_True)
 
 Activates the selection mode aMode in the selector <br>

aSelector for the selectable object anObject.
More...

 
void Deactivate (const Handle< SelectMgr_SelectableObject > &anObject)
 Deactivate all the activated modes in any
Selector for <anObject>
More...
 
void Deactivate (const Handle< SelectMgr_SelectableObject > &anObject, const Standard_Integer aMode)
 Deactivates the Mode <aMode> in every Selector where
it was activated
More...
 
void Deactivate (const Handle< SelectMgr_SelectableObject > &anObject, const Standard_Integer aMode, const Handle< SelectMgr_ViewerSelector > &aSelector)
 
 Deactivates the selection mode aMode in the <br>

selector aSelector for the selectable object anObject.
More...

 
void Deactivate (const Handle< SelectMgr_SelectableObject > &anObject, const Handle< SelectMgr_ViewerSelector > &aSelector)
 
Deactivates all selection modes in the selector <br>

aSelector for the selectable object anObject.
More...

 
void Sleep (const Handle< SelectMgr_ViewerSelector > &aSelector)
 Ensures that no object in the selector aSelector will be active.
More...
 
void Sleep (const Handle< SelectMgr_SelectableObject > &anObject)
 the objet is temporarily deactivated everywhere it was activated.
More...
 
void Sleep (const Handle< SelectMgr_SelectableObject > &anObject, const Handle< SelectMgr_ViewerSelector > &aSelector)
 Different from Deactivate; this method
deactivates the activated modes of an object,
but just for a time; when the Awake Method is called
the sleeping modes are reactivated.
More...
 
void Awake (const Handle< SelectMgr_ViewerSelector > &aSelector, const Standard_Boolean AutomaticProj=Standard_True)
 activates all the deactivated objects in a selector.
More...
 
void Awake (const Handle< SelectMgr_SelectableObject > &anObject, const Standard_Boolean AutomaticProj=Standard_True)
 
void Awake (const Handle< SelectMgr_SelectableObject > &anObject, const Handle< SelectMgr_ViewerSelector > &aSelector, const Standard_Boolean AutomaticProj=Standard_True)
 activates all the deactivated modes
of an object in a selector
More...
 
Standard_Boolean IsActivated (const Handle< SelectMgr_SelectableObject > &anObject) const
 Returns true if the selection is active for the selectable object anObject.
More...
 
Standard_Boolean IsActivated (const Handle< SelectMgr_SelectableObject > &anObject, const Standard_Integer aMode) const
 Returns true if the selection mode aMode is active for the selectable object anObject.
More...
 
Standard_Boolean IsActivated (const Handle< SelectMgr_SelectableObject > &anObject, const Handle< SelectMgr_ViewerSelector > &aSelector, const Standard_Integer aMode) const
 Returns true if the selection mode aMode is active for the selectable
object anObject in the viewer selector aSelector.
More...
 
void RecomputeSelection (const Handle< SelectMgr_SelectableObject > &anIObj, const Standard_Boolean ForceUpdate=Standard_False, const Standard_Integer aMode=-1)
 computes Selections in <anIObj> if they are
activated in at least one Selector.
puts a recompute flag in each selection which is not active.
if <aMode>=-1 all the selection modes will have to be
recomputed.
if <ForceUpdate> = True, all selections are recomputed,
even if they are not active.
More...
 
void Update (const Handle< SelectMgr_SelectableObject > &anObject, const Standard_Boolean ForceUpdate=Standard_True)
 updates the selectionModes of <anObject>
According to
. the stored type of update in each selection
mode,
. the activation status of each selection mode
if <ForceUpdate> == True Recompute
More...
 
void Update (const Handle< SelectMgr_SelectableObject > &anObject, const Handle< SelectMgr_ViewerSelector > &aSelector, const Standard_Boolean ForceUpdate=Standard_True)
 
void SetUpdateMode (const Handle< SelectMgr_SelectableObject > &anObject, const SelectMgr_TypeOfUpdate aType)
 
void SetUpdateMode (const Handle< SelectMgr_SelectableObject > &anObject, const Standard_Integer aSelMode, const SelectMgr_TypeOfUpdate aType)
 
TCollection_AsciiString Status () const
 
TCollection_AsciiString Status (const Handle< SelectMgr_SelectableObject > &anObject) const
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void ShallowDump (Standard_OStream &) const
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Detailed Description

A framework to manage selection from the point of
view of viewer selectors. These can be added and
removed, and selection modes can be activated and
deactivated. In addition, objects may be known to all
selectors or only to some.

Constructor & Destructor Documentation

SelectMgr_SelectionManager::SelectMgr_SelectionManager ( )

Constructs an empty selection manager object.

Member Function Documentation

void SelectMgr_SelectionManager::Activate ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Standard_Integer  aMode = 0,
const Standard_Boolean  AutomaticProj = Standard_True 
)

 Activates the selection mode aMode in a selector <br>

for the selectable object anObject.

void SelectMgr_SelectionManager::Activate ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Standard_Integer  aMode,
const Handle< SelectMgr_ViewerSelector > &  aSelector,
const Standard_Boolean  AutomaticProj = Standard_True 
)

 Activates the selection mode aMode in the selector <br>

aSelector for the selectable object anObject.

void SelectMgr_SelectionManager::Add ( const Handle< SelectMgr_ViewerSelector > &  aSelector)

Adds the viewer selector aSelector to this framework.

void SelectMgr_SelectionManager::Awake ( const Handle< SelectMgr_ViewerSelector > &  aSelector,
const Standard_Boolean  AutomaticProj = Standard_True 
)

activates all the deactivated objects in a selector.

void SelectMgr_SelectionManager::Awake ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Standard_Boolean  AutomaticProj = Standard_True 
)
void SelectMgr_SelectionManager::Awake ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Handle< SelectMgr_ViewerSelector > &  aSelector,
const Standard_Boolean  AutomaticProj = Standard_True 
)

activates all the deactivated modes
of an object in a selector

Standard_Boolean SelectMgr_SelectionManager::Contains ( const Handle< SelectMgr_ViewerSelector > &  aSelector) const

Returns true if this framework contains the viewer selector aSelector.

Standard_Boolean SelectMgr_SelectionManager::Contains ( const Handle< SelectMgr_SelectableObject > &  aSelectableObject) const

 Returns true if this framework contains the <br>

selectable object aSelectableObject.

void SelectMgr_SelectionManager::Deactivate ( const Handle< SelectMgr_SelectableObject > &  anObject)

Deactivate all the activated modes in any
Selector for <anObject>

void SelectMgr_SelectionManager::Deactivate ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Standard_Integer  aMode 
)

Deactivates the Mode <aMode> in every Selector where
it was activated

void SelectMgr_SelectionManager::Deactivate ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Standard_Integer  aMode,
const Handle< SelectMgr_ViewerSelector > &  aSelector 
)

 Deactivates the selection mode aMode in the <br>

selector aSelector for the selectable object anObject.

void SelectMgr_SelectionManager::Deactivate ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Handle< SelectMgr_ViewerSelector > &  aSelector 
)

Deactivates all selection modes in the selector <br>

aSelector for the selectable object anObject.

Standard_Boolean SelectMgr_SelectionManager::IsActivated ( const Handle< SelectMgr_SelectableObject > &  anObject) const

Returns true if the selection is active for the selectable object anObject.

Standard_Boolean SelectMgr_SelectionManager::IsActivated ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Standard_Integer  aMode 
) const

Returns true if the selection mode aMode is active for the selectable object anObject.

Standard_Boolean SelectMgr_SelectionManager::IsActivated ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Handle< SelectMgr_ViewerSelector > &  aSelector,
const Standard_Integer  aMode 
) const

Returns true if the selection mode aMode is active for the selectable
object anObject in the viewer selector aSelector.

void SelectMgr_SelectionManager::Load ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Standard_Integer  aMode = -1 
)

Loads and computes one mode of
selection if <aMode> notequal -1 ;
if <anObject> already has a
selection with this mode, it's emptied and the sensitive
entities are computed for this mode else one Selection
is created with this mode before computing.

void SelectMgr_SelectionManager::Load ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Handle< SelectMgr_ViewerSelector > &  aSelector,
const Standard_Integer  aMode = -1 
)

Local object available for
<aSelector> Only. the sensitive entities for selection
of mode <aMode> are computed if <aMode> not equal -1.
if <aMode> =-1 oc compute is done

void SelectMgr_SelectionManager::RecomputeSelection ( const Handle< SelectMgr_SelectableObject > &  anIObj,
const Standard_Boolean  ForceUpdate = Standard_False,
const Standard_Integer  aMode = -1 
)

computes Selections in <anIObj> if they are
activated in at least one Selector.
puts a recompute flag in each selection which is not active.
if <aMode>=-1 all the selection modes will have to be
recomputed.
if <ForceUpdate> = True, all selections are recomputed,
even if they are not active.

void SelectMgr_SelectionManager::Remove ( const Handle< SelectMgr_ViewerSelector > &  aSelector)
void SelectMgr_SelectionManager::Remove ( const Handle< SelectMgr_SelectableObject > &  anObject)

removes the object from All the ViewerSelectors where it was;

void SelectMgr_SelectionManager::Remove ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Handle< SelectMgr_ViewerSelector > &  aSelector 
)

removes the object from aSelector;

void SelectMgr_SelectionManager::SetUpdateMode ( const Handle< SelectMgr_SelectableObject > &  anObject,
const SelectMgr_TypeOfUpdate  aType 
)
void SelectMgr_SelectionManager::SetUpdateMode ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Standard_Integer  aSelMode,
const SelectMgr_TypeOfUpdate  aType 
)
void SelectMgr_SelectionManager::Sleep ( const Handle< SelectMgr_ViewerSelector > &  aSelector)

Ensures that no object in the selector aSelector will be active.

void SelectMgr_SelectionManager::Sleep ( const Handle< SelectMgr_SelectableObject > &  anObject)

the objet is temporarily deactivated everywhere it was activated.

void SelectMgr_SelectionManager::Sleep ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Handle< SelectMgr_ViewerSelector > &  aSelector 
)

Different from Deactivate; this method
deactivates the activated modes of an object,
but just for a time; when the Awake Method is called
the sleeping modes are reactivated.

TCollection_AsciiString SelectMgr_SelectionManager::Status ( ) const
TCollection_AsciiString SelectMgr_SelectionManager::Status ( const Handle< SelectMgr_SelectableObject > &  anObject) const
void SelectMgr_SelectionManager::Update ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Standard_Boolean  ForceUpdate = Standard_True 
)

updates the selectionModes of <anObject>
According to
. the stored type of update in each selection
mode,
. the activation status of each selection mode
if <ForceUpdate> == True Recompute

void SelectMgr_SelectionManager::Update ( const Handle< SelectMgr_SelectableObject > &  anObject,
const Handle< SelectMgr_ViewerSelector > &  aSelector,
const Standard_Boolean  ForceUpdate = Standard_True 
)

The documentation for this class was generated from the following file: