Salome HOME
updated copyright message
[modules/gui.git] / src / GLViewer / GLViewer_Object.h
index 39c9d988395aba0e05cb7abbc433cea87fc194c7..1da5fcaa7bbd35f09e504245e4a9c1754c3fc6b9 100644 (file)
@@ -1,61 +1,66 @@
-//  Copyright (C) 2005 OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
-//  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.
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  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.
+// 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.
 //
-//  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
+// 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.
 //
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// 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
 //
-//  Author : OPEN CASCADE
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+//  Author : OPEN CASCADE
 // File:      GLViewer_Object.h
 // Created:   November, 2004
-
+//
 #ifndef GLVIEWER_OBJECT_H
 #define GLVIEWER_OBJECT_H
 
-#ifdef WNT
+#ifdef WIN32
 #include <windows.h>
 #endif
 
 #include "GLViewer.h"
-#include "GLViewer_Defs.h"
 #include "GLViewer_Geom.h"
 
-#include <SUIT_DataOwner.h>
-
+#ifdef __APPLE__
+#include <OpenGL/gl.h>
+#else
 #include <GL/gl.h>
+#endif
 
-#include <qfile.h>
-#include <qstring.h>
-#include <qrect.h>
+#include <QString>
 
-#ifdef WNT
+class QFile;
+
+#ifdef WIN32
 #pragma warning( disable:4251 )
 #endif
 
-/*! 
- * Class GLViewer_Object
- * Base Object for GLViewer
- */
 class GLViewer_Drawer;
 class GLViewer_AspectLine;
 class GLViewer_Group;
 class GLViewer_CoordSystem;
 class GLViewer_Text;
-class GLViewer_Owner;
+//class GLViewer_Owner;
+
+class SUIT_DataOwner;
 
+/*! 
+ * Class GLViewer_Object
+ * Base Object for all GLViewer objects
+ */
 class GLVIEWER_API GLViewer_Object
 {
 public:
@@ -82,7 +87,7 @@ public:
    *\param isCircle - = true if sensitive area of detection is round
   */
   virtual GLboolean         highlight( GLfloat x,
-                                      GLfloat y,
+                                       GLfloat y,
                                        GLfloat tol,
                                        GLboolean isCircle = GL_FALSE ) = 0;
   //! Clears all highlight information
@@ -185,7 +190,7 @@ public:
   virtual bool              finishMove() { return true; }
   
   //! Returns visible object status
-  bool                      getVisible() const { return myIsVisible; }
+  virtual bool              getVisible() const { return myIsVisible; }
   //! Installs visible object status
   virtual void              setVisible( bool theStatus ) { myIsVisible = theStatus; }
   
@@ -233,9 +238,9 @@ public:
   virtual bool              translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS ) = 0;
 #endif
   //!\warning It is for ouv
-  GLViewer_Owner*           owner() const { return myOwner; }
+  SUIT_DataOwner*           owner() const { return myOwner; }
   //!\warning It is for ouv
-  void                      setOwner( GLViewer_Owner* owner ) { myOwner = owner; }
+  void                      setOwner( SUIT_DataOwner* owner ) { myOwner = owner; }
   
   //! Adds object to group theGroup
   void                      setGroup( GLViewer_Group* theGroup );
@@ -297,27 +302,13 @@ protected:
   bool                      myIsVisible;
 
   //!\warning It is for ouv
-  GLViewer_Owner*           myOwner;
+  SUIT_DataOwner*           myOwner;
 
   //! Object Group
   GLViewer_Group*           myGroup;
 };
 
-
-//!\warning It is for ouv
-class GLVIEWER_API GLViewer_Owner : public SUIT_DataOwner
-{
-public:
-  //!\warning It is for ouv
-  GLViewer_Owner() : SUIT_DataOwner() {}
-  //!\warning It is for ouv
-  ~GLViewer_Owner() {}
-
-protected:
-
-};
-
-#ifdef WNT
+#ifdef WIN32
 #pragma warning ( default:4251 )
 #endif