Salome HOME
0bcd90bc79b19c56e030dcdd5d0954f5465a5b25
[modules/gui.git] / src / SVTK / SVTK_Selector.h
1 //  SALOME SALOMEGUI : implementation of desktop and GUI kernel
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
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. 
10 // 
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. 
15 // 
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 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : SALOME_Selection.h
25 //  Author : Nicolas REJNERI
26 //  Module : SALOME
27 //  $Header$
28
29 #ifndef SVTK_SELECTOR_H
30 #define SVTK_SELECTOR_H
31
32 #include <TColStd_MapOfInteger.hxx>
33
34 #include "SVTK_Selection.h"
35 #include "SALOME_ListIO.hxx"
36 #include "SALOME_InteractiveObject.hxx"
37 #include "SALOME_DataMapOfIOMapOfInteger.hxx"
38
39 class SALOME_Actor;
40
41 class SVTK_Selector
42 {
43 public:
44   virtual ~SVTK_Selector() = 0;
45
46   virtual
47   void 
48   SetSelectionMode( Selection_Mode theMode ) = 0;
49
50   virtual
51   Selection_Mode
52   SelectionMode() const = 0;
53
54   virtual
55   void
56   ClearIObjects() = 0;
57
58   virtual
59   SALOME_Actor* 
60   GetActor(const Handle(SALOME_InteractiveObject)& theIO) const = 0;
61
62   virtual
63   bool
64   IsSelected(const Handle(SALOME_InteractiveObject)& theIO) const = 0;
65
66   virtual
67   bool
68   IsSelected(SALOME_Actor* theActor) const = 0;
69
70   virtual
71   bool
72   AddIObject(const Handle(SALOME_InteractiveObject)& theIO) = 0;
73
74   virtual
75   bool
76   AddIObject(SALOME_Actor* theActor) = 0;
77
78   virtual
79   bool 
80   RemoveIObject(const Handle(SALOME_InteractiveObject)& theIO) = 0;
81
82   virtual
83   bool 
84   RemoveIObject(SALOME_Actor* theActor) = 0;
85
86   virtual
87   const SALOME_ListIO& 
88   StoredIObjects() const = 0;
89
90   virtual
91   int 
92   IObjectCount() const = 0;
93
94   virtual
95   bool 
96   HasIndex(const Handle(SALOME_InteractiveObject)& theIO ) const = 0;
97
98   virtual
99   void 
100   GetIndex( const Handle(SALOME_InteractiveObject)& theIO, 
101             TColStd_IndexedMapOfInteger& theIndex ) = 0;
102         
103   virtual
104   bool 
105   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
106                     const TColStd_IndexedMapOfInteger& theIndices, 
107                     bool theIsModeShift) = 0;
108   virtual
109   bool 
110   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
111                     const TColStd_MapOfInteger& theIndices, 
112                     bool theIsModeShift) = 0;
113   virtual
114   bool
115   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
116                     int theIndex, 
117                     bool theIsModeShift) = 0;
118   virtual
119   void 
120   RemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
121                int theIndex) = 0;
122   virtual
123   bool 
124   IsIndexSelected(const Handle(SALOME_InteractiveObject)& theIO, 
125                   int theIndex) const = 0;
126   virtual
127   void 
128   ClearIndex() = 0;
129 };
130
131
132 #endif