1 // SALOME OCCViewer : build OCC Viewer into Salome desktop
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 : OCCViewer_AISSelector.h
25 // Author : Nicolas REJNERI
29 #ifndef OCCViewer_AISSELECTOR_H
30 #define OCCViewer_AISSELECTOR_H
37 // Open CASCADE Includes
38 #include <Quantity_NameOfColor.hxx>
39 #include <AIS_InteractiveContext.hxx>
41 class QAD_EXPORT OCCViewer_AISSelector : public QObject
49 OCCViewer_AISSelector( const Handle (AIS_InteractiveContext)& );
50 ~OCCViewer_AISSelector();
53 void moveTo ( int, int, const Handle (V3d_View)& );
54 void select ( int, int, int, int, const Handle (V3d_View)& );
55 void shiftSelect ( int, int, int, int, const Handle (V3d_View)& );
59 void setContext ( const Handle (AIS_InteractiveContext)& );
60 void setHilightColor ( Quantity_NameOfColor color );
61 void setSelectColor ( Quantity_NameOfColor color );
63 void enableSelection( bool );
64 void enableMultipleSelection( bool );
67 void selSelectionDone( bool bAdded );
68 void selSelectionCancel( bool bAdded );
71 void checkSelection ( int numBefore );
72 int numSelected() const;
75 Handle (AIS_InteractiveContext) myAISContext; // graphic context
76 Quantity_NameOfColor myHilightColor; // color for hilight object
77 Quantity_NameOfColor mySelectColor; // color for selected object
79 bool myEnableSelection;
80 bool myEnableMultipleSelection;