1 // SALOME SALOMEGUI : implementation of desktop and GUI kernel
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SALOME_Selection.h
25 // Author : Nicolas REJNERI
29 #ifndef SVTK_SELECTORDEF_H
30 #define SVTK_SELECTORDEF_H
32 #include <NCollection_DataMap.hxx>
33 #include <vtkSmartPointer.h>
34 #include <TColStd_MapOfInteger.hxx>
36 #include "SVTK_Selector.h"
41 class SVTK_ViewWindow;
43 class SVTK_SelectorDef: public SVTK_Selector
47 virtual ~SVTK_SelectorDef();
51 SetSelectionMode( Selection_Mode theMode );
55 SelectionMode() const { return mySelectionMode; }
63 GetActor(const Handle(SALOME_InteractiveObject)& theIO) const;
67 IsSelected(const Handle(SALOME_InteractiveObject)& theIO) const;
71 IsSelected(SALOME_Actor* theActor) const;
75 AddIObject(const Handle(SALOME_InteractiveObject)& theIO);
79 AddIObject(SALOME_Actor* theActor);
83 RemoveIObject(const Handle(SALOME_InteractiveObject)& theIO);
87 RemoveIObject(SALOME_Actor* theActor);
91 StoredIObjects() const;
99 HasIndex(const Handle(SALOME_InteractiveObject)& theIO ) const;
103 GetIndex( const Handle(SALOME_InteractiveObject)& theIO,
104 TColStd_IndexedMapOfInteger& theIndex );
108 AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO,
109 const TColStd_IndexedMapOfInteger& theIndices,
110 bool theIsModeShift);
113 AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO,
114 const TColStd_MapOfInteger& theIndices,
115 bool theIsModeShift);
118 AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO,
120 bool theIsModeShift);
123 RemoveIndex( const Handle(SALOME_InteractiveObject)& theIO,
127 IsIndexSelected(const Handle(SALOME_InteractiveObject)& theIO,
134 typedef NCollection_DataMap<Handle(SALOME_InteractiveObject),
135 vtkSmartPointer<SALOME_Actor> > TIO2Actors;
136 TIO2Actors myIO2Actors;
137 Selection_Mode mySelectionMode;
138 SALOME_ListIO myIObjects;
139 SALOME_DataMapOfIOMapOfInteger myMapIOSubIndex;