]> git.mxchange.org Git - flightgear.git/commitdiff
Canvas: Fix warning and rename file.
authorThomas Geymayer <tomgey@gmail.com>
Wed, 1 Aug 2012 08:56:07 +0000 (10:56 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Wed, 1 Aug 2012 08:57:15 +0000 (10:57 +0200)
src/Canvas/MouseEvent.hxx [new file with mode: 0644]
src/Canvas/canvas.cxx
src/Canvas/gui_mgr.cxx
src/Canvas/mouse_event.hxx [deleted file]
src/Canvas/window.hxx

diff --git a/src/Canvas/MouseEvent.hxx b/src/Canvas/MouseEvent.hxx
new file mode 100644 (file)
index 0000000..0bd5d44
--- /dev/null
@@ -0,0 +1,53 @@
+// Mouse event
+//
+// Copyright (C) 2012  Thomas Geymayer <tomgey@gmail.com>
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program 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
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+#ifndef CANVAS_MOUSE_EVENT_HXX_
+#define CANVAS_MOUSE_EVENT_HXX_
+
+#include <osgGA/GUIEventAdapter>
+
+namespace canvas
+{
+
+  class MouseEvent
+  {
+    public:
+      typedef osgGA::GUIEventAdapter::EventType EventType;
+      typedef osgGA::GUIEventAdapter::ScrollingMotion Scroll;
+
+      MouseEvent(EventType type):
+        type(type),
+        x(-1), y(-1),
+        dx(0), dy(0),
+        button(-1),
+        state(-1),
+        mod(-1)
+      {}
+
+      EventType   type;
+      int         x, y,
+                  dx, dy,
+                  button, //<! Button for this event
+                  state,  //<! Current button state
+                  mod;    //<! Keyboard modifier state
+      Scroll      scroll;
+  };
+
+} // namespace canvas
+
+#endif /* CANVAS_MOUSE_EVENT_HXX_ */
index 4c6504fbc56bc50ecea77a006cbc7c73cfe44a7e..d379b644d4128691b2935d426b41143bd3ce236a 100644 (file)
@@ -18,8 +18,8 @@
 
 #include "canvas.hxx"
 #include "elements/group.hxx"
-#include "mouse_event.hxx"
 
+#include <Canvas/MouseEvent.hxx>
 #include <Canvas/property_helper.hxx>
 #include <Main/globals.hxx>
 #include <Viewer/CameraGroup.hxx>
index 208d209c9a98a53cdc609838f49e826552017306..6ff2c577b6f50b984ba420e592883722737a52de 100644 (file)
@@ -17,7 +17,6 @@
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 #include "gui_mgr.hxx"
-#include "mouse_event.hxx"
 #include <Canvas/window.hxx>
 #include <Canvas/canvas.hxx>
 
diff --git a/src/Canvas/mouse_event.hxx b/src/Canvas/mouse_event.hxx
deleted file mode 100644 (file)
index 851f0f6..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// Mouse event
-//
-// Copyright (C) 2012  Thomas Geymayer <tomgey@gmail.com>
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as
-// published by the Free Software Foundation; either version 2 of the
-// License, or (at your option) any later version.
-//
-// This program 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
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-
-#ifndef CANVAS_MOUSE_EVENT_HXX_
-#define CANVAS_MOUSE_EVENT_HXX_
-
-#include <osgGA/GUIEventAdapter>
-
-namespace canvas
-{
-
-  struct MouseEvent
-  {
-    typedef osgGA::GUIEventAdapter::EventType EventType;
-    typedef osgGA::GUIEventAdapter::ScrollingMotion Scroll;
-
-    MouseEvent(EventType type):
-      type(type),
-      x(-1), y(-1),
-      dx(0), dy(0),
-      button(-1),
-      state(-1),
-      mod(-1)
-    {}
-
-    EventType   type;
-    int         x, y,
-                dx, dy,
-                button, //<! Button for this event
-                state,  //<! Current button state
-                mod;    //<! Keyboard modifier state
-    Scroll      scroll;
-  };
-
-} // namespace canvas
-
-#endif /* CANVAS_MOUSE_EVENT_HXX_ */
index afefbe515792ca563212586af1199dcd626ca23d..4b937f3572a5f45a971ded7b0fd45d180ad89046 100644 (file)
@@ -19,9 +19,9 @@
 #ifndef CANVAS_WINDOW_HXX_
 #define CANVAS_WINDOW_HXX_
 
-#include "mouse_event.hxx"
 #include "property_based_element.hxx"
 #include "rect.hxx"
+#include <Canvas/MouseEvent.hxx>
 
 #include <simgear/props/propertyObject.hxx>