#ifndef FGMANIPULATOR_H
#define FGMANIPULATOR_H 1
+#include <map>
#include <osg/Quat>
#include <osgGA/MatrixManipulator>
class FGManipulator : public osgGA::MatrixManipulator {
public:
- FGManipulator() :
- idleHandler(0), drawHandler(0), windowResizeHandler(0), keyHandler(0),
- mouseClickHandler(0), mouseMotionHandler(0), currentModifiers(0)
- {}
+ FGManipulator();
+
virtual ~FGManipulator() {}
virtual const char* className() const {return "FGManipulator"; }
void setPosition(const osg::Vec3d position) { this->position = position; }
void setAttitude(const osg::Quat attitude) { this->attitude = attitude; }
+ /** Whether or not resizing is supported. It might not be when
+ * using multiple displays.
+ */
+ bool getResizable() { return resizable; }
+ void setResizable(bool _resizable) { resizable = _resizable; }
+
protected:
osg::ref_ptr<osg::Node> _node;
fgIdleHandler idleHandler;
fgMouseClickHandler mouseClickHandler;
fgMouseMotionHandler mouseMotionHandler;
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;
void handleKey(const osgGA::GUIEventAdapter& ea, int& key, int& modifiers);
-
+ bool resizable;
};
#endif