1 // File: GLViewer_Selector2d.h
2 // Created: November, 2004
4 // Copyright (C) CEA 2004
6 /****************************************************************************
7 ** Class: GLViewer_Selector2d
8 ** Descr: OpenGL Selector 2D
10 ** Created: UI team, 20.09.02
11 *****************************************************************************/
12 #ifndef GLVIEWER_SELECTOR2D_H
13 #define GLVIEWER_SELECTOR2D_H
19 #include "GLViewer_Selector.h"
21 #include <Quantity_NameOfColor.hxx>
23 class GLViewer_Viewer2d;
24 class GLViewer_Context;
26 class GLVIEWER_API GLViewer_Selector2d : public GLViewer_Selector
31 GLViewer_Selector2d( GLViewer_Viewer2d*, GLViewer_Context* );
32 ~GLViewer_Selector2d();
35 void setContext( GLViewer_Context* glc ) { myGLContext = glc; }
36 GLViewer_Context* getContext() const { return myGLContext; }
38 void setHilightColor( Quantity_NameOfColor );
39 void setSelectColor( Quantity_NameOfColor );
41 void detect( int, int );
44 void select( bool append = false );
45 void select( const QRect&, bool append = false );
47 int numSelected() const;
49 void checkSelection( int, bool, int );
52 GLViewer_Context* myGLContext;