From: apo Date: Tue, 25 Oct 2005 13:16:24 +0000 (+0000) Subject: Documentation of the sources X-Git-Tag: TG-D5-38-2003_D2005-29-12~45 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e1f4e865024f689d8c42a8bf9182c1b562d1f3f9;p=modules%2Fgui.git Documentation of the sources --- diff --git a/src/SVTK/SVTK_Selector.h b/src/SVTK/SVTK_Selector.h index 8f29b3c94..37ec0acb1 100644 --- a/src/SVTK/SVTK_Selector.h +++ b/src/SVTK/SVTK_Selector.h @@ -41,6 +41,14 @@ class SALOME_Actor; +//! Define an abstract interface for selection in SVTK package +/*! + The class implements selection functionality through storing corresponding + references to #SALOME_InteractiveObject. For implementation of subselection + modes it keeps a corresponding map of sub indexes. + \note + Also, for each #SALOME_InteractiveObject it tries to keep corresponding refenrence to #SALOME_Actor + */ class SVTK_Selector: public vtkObject { public: @@ -48,86 +56,111 @@ public: vtkTypeMacro(SVTK_Selector,vtkObject); + //! To change current Selection_Mode (as outside effect, it invokes selectionChange signal) virtual void SetSelectionMode(Selection_Mode theMode) = 0; + //! Get current Selection_Mode virtual Selection_Mode SelectionMode() const = 0; + //! Clear selection virtual void ClearIObjects() = 0; + //! Try to find corresponding #SALOME_Actor for given reference on #SALOME_InteractiveObject virtual SALOME_Actor* GetActor(const Handle(SALOME_InteractiveObject)& theIO) const = 0; + //! Check, is the #SALOME_InteractiveObject is present into selection virtual bool IsSelected(const Handle(SALOME_InteractiveObject)& theIO) const = 0; + //! Check, is the #SALOME_Actor is present into selection virtual bool IsSelected(SALOME_Actor* theActor) const = 0; + //! Modify the selection by adding new reference on #SALOME_InteractiveObject virtual bool AddIObject(const Handle(SALOME_InteractiveObject)& theIO) = 0; + //! Modify the selection by adding new reference on #SALOME_Actor virtual bool AddIObject(SALOME_Actor* theActor) = 0; + //! Modify the selection by removing a reference on #SALOME_InteractiveObject virtual bool RemoveIObject(const Handle(SALOME_InteractiveObject)& theIO) = 0; + //! Modify the selection by removing a reference on #SALOME_Actor virtual bool RemoveIObject(SALOME_Actor* theActor) = 0; + //! Get all #SALOME_InteractiveObject references that is present into selection virtual const SALOME_ListIO& StoredIObjects() const = 0; + //! Get number of selected objects virtual int IObjectCount() const = 0; + //! Check, if the #SALOME_InteractiveObject has a subselection virtual bool HasIndex(const Handle(SALOME_InteractiveObject)& theIO ) const = 0; + //! Get indexes of subslection for given #SALOME_InteractiveObject virtual void GetIndex( const Handle(SALOME_InteractiveObject)& theIO, TColStd_IndexedMapOfInteger& theIndex ) = 0; + //! Change indexes of subslection for given #SALOME_InteractiveObject virtual bool AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, const TColStd_IndexedMapOfInteger& theIndices, bool theIsModeShift) = 0; + + //! Change indexes of subslection for given #SALOME_InteractiveObject virtual bool AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, const TColStd_MapOfInteger& theIndices, bool theIsModeShift) = 0; + + //! Change index of subslection for given #SALOME_InteractiveObject virtual bool AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, int theIndex, bool theIsModeShift) = 0; + + //! Change index of subslection for given #SALOME_InteractiveObject virtual void RemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, int theIndex) = 0; + + //! Check, if the given index is present in subslection virtual bool IsIndexSelected(const Handle(SALOME_InteractiveObject)& theIO, int theIndex) const = 0; + + //! Clear subselection virtual void ClearIndex() = 0; @@ -135,26 +168,31 @@ public: //---------------------------------------------------------------------------- typedef int TFilterID; + //! To apply a filter on the selection virtual void SetFilter(const Handle(VTKViewer_Filter)& theFilter) = 0; + //! To get a section filter by its number virtual Handle(VTKViewer_Filter) GetFilter(const TFilterID theId) const = 0; + //! Check, if a filter with given number is applyed virtual bool IsFilterPresent(const TFilterID theId) const = 0; + //! To remove a filter from the selection virtual void RemoveFilter(const TFilterID theId) = 0; + //! Check, if the index satisfy to the installed filters virtual bool IsValid(SALOME_Actor* theActor, - const TFilterID theId, + const int theId, const bool theIsNode = false) const = 0; //---------------------------------------------------------------------------- @@ -162,6 +200,7 @@ public: void StartPickCallback() = 0; + //! To invoke selectionChanged signals virtual void EndPickCallback() = 0;