Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
OSGEventHandler.h
1 //
2 // OSGEventHandler.h
3 //
4 // Copyright (c) 2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #pragma once
9 
11 class vtOSGEventHandler : public osgGA::GUIEventHandler
12 {
13 public:
14  vtOSGEventHandler() : last_x(-1), last_y(-1) {}
15  virtual bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
16  void handleResize(const osgGA::GUIEventAdapter& ea);
17  void handleKeyEvent(const osgGA::GUIEventAdapter& ea);
18  void handleMouseEvent(const osgGA::GUIEventAdapter& ea);
19 
20  int last_x, last_y;
21 };
22