Salome HOME
updated copyright message
[modules/gui.git] / src / GLViewer / GLViewer_Drawer.h
index 4b66e7b206a8cd7de9da250ecdf8fb2aed1a259e..930bbedc481b18dca1b4075754afbe969e19a614 100644 (file)
@@ -1,41 +1,46 @@
-//  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_Drawer.h
 // Created:   November, 2004
-
+//
 #ifndef GLVIEWER_DRAWER_H
 #define GLVIEWER_DRAWER_H
 
-#ifdef WNT
+#ifdef WIN32
 #include "windows.h"
 #endif
 
-#include <qcolor.h>
-#include <qobject.h>
-#include <qfile.h>
-#include <qfont.h>
-#include <qgl.h>
+#include <QColor>
+#include <QFont>
+
+class QFile;
 
+#ifdef __APPLE__
+#include <OpenGL/gl.h>
+#else
 #include <GL/gl.h>
+#endif
 
 #include "GLViewer.h"
 #include "GLViewer_Defs.h"
@@ -45,7 +50,7 @@ class GLViewer_Object;
 class GLViewer_Rect;
 class GLViewer_CoordSystem;
 
-#ifdef WNT
+#ifdef WIN32
 #pragma warning( disable:4251 )
 #endif
 /*! 
@@ -78,8 +83,8 @@ struct GLVIEWER_API GLViewer_TexFindId
   bool        myIsUndl;
   //! Font Size
   int         myPointSize;
-  //! View POrt ID
-  int         myViewPortId;
+  //! View Port ID
+  long        myViewPortId;
   //! Overloaded operator for using struct as MAP key
   bool operator < (const GLViewer_TexFindId theStruct) const 
   { 
@@ -98,17 +103,11 @@ struct GLVIEWER_API GLViewer_TexFindId
   }
 };
 
-/***************************************************************************
-**  Class:   GLViewer_TexFont
-**  Descr:   Font for GLViewer_Drawer
-**  Module:  GLViewer
-**  Created: UI team, 03.10.01
-****************************************************************************/
+/*!
+  \class GLViewer_TexFont
+  Font for GLViewer_Drawer, Drawing bitmap and texture fonts in GLViewer
+*/
 
-/*! 
- * Class GLViewer_TexFont
- * Drawing bitmap and texture fonts in GLViewer
- */
 class GLVIEWER_API GLViewer_TexFont
 {
 public:
@@ -185,17 +184,11 @@ private:
   int             myMaxRowWidth;
 };
 
-/***************************************************************************
-**  Class:   GLViewer_Drawer
-**  Descr:   Drawer for GLObject
-**  Module:  GLViewer
-**  Created: UI team, 03.10.01
-****************************************************************************/
 /*! 
* Class GLViewer_Drawer
* Drawer for GLViewer_Objects.
* Drawer creates only one times per one type of object
- */
 \class GLViewer_Drawer
+  Drawer for GLViewer_Objects.
+  Drawer creates only one times per one type of object
+*/
 class GLVIEWER_API GLViewer_Drawer
 {
 public:
@@ -248,8 +241,8 @@ public:
   //! Returns object priority
   int                             getPriority() const { return myPriority; }
 
-       //! The function enables and disables antialiasing in Open GL (for points, lines and polygons).
-       void                            setAntialiasing(const bool on);
+        //! The function enables and disables antialiasing in Open GL (for points, lines and polygons).
+        void                            setAntialiasing(const bool on);
   
   //! Clears all generated textures
   static void                     destroyAllTextures();
@@ -354,7 +347,7 @@ public:
   */
   void                            drawText( const QString& text,
                                             GLfloat xPos,
-                                                                         GLfloat yPos,
+                                                                          GLfloat yPos,
                                             const QColor& color,
                                             QFont* aFont,
                                             int theSeparator,
@@ -371,8 +364,8 @@ public:
    *\param smallFont - font format
   */
   void                            drawGLText( QString text,
-                                                                           float x,
-                                                                           float y,
+                                                                            float x,
+                                                                            float y,
                                               int hPosition = GLText_Center,
                                               int vPosition = GLText_Center,
                                               QColor color = Qt::black,
@@ -416,7 +409,7 @@ protected:
   //! Draw basic primitives: rectangle, contour, polygon, vertex, cross, arrow
   //* with predefined color
   static void                     drawRectangle( GLViewer_Rect*, GLfloat, GLfloat = 0, QColor = Qt::black, 
-                                                bool = false, QColor = Qt::white );
+                                                 bool = false, QColor = Qt::white );
   static void                     drawContour( GLViewer_Rect*, QColor, GLfloat, GLushort, bool );
   static void                     drawContour( const GLViewer_PntList&, QColor, GLfloat );
   static void                     drawPolygon( GLViewer_Rect*, QColor, GLushort, bool );
@@ -424,8 +417,8 @@ protected:
   static void                     drawVertex( GLfloat, GLfloat, QColor );
   static void                     drawCross( GLfloat, GLfloat, QColor );
   static void                     drawArrow( const GLfloat red, const GLfloat green, const GLfloat blue,
-                                            GLfloat, GLfloat, GLfloat, GLfloat,
-                                            GLfloat, GLfloat, GLfloat, GLboolean = GL_FALSE );
+                                             GLfloat, GLfloat, GLfloat, GLfloat,
+                                             GLfloat, GLfloat, GLfloat, GLboolean = GL_FALSE );
 
   //! Draw object text
   virtual void                    drawText( GLViewer_Object* theObject );
@@ -436,7 +429,7 @@ protected:
   float                           myYScale;
   
   //! List of objects
-  QValueList<GLViewer_Object*>    myObjects;
+  QList<GLViewer_Object*>    myObjects;
   //! List generated textures
   GLuint                          myTextList;
   
@@ -455,7 +448,7 @@ protected:
   GLfloat                         myTextScale;
 };
 
-#ifdef WNT
+#ifdef WIN32
 #pragma warning ( default:4251 )
 #endif