Introduce new osgGA::Event and osgGA::EventHandler base classes that the old GUIEventAdapter and GUIEventHandler now subclass from.

The new osgGA::Event is written to support more generic events than the original GUIEventAdapter which are written for keyboard and mouse events.
This commit is contained in:
Robert Osfield
2013-10-25 14:54:15 +00:00
parent 2025c511f0
commit 4a660f6266
37 changed files with 511 additions and 397 deletions

View File

@@ -28,14 +28,14 @@ EventVisitor::~EventVisitor()
{
}
void EventVisitor::addEvent(GUIEventAdapter* event)
void EventVisitor::addEvent(Event* event)
{
_events.push_back(event);
}
void EventVisitor::removeEvent(GUIEventAdapter* event)
void EventVisitor::removeEvent(Event* event)
{
EventList::iterator itr = std::find(_events.begin(),_events.end(),event);
EventQueue::Events::iterator itr = std::find(_events.begin(), _events.end(), event);
if (itr!=_events.end()) _events.erase(itr);
}