Salome HOME
Merge changes from 'master' branch.
[modules/gui.git] / src / SVTK / SVTK_Selector.h
index a745648a0058be483460058323005b669491bd5f..7b33b3d36964c9b6579b1bb4fa7678ad57c6c57e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 #include "SVTK.h"
 #include "SVTK_Selection.h"
+#include "SVTK_Hash.h"
+
 #include "SALOME_ListIO.hxx"
 
+#include <VTKViewer_Filter.h>
+
 #include <TColStd_MapOfInteger.hxx>
 #include <TColStd_IndexedMapOfInteger.hxx>
 
 #include <vtkObject.h>
 
-class Handle(VTKViewer_Filter);
-
+class SALOME_InteractiveObject;
 class SALOME_Actor;
 class SVTK_SelectionEvent;
 class vtkActorCollection;
 class vtkRenderer;
-class Handle(SALOME_InteractiveObject);
 
 //! Define an abstract interface for selection in SVTK package
 /*!
@@ -168,6 +170,48 @@ public:
   void 
   ClearIndex() = 0;
 
+  /// ! Composite indexes 
+  virtual
+  bool 
+  HasCompositeIndex(const Handle(SALOME_InteractiveObject)& theIO ) const = 0;
+
+  //! Get composite indexes of subslection for given #SALOME_InteractiveObject
+  virtual
+  void 
+  GetCompositeIndex( const Handle(SALOME_InteractiveObject)& theIO, 
+                    SVTK_IndexedMapOfIds& theIds ) = 0;
+        
+  //! Change composite indices of subselection for given #SALOME_InteractiveObject
+  virtual
+  bool 
+  AddOrRemoveCompositeIndex( const Handle(SALOME_InteractiveObject)& theIO, 
+                            const SVTK_IndexedMapOfIds& theIds,
+                            bool theIsModeShift) = 0;
+
+  //! Change composite index of subslection for given #SALOME_InteractiveObject
+  virtual
+  bool
+  AddOrRemoveCompositeIndex( const Handle(SALOME_InteractiveObject)& theIO, 
+                            SVTK_ListOfInteger ids, 
+                            bool theIsModeShift) = 0;
+
+  //! Change composite index of subslection for given #SALOME_InteractiveObject
+  virtual
+  void 
+  RemoveCompositeIndex( const Handle(SALOME_InteractiveObject)& theIO, 
+                       SVTK_ListOfInteger ids ) = 0;
+
+  //! Check, if the given composite index is present in subselection 
+  virtual
+  bool 
+  IsCompositeIndexSelected(const Handle(SALOME_InteractiveObject)& theIO, 
+                          SVTK_ListOfInteger ids ) const = 0;
+
+  //! Clear composite indexes subselection
+  virtual
+  void 
+  ClearCompositeIndex() = 0;
+
   //----------------------------------------------------------------------------
   typedef int TFilterID;
 
@@ -224,6 +268,22 @@ public:
   virtual
   bool
   GetDynamicPreSelection() const = 0;
+
+  virtual
+  void
+  SetPreSelectionEnabled( bool theEnabled ) = 0;
+
+  virtual
+  bool
+  IsPreSelectionEnabled() const = 0;
+
+  virtual
+  void
+  SetSelectionEnabled( bool theEnabled ) = 0;
+
+  virtual
+  bool
+  IsSelectionEnabled() const = 0;
 };