Salome HOME
refs #416: to store the open state of object browser items in the binary array
[modules/gui.git] / src / SVTK / SVTK_SpaceMouse.cxx
index c8a99ee07691fcad1cc2605040ea90406cc83a83..a2ace80c4869a4b49126991a87bacf7140e0c809 100644 (file)
@@ -1,30 +1,29 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  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 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.
 //
-//  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 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
+// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SALOME VTKViewer : build VTK viewer into Salome desktop
 //  File   : SVTK_SpaceMouse.cxx
 //  Author : Alexander SLADKOV
-//  Module : SALOME
-//  $Header$
-//
+
 #include <string.h>
 #include <math.h>
 #include <stdio.h>
@@ -120,8 +119,8 @@ int SVTK_SpaceMouse::setWindow( Display *display, Window window )
 
   PropReturn = NULL;
   XGetWindowProperty( display, root, XCommandEvent, 0,1, 0,
-                     AnyPropertyType, &type, &format, &NItems,
-                     &BytesReturn, &PropReturn );
+                      AnyPropertyType, &type, &format, &NItems,
+                      &BytesReturn, &PropReturn );
 
   win = InputFocus;
   if ( PropReturn != NULL ) {
@@ -172,7 +171,7 @@ int SVTK_SpaceMouse::close(Display *display)
   Custom event handler
 */
 int SVTK_SpaceMouse::translateEvent( Display* display, XEvent* xEvent, MoveEvent* spaceMouseEvent,
-                   double scale, double rScale )
+                    double scale, double rScale )
 {
   if ( !spaceMouseOn )
     return 0;
@@ -181,17 +180,17 @@ int SVTK_SpaceMouse::translateEvent( Display* display, XEvent* xEvent, MoveEvent
     if ( xEvent->xclient.message_type == XMotionEvent ) {
       spaceMouseEvent->type = SpaceMouseMove;
       spaceMouseEvent->data[ x ] =
-       xEvent->xclient.data.s[2] * scale;
+        xEvent->xclient.data.s[2] * scale;
       spaceMouseEvent->data[ y ] =
-       xEvent->xclient.data.s[3] * scale;
+        xEvent->xclient.data.s[3] * scale;
       spaceMouseEvent->data[ z ] =
-       xEvent->xclient.data.s[4] * scale;
+        xEvent->xclient.data.s[4] * scale;
       spaceMouseEvent->data[ a ] =
-       xEvent->xclient.data.s[5] * rScale;
+        xEvent->xclient.data.s[5] * rScale;
       spaceMouseEvent->data[ b ] =
-       xEvent->xclient.data.s[6] * rScale;
+        xEvent->xclient.data.s[6] * rScale;
       spaceMouseEvent->data[ c ] =
-       xEvent->xclient.data.s[7] * rScale;
+        xEvent->xclient.data.s[7] * rScale;
       spaceMouseEvent->period = xEvent->xclient.data.s[8];
       return 1;
     }