From: Thomas Geymayer Date: Wed, 1 Aug 2012 08:56:07 +0000 (+0200) Subject: Canvas: Fix warning and rename file. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e980178213d91a3f6cd3e4bba517c02acfc20575;p=flightgear.git Canvas: Fix warning and rename file. --- diff --git a/src/Canvas/MouseEvent.hxx b/src/Canvas/MouseEvent.hxx new file mode 100644 index 000000000..0bd5d44a0 --- /dev/null +++ b/src/Canvas/MouseEvent.hxx @@ -0,0 +1,53 @@ +// Mouse event +// +// Copyright (C) 2012 Thomas Geymayer +// +// 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 + +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, // #include #include
#include diff --git a/src/Canvas/gui_mgr.cxx b/src/Canvas/gui_mgr.cxx index 208d209c9..6ff2c577b 100644 --- a/src/Canvas/gui_mgr.cxx +++ b/src/Canvas/gui_mgr.cxx @@ -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 #include diff --git a/src/Canvas/mouse_event.hxx b/src/Canvas/mouse_event.hxx deleted file mode 100644 index 851f0f65d..000000000 --- a/src/Canvas/mouse_event.hxx +++ /dev/null @@ -1,52 +0,0 @@ -// Mouse event -// -// Copyright (C) 2012 Thomas Geymayer -// -// 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 - -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, // #include