Salome HOME
This file is given from DESCARTES project
authornds <nds@opencascade.com>
Thu, 3 Nov 2005 07:19:33 +0000 (07:19 +0000)
committernds <nds@opencascade.com>
Thu, 3 Nov 2005 07:19:33 +0000 (07:19 +0000)
50 files changed:
src/GLViewer/GLViewer.h
src/GLViewer/GLViewer_AspectLine.cxx
src/GLViewer/GLViewer_AspectLine.h
src/GLViewer/GLViewer_BaseDrawers.cxx
src/GLViewer/GLViewer_BaseDrawers.h
src/GLViewer/GLViewer_BaseObjects.cxx
src/GLViewer/GLViewer_BaseObjects.h
src/GLViewer/GLViewer_Compass.cxx
src/GLViewer/GLViewer_Compass.h
src/GLViewer/GLViewer_Context.cxx
src/GLViewer/GLViewer_Context.h
src/GLViewer/GLViewer_CoordSystem.cxx
src/GLViewer/GLViewer_CoordSystem.h
src/GLViewer/GLViewer_Defs.h
src/GLViewer/GLViewer_Drawer.cxx
src/GLViewer/GLViewer_Drawer.h
src/GLViewer/GLViewer_Geom.cxx
src/GLViewer/GLViewer_Geom.h
src/GLViewer/GLViewer_Grid.cxx
src/GLViewer/GLViewer_Grid.h
src/GLViewer/GLViewer_Group.cxx
src/GLViewer/GLViewer_Group.h
src/GLViewer/GLViewer_MimeSource.cxx
src/GLViewer/GLViewer_MimeSource.h
src/GLViewer/GLViewer_Object.cxx
src/GLViewer/GLViewer_Object.h
src/GLViewer/GLViewer_Selector.cxx
src/GLViewer/GLViewer_Selector.h
src/GLViewer/GLViewer_Selector2d.cxx
src/GLViewer/GLViewer_Selector2d.h
src/GLViewer/GLViewer_Text.cxx
src/GLViewer/GLViewer_Text.h
src/GLViewer/GLViewer_ToolTip.cxx
src/GLViewer/GLViewer_ToolTip.h
src/GLViewer/GLViewer_Tools.cxx
src/GLViewer/GLViewer_Tools.h
src/GLViewer/GLViewer_ViewFrame.cxx
src/GLViewer/GLViewer_ViewFrame.h
src/GLViewer/GLViewer_ViewManager.cxx
src/GLViewer/GLViewer_ViewManager.h
src/GLViewer/GLViewer_ViewPort.cxx
src/GLViewer/GLViewer_ViewPort.h
src/GLViewer/GLViewer_ViewPort2d.cxx
src/GLViewer/GLViewer_ViewPort2d.h
src/GLViewer/GLViewer_Viewer.cxx
src/GLViewer/GLViewer_Viewer.h
src/GLViewer/GLViewer_Viewer2d.cxx
src/GLViewer/GLViewer_Viewer2d.h
src/GLViewer/GLViewer_Widget.cxx
src/GLViewer/GLViewer_Widget.h

index f0e020c669259d297e7ea1b6540004e42a90fcf2..2f4ed3dcc3f8500e91e605cedf25b8abd6d60d40 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 //! Macro for exports
 #ifdef WNT
index 5399081db2f0928fde46f1c5f77f7729788b1d4b..4df6041b3f230a36be94918767c55f02e569f81b 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_AspectLine.cxx
 // Created:   26/05/2005 3:17:00 PM
-// Author:    Alexander BORODIN
-// Copyright (C) CEA 2005
 
 //================================================================
 // Class       : GLViewer_AspectLine
index 7fb8b7e397aba685ed803330c89bb25a97f83b27..800b166bb13d85815413628f59eea494cfff4989 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_AspectLine.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 #ifndef GLVIEWER_ASPECTLINE_H
 #define GLVIEWER_ASPECTLINE_H
index 85f54061be2f82ee038399bbd751847a4847e239..a43a5930ed7d3f8407b13c94da9d093696db128d 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_BaseDrawers.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 //#include <GLViewerAfx.h>
 #include "GLViewer_BaseDrawers.h"
index 43c5a98efa224ef53a9edf4bc19ea56e81b62a72..ce98aa8679a561b7264b25536058fdd8ac0ce232 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_BaseDrawers.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 #ifndef GLVIEWER_BASEDRAWERS_H
 #define GLVIEWER_BASEDRAWERS_H
index 759736136aba37a82e21f1c0abd8b0c402582b8e..79c32e3f86a7a34049404260146f9191d13d9193 100644 (file)
@@ -1,3 +1,24 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 /***************************************************************************
 **  Class:   GLViewer_BaseObjects
 **  Descr:   Internal OpenGL Objects
index fdd1f75fc7e1b67c76de14794abd697a5185062f..6e464ef0451bbf976db82de177083e510b55c3f5 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_BaseObjects.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 #ifndef GLVIEWER_BASEOBJECTS_H
 #define GLVIEWER_BASEOBJECTS_H
index 097a6edf87c337c962ac2a40914795c657a983f9..919641e7c277e0255c94638cf517357836e4cb08 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Compass.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 //================================================================
 // Class       : GLViewer_Compass
index dafa45619a0693d85997d489c0df72b97082509f..abdec0e01fe1682050fe4f9ebad372e0c59bb33e 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Compass.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 #ifndef GLVIEWER_COMPASS_H
 #define GLVIEWER_COMPASS_H
index 264a5657f230363cec8a2ee597b6a7a5d5792a24..ef4f57850299710f0d128c91ce8fe344b349b352 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Context.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 //================================================================
 // Class       : GLViewer_AspectLine
@@ -141,15 +160,13 @@ int GLViewer_Context::MoveTo( int xi, int yi, bool byCircle )
     else if( myLastPicked && isHigh )
     {
         //cout << 3 << endl;
-        //myLastPicked->highlight( x, y, myTolerance, byCircle );
+        myLastPicked->highlight( x, y, myTolerance, byCircle );
+        anUpdatedObjects.append( myLastPicked );
         if( myLastPicked != lastPicked )
         {
             myLastPicked->unhighlight();
-            if( myLastPicked != lastPicked )
-            {
-                myLastPicked = lastPicked;
-                anUpdatedObjects.append( myLastPicked );
-            }
+            myLastPicked = lastPicked;
+            anUpdatedObjects.append( myLastPicked );
         }
     }
 
@@ -202,6 +219,17 @@ int GLViewer_Context::Select( bool Append, bool byCircle )
                 status = SS_GlobalChanged;
             mySelectedObjects.clear();
         } 
+        else if( myLastPicked->isSelected() && status != SS_LocalChanged )
+        {
+            mySelectedObjects.remove( myLastPicked );
+            myLastPicked->unselect();
+            myGLViewer2d->updateAll();
+
+            if( mySelectedObjects.count() != 0 && status == SS_Invalid )
+              status = SS_GlobalChanged;
+
+            return status;
+        }
 
         if ( myLastPicked->select( myXhigh, myYhigh, myTolerance, GLViewer_Rect(), false, byCircle, Append )
              && mySelectedObjects.findIndex( myLastPicked ) == -1 )
@@ -537,13 +565,14 @@ void GLViewer_Context::updateScales( GLfloat scX, GLfloat scY )
 // Function: clearHighlighted
 // Purpose :
 //=======================================================================
-void GLViewer_Context::clearHighlighted()
+void GLViewer_Context::clearHighlighted( bool updateViewer )
 {
   if( myHFlag && myLastPicked )
   {
-      myLastPicked->unhighlight();
-      myLastPicked = 0;
-
+    myLastPicked->unhighlight();
+    myLastPicked = 0;
+    
+    if( updateViewer )
       myGLViewer2d->updateAll();
   }
 }
index 603e183cfeb537431e35a6c01eb9dd06e68ea6b5..f8c76eb504552915db48553910d05e29ddfef817 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Context.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 
 /*! Class GLViewer_Context
@@ -119,7 +138,7 @@ public:
   GLViewer_Object*      getFirstObject() { return *( myActiveObjects.begin() ); }
 
   //! A function clear highlighted object information
-  void                  clearHighlighted();
+  void                  clearHighlighted( bool updateViewer );
   //! A function clear selection object information
   void                  clearSelected( bool updateViewer );
   //! A function make theObject as selected object and update viewer if updateViewer = true
index 0fbcb3b6bc8c15182d980c6b6cc688a23576c291..947ac6036e5a4aefd5539a74a3cbe4b5acd715c4 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Context.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 //================================================================
 // Class       : GLViewer_CoordSystem
index dbc2b92028040a0c3a5d251b684710027f3fe30e..ca571daab8e1a08f3171082a6f5aa0b710b317d7 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_CoordSystem.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 /*! Class GLViewer_CoordSystem
  *  Class implementing mathematical model of 2D coordinate system 
index 0ef2cb4d1007c1af50ea424fab1b199e311d648b..68d1f7d3f4059bab9df03be0de60344276406252 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Defs.h
 // Created:   March, 2005
-// Author:    OCC team
-// Copyright (C) CEA 2005
 
 #ifndef GLVIEWER_DEFS_H
 #define GLVIEWER_DEFS_H
@@ -24,8 +43,9 @@ static const int      SELECTION_RECT_GAP = 50;
 //! Display Text Format of Objects
 enum DisplayTextFormat
 {
-  DTF_TEXTURE   = 0,
-  DTF_BITMAP    = 1
+  DTF_TEXTURE          = 0,
+  DTF_TEXTURE_SCALABLE = 1,
+  DTF_BITMAP           = 2
 };
 
 enum SelectionStatus
index 9231804f03fd336952700b1d581bd9dc2f993715..05cec9698ec118c6f9d306d14f6e0c6e9a330a68 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Drawer.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 //#include <GLViewerAfx.h>
 #include "GLViewer_Drawer.h"
@@ -70,14 +89,17 @@ GLViewer_TexFont::GLViewer_TexFont()
     }
 
     myTexFontWidth = 0;
-    myTexFontHeight = 0;        
+    myTexFontHeight = 0; 
+    myIsResizeable = false;
+    //myMinMagFilter = GL_NEAREST;
+    myMinMagFilter = GL_LINEAR_ATTENUATION ;
 }
 
 //======================================================================
 // Function: GLViewer_TexFont
 // Purpose :
 //=======================================================================
-GLViewer_TexFont::GLViewer_TexFont( QFont* theFont, int theSeparator )
+GLViewer_TexFont::GLViewer_TexFont( QFont* theFont, int theSeparator, bool theIsResizeable, GLuint theMinMagFilter )
 {
     myQFont = *theFont;
     QFontMetrics aFM( myQFont );        
@@ -93,6 +115,8 @@ GLViewer_TexFont::GLViewer_TexFont( QFont* theFont, int theSeparator )
 
     myTexFontWidth = 0;
     myTexFontHeight = 0;
+    myIsResizeable = theIsResizeable;
+    myMinMagFilter = theMinMagFilter;
     
 }
 
@@ -182,11 +206,18 @@ void GLViewer_TexFont::generateTexture()
         glBindTexture(GL_TEXTURE_2D, myTexFont);  
         glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
         glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
-        glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-        glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+        glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, myMinMagFilter);
+        glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, myMinMagFilter);
         glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-        glTexImage2D(GL_TEXTURE_2D, 0, 2, myTexFontWidth,
-            myTexFontHeight, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, pixels);
+        glTexImage2D(GL_TEXTURE_2D, 
+                     0, 
+                     GL_INTENSITY, 
+                     myTexFontWidth,
+                     myTexFontHeight, 
+                     0, 
+                     GL_LUMINANCE_ALPHA, 
+                     GL_UNSIGNED_BYTE, 
+                     pixels);
     
         delete[] pixels;
         
@@ -205,41 +236,62 @@ void GLViewer_TexFont::generateTexture()
 //=======================================================================
 void GLViewer_TexFont::drawString( QString theStr, GLdouble theX , GLdouble theY )
 {
+    double aXScale = 1., aYScale = 1.;
+    // store attributes
+    glPushAttrib( GL_ENABLE_BIT | GL_TEXTURE_BIT );
+
+    if ( !myIsResizeable )
+    {
+      glGetDoublev (GL_MODELVIEW_MATRIX, modelMatrix);
+      aXScale = modelMatrix[0];
+      aYScale = modelMatrix[5];
+    }
+
     glEnable(GL_TEXTURE_2D);
+
     glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, myMinMagFilter);
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, myMinMagFilter);
+
     glPixelTransferi(GL_MAP_COLOR, 0);
-    glAlphaFunc(GL_GEQUAL, 0.5F);
+
+    glAlphaFunc(GL_GEQUAL, 0.05F);
     glEnable(GL_ALPHA_TEST);
+
+    glEnable(GL_BLEND);
+    glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+
     glBindTexture(GL_TEXTURE_2D, myTexFont);
     glBegin(GL_QUADS);
 
-    QFontMetrics aFM( myQFont );
-    int pixelsHeight = aFM.height();
-
-    theY = theY - myTexFontHeight + pixelsHeight;
+    theY = theY - ( myTexFontHeight - QFontMetrics( myQFont ).height() ) / aYScale;
 
-    for( int i = 0, aGap = 0; i < theStr.length(); i++ )
+    double aLettBegin, aLettEnd, aDY = ( myTexFontHeight - 1 ) / aYScale, aDX;
+    char aLetter;
+    int aLettIndex;
+    for( int i = 0; i < theStr.length(); i++ )
     {
-        char aLetter = theStr.data()[i];
-        int aLettIndex = (int)aLetter - FirstSymbolNumber;
+        aLetter    = theStr.data()[i];
+        aLettIndex = (int)aLetter - FirstSymbolNumber;
 
-        float aLettBegin = (float)myPositions[aLettIndex];
-        float aLettEnd = aLettBegin + myWidths[aLettIndex]-1;
+        aLettBegin = (double)myPositions[aLettIndex] / ( (double)myTexFontWidth - 1. );
+        aLettEnd   = aLettBegin + ( (double)myWidths[aLettIndex] - 1. ) / ( (double)myTexFontWidth - 1. );
 
-        aLettBegin = aLettBegin / myTexFontWidth;
-        aLettEnd = aLettEnd / myTexFontWidth;
+        aDX = ( (double)myWidths[aLettIndex] - 1. ) / aXScale;
 
-        glTexCoord2f( aLettBegin, 0.0 ); glVertex3f( theX + aGap, theY, 1.0 );
-        glTexCoord2f( aLettBegin, 1.0 ); glVertex3f( theX + aGap, theY + myTexFontHeight, 1.0 );
-        glTexCoord2f( aLettEnd, 1.0 ); glVertex3f( theX + aGap + myWidths[aLettIndex]-1, theY + myTexFontHeight, 1.0 );
-        glTexCoord2f( aLettEnd, 0.0 ); glVertex3f( theX + aGap + myWidths[aLettIndex]-1, theY, 1.0 );
+        glTexCoord2d( aLettBegin, 0.0 ); glVertex3d( theX,       theY,       1.0 );
+        glTexCoord2d( aLettBegin, 1.0 ); glVertex3d( theX,       theY + aDY, 1.0 );
+        glTexCoord2d( aLettEnd,   1.0 ); glVertex3d( theX + aDX, theY + aDY, 1.0 );
+        glTexCoord2d( aLettEnd,   0.0 ); glVertex3d( theX + aDX, theY,       1.0 );
 
-        aGap += myWidths[aLettIndex]-1 + mySeparator;
+        theX += aDX + mySeparator / aXScale;
     }
 
     glEnd();
-    glDisable(GL_ALPHA_TEST);
-    glDisable(GL_TEXTURE_2D);
+    // restore attributes
+    glPopAttrib();
 }
 
 //======================================================================
@@ -385,12 +437,14 @@ static GLuint displayListBase( QFont* theFont )
 // Purpose :
 //=======================================================================
 GLViewer_Drawer::GLViewer_Drawer()
+: myFont( "Helvetica", 10, QFont::Bold )
 {
   myXScale = myYScale = 0.0;
   myObjects.clear();
   myTextList = 0/*-1*/;
   myObjectType = "GLViewer_Object";
   myPriority = 0;
+  myTextFormat = DTF_BITMAP;
 }
 
 //======================================================================
@@ -496,8 +550,8 @@ GLuint GLViewer_Drawer::loadTexture( const QString& fileName )
     glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
     glGenTextures( 1, &texture );
     glBindTexture( GL_TEXTURE_2D, texture );
-    glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
-    glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+    glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+    glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
     glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0,
                   GL_RGBA, GL_UNSIGNED_BYTE, pixels );
 
@@ -515,16 +569,14 @@ void GLViewer_Drawer::drawTexture( GLuint texture, GLint size, GLfloat x, GLfloa
     if( !texture )
         return;
 
-    glColor4f( 1.0, 1.0, 1.0, 1.0 );
-
     glEnable( GL_TEXTURE_2D );
-    glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
-    glAlphaFunc( GL_GREATER, 0.95F );
-    glEnable( GL_ALPHA_TEST );
+    glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );
+    bool hasAlpha = glIsEnabled( GL_ALPHA_TEST );
+    glDisable( GL_ALPHA_TEST );
     
     glBindTexture( GL_TEXTURE_2D, texture );
     glBegin( GL_QUADS );
-
+    
     glTexCoord2f( 0.0, 0.0 );
     glVertex3f( x-size/2., y-size/2., 0.0 );
 
@@ -538,9 +590,9 @@ void GLViewer_Drawer::drawTexture( GLuint texture, GLint size, GLfloat x, GLfloa
     glVertex3f( x+size/2., y-size/2., 0.0 );
     
     glEnd();
-    glFlush();
 
-    glDisable( GL_ALPHA_TEST );
+    if ( hasAlpha )
+      glEnable( GL_ALPHA_TEST );
     glDisable( GL_TEXTURE_2D );
 }
 
@@ -551,41 +603,18 @@ void GLViewer_Drawer::drawTexture( GLuint texture, GLint size, GLfloat x, GLfloa
 void GLViewer_Drawer::drawText( const QString& text, GLfloat xPos, GLfloat yPos,
                                 const QColor& color, QFont* theFont, int theSeparator, DisplayTextFormat theFormat )
 {
-  if( theFormat == DTF_TEXTURE )
+  glColor3f( ( GLfloat )color.red() / 255, 
+             ( GLfloat )color.green() / 255, 
+             ( GLfloat )color.blue() / 255 );
+
+  if( theFormat != DTF_BITMAP )
   {
-    GLViewer_TexFont aTexFont( theFont, theSeparator );
+    GLViewer_TexFont aTexFont( theFont, theSeparator, theFormat == DTF_TEXTURE_SCALABLE, GL_LINEAR );
     aTexFont.generateTexture();
-
-    glGetIntegerv (GL_VIEWPORT, viewport);
-    glGetDoublev (GL_MODELVIEW_MATRIX, modelMatrix);
-    glGetDoublev (GL_PROJECTION_MATRIX, projMatrix);
-    status = gluProject (xPos, yPos, 0, modelMatrix, projMatrix, viewport, &winx, &winy, &winz);
-
-    glPushAttrib( GL_TRANSFORM_BIT | GL_VIEWPORT_BIT | GL_LIST_BIT );
-    glMatrixMode(GL_PROJECTION);
-    glPushMatrix();
-    glLoadIdentity();
-    glOrtho(0,viewport[2],0,viewport[3],-100,100);
-    glMatrixMode(GL_MODELVIEW);
-    glPushMatrix();
-    glLoadIdentity();
-
-    glColor3f( ( GLfloat )color.red() / 255, 
-               ( GLfloat )color.green() / 255, 
-               ( GLfloat )color.blue() / 255 );
-
-    aTexFont.drawString( text, winx, winy );
-
-    glPopMatrix();
-    glMatrixMode(GL_PROJECTION);
-    glPopMatrix();
-    glPopAttrib();
+    aTexFont.drawString( text, xPos, yPos );
   }
-  else if( theFormat == DTF_BITMAP )
+  else
   {
-    glColor3f( ( GLfloat )color.red() / 255, 
-               ( GLfloat )color.green() / 255, 
-               ( GLfloat )color.blue() / 255 );
     glRasterPos2f( xPos, yPos );
     glListBase( displayListBase( theFont ) );
     glCallLists( text.length(), GL_UNSIGNED_BYTE, text.local8Bit().data() );
@@ -619,13 +648,13 @@ void GLViewer_Drawer::drawText( GLViewer_Object* theObject )
 void GLViewer_Drawer::drawGLText( QString text, float x, float y,
                                   int hPosition, int vPosition, QColor color, bool smallFont )
 {
-  QFont aFont( "Arial", 10, QFont::Bold );
+  QFont aFont( myFont );
   if( smallFont )
-    aFont.setPointSize( 8 );
+    aFont.setPointSize( aFont.pointSize() * 0.8 );
 
   QFontMetrics aFontMetrics( aFont );
-  float width = aFontMetrics.width( text ) / myXScale;
-  float height = aFontMetrics.height() / myXScale;
+  float width  = myTextFormat == DTF_TEXTURE_SCALABLE ? aFontMetrics.width( text ) : aFontMetrics.width( text ) / myXScale;
+  float height = myTextFormat == DTF_TEXTURE_SCALABLE ? aFontMetrics.height() : aFontMetrics.height() / myYScale;
   float gap = 5 / myXScale;
 
   switch( hPosition )
@@ -644,7 +673,7 @@ void GLViewer_Drawer::drawGLText( QString text, float x, float y,
       default : break;
   }
 
-  drawText( text, x, y, color, &aFont, 2, DTF_BITMAP ); // DTF_BITMAP or DTF_TEXTURE
+  drawText( text, x, y, color, &aFont, 2, myTextFormat );
 }
 
 //======================================================================
index 0a1379cbdf24327dd8569311761bf9f2ce1ba17e..86ba2a45fddb18f7f530913ef0cdf62854806d18 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Drawer.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 #ifndef GLVIEWER_DRAWER_H
 #define GLVIEWER_DRAWER_H
@@ -78,10 +97,15 @@ public:
   GLViewer_TexFont();
   //! A constructor
   /*
-  * \param theFont      - a base font
-  * \param theSeparator - separator between letters
+  * \param theFont         - a base font
+  * \param theSeparator    - separator between letters
+  * \param theIsResizeable - specifies whether text drawn by this object can be scaled along with the scene
+  * \param theMinMagFilter - min/mag filter, affects text sharpness
   */
-  GLViewer_TexFont( QFont* theFont, int theSeparator = 2 );
+  GLViewer_TexFont( QFont* theFont, 
+                    int theSeparator = 2, 
+                    bool theIsResizeable = false, 
+                    GLuint theMinMagFilter = GL_LINEAR/*_ATTENUATION*/ );
   //! A destructor
   ~GLViewer_TexFont();
   
@@ -123,6 +147,10 @@ protected:
   int             myTexFontHeight;
   //! Separator between letters
   int             mySeparator;
+  //! Flag controlling scalability of this texmapped font
+  bool            myIsResizeable;
+  //! Min/mag filter
+  GLuint          myMinMagFilter;
 };
 
 /***************************************************************************
@@ -188,8 +216,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();
@@ -270,6 +298,24 @@ public:
                                               QColor color = Qt::black,
                                               bool smallFont = false );
 
+  //! Sets a default font to be used by drawGLText method
+  /*!
+   *\param font      - the default font
+  */
+  inline void                     setFont( const QFont& font ) { myFont = font; }
+
+  //! Returns a default font used by drawGLText method
+  inline QFont                    font() const { return myFont; }
+
+  //! Sets a default text displaying format to be used by drawGLText method
+  /*!
+   *\param format    - the default text displaying format
+  */
+  inline void                     setTextFormat( DisplayTextFormat format ) { myTextFormat = format; }
+
+  //! Returns a default text displaying format used by drawGLText method
+  inline DisplayTextFormat        textFormat() const { return myTextFormat; }
+
   //! Draw rectangle with predefined color
   static void                     drawRectangle( GLViewer_Rect* theRect, QColor = Qt::black );
 
@@ -291,6 +337,11 @@ protected:
   QString                         myObjectType;
   //! Dislay priority
   int                             myPriority;
+
+  //! Default font for drawGLText() method
+  QFont                           myFont;
+  //! Default text displaying format for drawGLText() method
+  DisplayTextFormat               myTextFormat;
 };
 
 #ifdef WNT
index a5b81c077a828717c6872189799380e2d67a0341..cd0ef5cae9e4f4469450941fe400e8d1ca78b269 100644 (file)
@@ -1,3 +1,24 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 /***************************************************************************
 **  Class:   GLViewer_Geom
 **  Descr:   
index 40a28797f172fc93710d81c6d618ec10af0928bb..ccd3bab19a8c63a6d12877b76bd0faeb1ad28d64 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Geom.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 #ifndef GLVIEWER_GEOM_H
 #define GLVIEWER_GEOM_H
index e93e17ce70f4f908b42cf485d62f96ab882bc837..85dfac4ba336e601f94300768331679abc91a6fb 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Grid.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 //#include <GLViewerAfx.h>
 #include "GLViewer_Grid.h"
index 4440802d0ef336160e2d1366f16368910a1d5f13..39858916bdadb1efb395a62e615c6e45596c15a3 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Grid.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 #ifndef GLVIEWER_GRID_H
 #define GLVIEWER_GRID_H
index d4fc449f98c95afbd89414afb20dacd2ba164124..6377e9ecda81c079f40a8e93b1d0760f31ddb0b5 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Group.xx
 // Created:   March, 2005
-// Author:    OCC team
-// Copyright (C) CEA 2005
 
 //#include "GLViewerAfx.h"
 #include "GLViewer_Group.h"
index 1384a0baeba9d93e36f86f8ecc65188c8471a65e..8856166a5f5d306e0963bf0b7b98997827513538 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Group.h
 // Created:   March, 2005
-// Author:    OCC team
-// Copyright (C) CEA 2005
 
 #ifndef GLVIEWER_GROUP_H
 #define GLVIEWER_GROUP_H
index 3304e90ddc6b7fdb96ffdd139583acc06221da52..e43ee5f51fd97385f1e2c1ab26c3b327b41db468 100644 (file)
@@ -1,3 +1,24 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 /***************************************************************************
 **  Class:   GLViewer_MimeSource
 **  Descr:   Needs for a work with QClipboard
index 440fc41556a82c12f61b0a7a0d993fb47ffc3028..4fca3c9d793252e63985c52c2904addfe80f63a9 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_MimeSource.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 #ifndef GLVIEWER_MIMESOURCE_H
 #define GLVIEWER_MIMESOURCE_H
index 5cc8685b71afd18ba79427909ad892b51c012ee4..d2aaf4e973831c141f8073484c74919b336adcba 100644 (file)
@@ -1,3 +1,24 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 /***************************************************************************
 **  Class:   GLViewer_Object
 **  Descr:   OpenGL Object
index 334563466dbd8bafac243bd779f0a6a8b27d931b..39c9d988395aba0e05cb7abbc433cea87fc194c7 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Object.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 #ifndef GLVIEWER_OBJECT_H
 #define GLVIEWER_OBJECT_H
index 1329e4fc7d1ea6c03b36cd39fb84273d77150f0d..5df29eb89cc78bc3ca6f736cb88bdbe39cefc4e4 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Selector.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 /****************************************************************************
 **  Class:   GLViewer_Selector
index 74af33e1fe3ca084a753aba760eebf301db1f9a8..ad40ab124905f31f8e9f485836f8b3893812b129 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Selector.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 /****************************************************************************
 **  Class:   GLViewer_Selector
index 14d17722dfe901cd6f69308e3ca7f1ecfc813240..e8a414d464425ddd34b3a3d855d89de0d72babe2 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Selector2d.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 /****************************************************************************
 **  Class:   GLViewer_Selector2d 
@@ -62,7 +81,7 @@ void GLViewer_Selector2d::undetectAll()
   if( !vp->inherits( "GLViewer_ViewPort2d" ) )
     return;
 
-  myGLContext->clearHighlighted();
+  myGLContext->clearHighlighted( true );
 }
 
 void GLViewer_Selector2d::select( bool append )
index 18df15994a89ad12780e8635d4a0bb55e3aacee1..cce3cc37e7038a3e56c636f49ca691738b7fd90e 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Selector2d.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 /****************************************************************************
 **  Class:   GLViewer_Selector2d 
index 6dda7b8cf519d547d235fecbb076f4491de81f8b..bafa33ec1eaea5f0893b93a6056c0fa4cb99dac7 100644 (file)
@@ -1,3 +1,24 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 /***************************************************************************
 **  Class:   GLViewer_Text
 **  Descr:   Substitution of Prs3d_Text for OpenGL
index 16ec3ec4322788583a5b4f338d0f02ee979d5e90..ef3512ca90e1194ebe989ba0189eacd50c3a6851 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Text.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 #ifndef GLVIEWER_TEXT_H
 #define GLVIEWER_TEXT_H
index ad55671c3ccfd9af2d1adc6060cbfeb69448fe3c..0521ff19f05e210b101ff3d16b3fbaaa5cbcfb4f 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_ToolTip.xx
 // Created:   March, 2005
-// Author:    OCC team
-// Copyright (C) CEA 2005
 
 //#include "GLViewerAfx.h"
 #include "GLViewer_Context.h"
index 8ed8d7cd066b0eab3fdd8215dc09435b0fdf714d..9dcb71f6861862a5b50c5301ff41a4af6886dd47 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_ToolTip.h
 // Created:   March, 2005
-// Author:    OCC team
-// Copyright (C) CEA 2005
 
 #ifndef GLVIEWER_TOOLTIP_H
 #define GLVIEWER_TOOLTIP_H
index 5af5cd9bb1ff7ccf35c1f440a99f449a20d10af6..a54ad837f7bfc42b90cf95eb09ac659c72a6d82e 100644 (file)
@@ -1,15 +1,33 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Tools.cxx
 // Created:   April, 2005
-// Author:    OCC team
 
 //#include "GLViewerAfx.h"
 #include "GLViewer_Tools.h"
 
 #include <GL/gl.h>
 
-#include <iostream>
-
-using namespace std;
+#include <iostream.h>
 
 /****************************************************************************
 **  Class:   GLViewer_LineList 
index 9f267e7679837f3df1672cca902e4be1e5af371f..3acdd879b365036efe66dd0220b036427411dce3 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Tools.h
 // Created:   April, 2005
-// Author:    OCC team
-// Copyright (C) CEA 2005
 
 #ifndef GLVIEWER_TOOLS_H
 #define GLVIEWER_TOOLS_H
index 87a0b62dd0d483eb5b67665f2b14f57ae2af70b8..6600bb35f6690cd3127030a756654761c9447426 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_ViewFrame.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 /***************************************************************************
 **  Class:   GLViewer_ViewFrame
index 6c735331690dd9b9c1eb23c8ee7019bdb355d135..d90dfd3f5ddcb6b4b25512bb245df9fb4cc9795c 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_ViewFrame.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 /***************************************************************************
 **  Class:   GLViewer_ViewFrame
index c9f9de07b4246dade78112558d2907060805c6ae..91150147a42875821d96d844ca9ce30f68d53053 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_ViewManager.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 //#include <GLViewerAfx.h>
 #include "GLViewer_ViewManager.h"
index 1fac2ab220f86f86d22618d57724282573fa75c0..82038d8d6a70eb48bab87d4ba538bd26cc3fa25a 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_ViewManager.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 #ifndef GLVIEWER_VIEWMANAGER_H
 #define GLVIEWER_VIEWMANAGER_H
index 8a7dc29f74bdbdadc2e622d0cb4ac786b47af230..973342f84fa2ca6a4e0171d3dfd469a621036c5b 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_ViewPort.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 /***************************************************************************
 **  Class:   GLViewer_ViewPort
index 9553fcf24c49de9f5b572429540ff2cc028f430b..02ef4edaf21a7867e8c2282f98173387d32b9f0d 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_ViewPort.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 /***************************************************************************
 **  Class:   GLViewer_ViewPort
index 59604a176c370d66171f496466197eebc514c69a..17d9d68daa868bf07098ccc402492434499ea710 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_ViewPort2d.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 /* GLViewer_ViewPort2d Source File */
 
index a022b11b90d6b8026429ec5411c1170215176f63..128cdbe06b176cbfda86ff3ee5e87d25ef8219e2 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_ViewPort2d.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 #ifndef GLVIEWER_VIEWPORT2D_H
 #define GLVIEWER_VIEWPORT2D_H
index f492cc3994e62211654e55fc4538d1016d1bdf81..9ca9ed73e950a188acd4ca9fc70a59c2d5a38d21 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Viewer.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 /***************************************************************************
 **  Class:   GLViewer_Viewer
index ec64dc496d092d1bcd1103c24c7ae88749dbf3eb..dfd16c2fa247eaa1f3a4ff2fc1f038a64e428d88 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Viewer.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 #ifndef GLVIEWER_VIEWER_H
 #define GLVIEWER_VIEWER_H
index bbd6533e5e75b6d52c29beefcd9f92d9ec7b072b..74114b3f4af47633863b190edd7bc05d95f7b2e0 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Viewer2d.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 /***************************************************************************
 **  Class:   GLViewer_Viewer2d
@@ -131,7 +150,11 @@ void GLViewer_Viewer2d::updateBorders()
     for ( int i = 0, n = views.count(); i < n; i++ )
     {
         GLViewer_Rect* border = ( ( GLViewer_ViewPort2d* )((GLViewer_ViewFrame*)views[i])->getViewPort() )->getBorder();
+        if ( !border )
+          continue;
         border->setIsEmpty( true );
+        // initialise border by default values to avoid old values
+        border->setCoords( 0, 0, 0, 0 );
         for ( ObjList::Iterator it = beginIt; it != endIt; ++it )
         {
             GLViewer_Object* anObject = *it;
index 289d1e141b040a291e4739836e1a6558be15a6f6..94a5bd254c31ccad656c48106548cca878bde591 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Viewer2d.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 /***************************************************************************
 **  Class:   GLViewer_Viewer2d
index 3ec22e82fe19b833e0b26c7387d882d3c77cab21..b29a9fb5230e559be84dcc84eee62e7c6da2169d 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Widget.cxx
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 //================================================================
 // Class       : GLViewer_Widget
index 917391c24511090b81edb1f20a8d9c03b79eb506..c580a9a848e9713cbb1770998eac5fd2d9bade32 100644 (file)
@@ -1,7 +1,26 @@
+//  Copyright (C) 2005 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.
+//
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//  Author : OPEN CASCADE
+//
+
 // File:      GLViewer_Widget.h
 // Created:   November, 2004
-// Author:    OCC team
-// Copyright (C) CEA 2004
 
 /*! Class GLViewer_Widget
  *  Class for visualization OpenGL scene (widget) for GLViewer