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_Selector2d
27 * 2D select manager for GLViewer
29 class GLVIEWER_API GLViewer_Selector2d : public GLViewer_Selector
34 GLViewer_Selector2d( GLViewer_Viewer2d*, GLViewer_Context* );
35 ~GLViewer_Selector2d();
38 //! Sets context from Viewer2d
39 void setContext( GLViewer_Context* glc ) { myGLContext = glc; }
40 GLViewer_Context* getContext() const { return myGLContext; }
43 virtual void setHilightColor( Quantity_NameOfColor );
44 virtual void setSelectColor( Quantity_NameOfColor );
46 virtual void detect( int, int );
47 virtual void undetectAll();
49 virtual void select( bool append = false );
50 virtual void select( const QRect&, bool append = false );
51 virtual void unselectAll();
52 virtual int numSelected() const;
54 virtual void checkSelection( int, bool, int );
57 GLViewer_Context* myGLContext;