]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/FGManipulator.hxx
make isatty() available for stdout/stderr (hope it works on MS Windows)
[flightgear.git] / src / Main / FGManipulator.hxx
index b0812917aca1f345336777c603b003fb2dd29a4f..cc1c5f5525fc91e33ade14a81fadb2c276d3885b 100644 (file)
@@ -8,6 +8,8 @@
 
 #include "fg_os.hxx"
 
+namespace flightgear
+{
 class FGManipulator : public osgGA::MatrixManipulator {
 public:
     FGManipulator();
@@ -119,8 +121,6 @@ public:
     bool getResizable() { return resizable; }
     void setResizable(bool _resizable) { resizable = _resizable; }
 
-    bool getUseEventModifiers() { return useEventModifiers; }
-    void setUseEventModifiers(bool val) { useEventModifiers = val; }
 protected:
     osg::ref_ptr<osg::Node> _node;
     fgIdleHandler idleHandler;
@@ -131,11 +131,8 @@ protected:
     fgMouseMotionHandler mouseMotionHandler;
     osg::ref_ptr<osgViewer::StatsHandler> statsHandler;
     osg::ref_ptr<osgGA::GUIEventAdapter> statsEvent;
+    int statsType;
     int currentModifiers;
-    // work-around for OSG bug
-    int osgModifiers;
-    typedef std::map<int, osgGA::GUIEventAdapter::ModKeyMask> KeyMaskMap;
-    KeyMaskMap keyMaskMap;
     std::map<int, int> numlockKeyMap;
     osg::Vec3d position;
     osg::Quat attitude;
@@ -145,9 +142,11 @@ protected:
     // workaround for osgViewer double scroll events
     bool scrollButtonPressed;
     int release_keys[128];
-    // When the viewer is embedded, the host toolkit may deliver a
-    // valid event mask but not control keys.
-    bool useEventModifiers;
     void handleStats(osgGA::GUIActionAdapter& us);
 };
+
+void eventToWindowCoords(const osgGA::GUIEventAdapter* ea, double& x, double& y);
+void eventToWindowCoordsYDown(const osgGA::GUIEventAdapter* ea,
+                              double& x, double& y);
+}
 #endif