Salome HOME
Copyright update 2022
[modules/gui.git] / src / GLViewer / GLViewer_Selector2d.h
index 86c9d8695c6e7fc831ac3d96ec2ca6e67a73b3d4..6f4ce415d3c90b41ddb354ddd9a7e09995a7347d 100644 (file)
@@ -1,18 +1,33 @@
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//  Author : OPEN CASCADE
 // File:      GLViewer_Selector2d.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
-
-/****************************************************************************
-**  Class:   GLViewer_Selector2d 
-**  Descr:   OpenGL Selector 2D
-**  Module:  GLViewer
-**  Created: UI team, 20.09.02
-*****************************************************************************/
+//
 #ifndef GLVIEWER_SELECTOR2D_H
 #define GLVIEWER_SELECTOR2D_H
 
-#ifdef WNT
+#ifdef WIN32
 #include "windows.h"
 #endif
 
 class GLViewer_Viewer2d;
 class GLViewer_Context;
 
+/*!
+  \class GLViewer_Selector2d 
+  2D select manager for GLViewer
+*/
 class GLVIEWER_API GLViewer_Selector2d : public GLViewer_Selector
 {
   Q_OBJECT
@@ -32,24 +51,26 @@ public:
   ~GLViewer_Selector2d();
 
 public:
-  void            setContext( GLViewer_Context* glc ) { myGLContext = glc; }
-  GLViewer_Context*  getContext() const { return myGLContext; }
+  //! Sets context from Viewer2d
+  void                    setContext( GLViewer_Context* glc ) { myGLContext = glc; }
+  GLViewer_Context*       getContext() const { return myGLContext; }
 
-  void            setHilightColor( Quantity_NameOfColor );
-  void            setSelectColor( Quantity_NameOfColor );
+  // Redefined methods
+  virtual void            setHilightColor( Quantity_NameOfColor );
+  virtual void            setSelectColor( Quantity_NameOfColor );
 
-  void            detect( int, int );
-  void            undetectAll();
+  virtual void            detect( int, int );
+  virtual void            undetectAll();
 
-  void            select( bool append = false );
-  void            select( const QRect&, bool append = false );    
-  void            unselectAll();    
-  int             numSelected() const;    
+  virtual void            select( bool append = false );
+  virtual void            select( const QRect&, bool append = false );    
+  virtual void            unselectAll();    
+  virtual int             numSelected() const;    
 
-  void            checkSelection( int, bool, int );
+  virtual void            checkSelection( int, bool, int );
 
 protected:
-  GLViewer_Context*  myGLContext;
+  GLViewer_Context*       myGLContext;
 };
 
 #endif