Salome HOME
updated copyright message
[modules/gui.git] / src / GLViewer / GLViewer_BaseObjects.cxx
index 4151e0eb6eb951e36d916a5bc8e3a06380408484..17a8a983cbef2931894e1ce4158a77d2d7675d11 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  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,15 +1088,15 @@ 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;
     GLfloat xa, xb, ya, yb, l;
     GLfloat rsin, rcos, r, ra, rb;
     // GLboolean update;
-    GLboolean selected = myIsSel;
+    // GLboolean selected = myIsSel;
 
     myIsSel = GL_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;