Salome HOME
Updated copyright comment
[modules/gui.git] / src / GLViewer / GLViewer_BaseObjects.cxx
index cf12ae7ba5d29b1c5520cba1e17c03af4f09be15..013270f4d55a9872b88a4b57e9ed013439975cd5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -422,7 +422,7 @@ GLboolean GLViewer_MarkerSet::unhighlight()
   \param isCircle - true if sensitive area of detection is round
   \param isShift  - true if selection exec with append option
 */
-GLboolean GLViewer_MarkerSet::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull,
+GLboolean GLViewer_MarkerSet::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect /*rect*/, GLboolean /*isFull*/,
                                       GLboolean isCircle, GLboolean isShift )
 {
     if( !myIsVisible )
@@ -814,11 +814,11 @@ bool GLViewer_MarkerSet::initializeFromByteCopy( QByteArray theArray )
   \param size - size of polyline
   \param toolTip - tool tip of polyline
 */
-GLViewer_Polyline::GLViewer_Polyline( int number, float size, const QString& toolTip ):
+GLViewer_Polyline::GLViewer_Polyline( int number, float /*size*/, const QString& toolTip ):
   GLViewer_Object(),
-  myNumber( 0 ),
   myXCoord( 0 ),
-  myYCoord( 0 )       
+  myYCoord( 0 ),
+  myNumber( 0 )
 {
   myHighFlag = GL_TRUE;
 
@@ -1004,7 +1004,7 @@ GLViewer_Drawer* GLViewer_Polyline::createDrawer()
   \param isCircle - true if sensitive area of detection is round
   \return true if highlight status is changed
 */
-GLboolean GLViewer_Polyline::highlight( GLfloat x, GLfloat y, GLfloat tol, GLboolean isCircle )
+GLboolean GLViewer_Polyline::highlight( GLfloat x, GLfloat y, GLfloat /*tol*/, GLboolean /*isCircle*/ )
 {
     if( !myIsVisible )
         return false;
@@ -1088,8 +1088,8 @@ GLboolean GLViewer_Polyline::unhighlight()
   \param isCircle - true if sensitive area of detection is round
   \param isShift  - true if selection exec with append option
 */
-GLboolean GLViewer_Polyline::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull,
-                                     GLboolean isCircle, GLboolean isShift )
+GLboolean GLViewer_Polyline::select( GLfloat x, GLfloat y, GLfloat /*tol*/, GLViewer_Rect /*rect*/, GLboolean /*isFull*/,
+                                     GLboolean /*isCircle*/, GLboolean /*isShift*/ )
 {
     if( !myIsVisible )
         return false;
@@ -1465,8 +1465,17 @@ bool GLViewer_TextObject::translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerC
 
     HGDIOBJ old1 = SelectObject( dc, aFont );
     HGDIOBJ old2 = SelectObject( dc, aBrush );
-
-    TextOut( dc, x, y, aText.toLatin1().constData(), aText.length() );
+#ifdef UNICODE
+       LPTSTR str = new TCHAR[aText.length() + 1];
+       str[aText.toWCharArray(str)] = '\0';
+#else  
+       QByteArray arr = FileName.toLatin1();
+       LPTSTR str = arr.constData();
+#endif
+    TextOut( dc, x, y, str, aText.length() );
+#ifdef UNICODE
+        delete str;
+#endif
 
     SelectObject ( dc, old1 );
     SelectObject ( dc, old2 );
@@ -1612,8 +1621,8 @@ GLboolean GLViewer_TextObject::unhighlight()
   \param isCircle - true if sensitive area of detection is round
   \param isShift  - true if selection exec with append option
 */
-GLboolean GLViewer_TextObject::select( GLfloat theX, GLfloat theY, GLfloat theTol, GLViewer_Rect rect,
-                                       GLboolean isFull, GLboolean isCircle, GLboolean isShift )
+GLboolean GLViewer_TextObject::select( GLfloat theX, GLfloat theY, GLfloat theTol, GLViewer_Rect /*rect*/,
+                                       GLboolean /*isFull*/, GLboolean isCircle, GLboolean /*isShift*/ )
 { 
     if( !myIsVisible )
         return false;