Salome HOME
This commit was generated by cvs2git to track changes on a CVS vendor
[modules/kernel.git] / src / OCCViewer / OCCViewer_AISSelector.h
1 //  SALOME OCCViewer : build OCC Viewer into Salome desktop
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   : OCCViewer_AISSelector.h
25 //  Author : Nicolas REJNERI
26 //  Module : SALOME
27 //  $Header$
28
29 #ifndef OCCViewer_AISSELECTOR_H
30 #define OCCViewer_AISSELECTOR_H
31
32 #include "QAD.h"
33 #include "OCCViewer_Selector.h"
34
35 // Open CASCADE Includes
36 #include <Quantity_NameOfColor.hxx>
37 #include <AIS_InteractiveContext.hxx>
38
39 class QAD_EXPORT OCCViewer_AISSelector : public OCCViewer_Selector
40 {
41   Q_OBJECT
42
43   void  initialize();
44   void  cleanup();
45
46 public:
47   OCCViewer_AISSelector( const Handle (AIS_InteractiveContext)& );
48   ~OCCViewer_AISSelector();
49
50 public:
51   bool  moveTo ( int, int, const Handle (V3d_View)& );
52   bool  select ( int, int, int, int, const Handle (V3d_View)& );
53   bool  shiftSelect ( int, int, int, int, const Handle (V3d_View)& );
54   bool  select ();
55   bool  shiftSelect ();
56
57   void  setContext ( const Handle (AIS_InteractiveContext)& );
58   void  setHilightColor ( Quantity_NameOfColor color );
59   void  setSelectColor ( Quantity_NameOfColor color );
60
61 protected:
62   bool  checkSelection ( AIS_StatusOfPick status, bool hadSelection, bool addTo );
63
64 protected:
65   Handle (AIS_InteractiveContext) myAISContext;   // graphic context
66   Quantity_NameOfColor            myHilightColor; // color for hilight object
67   Quantity_NameOfColor            mySelectColor; // color for selected object
68
69 };
70
71 #endif
72