1 // Copyright (C) 2005 OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : OPEN CASCADE
22 // File: GLViewer_Selector2d.h
23 // Created: November, 2004
25 #ifndef GLVIEWER_SELECTOR2D_H
26 #define GLVIEWER_SELECTOR2D_H
32 #include "GLViewer_Selector.h"
34 #include <Quantity_NameOfColor.hxx>
36 class GLViewer_Viewer2d;
37 class GLViewer_Context;
40 \class GLViewer_Selector2d
41 2D select manager for GLViewer
43 class GLVIEWER_API GLViewer_Selector2d : public GLViewer_Selector
48 GLViewer_Selector2d( GLViewer_Viewer2d*, GLViewer_Context* );
49 ~GLViewer_Selector2d();
52 //! Sets context from Viewer2d
53 void setContext( GLViewer_Context* glc ) { myGLContext = glc; }
54 GLViewer_Context* getContext() const { return myGLContext; }
57 virtual void setHilightColor( Quantity_NameOfColor );
58 virtual void setSelectColor( Quantity_NameOfColor );
60 virtual void detect( int, int );
61 virtual void undetectAll();
63 virtual void select( bool append = false );
64 virtual void select( const QRect&, bool append = false );
65 virtual void unselectAll();
66 virtual int numSelected() const;
68 virtual void checkSelection( int, bool, int );
71 GLViewer_Context* myGLContext;