Added View::removeEventHandler(..) method and added check into addEventHandler() to prevent handlers being added twice.

This commit is contained in:
Robert Osfield
2009-03-11 14:18:30 +00:00
parent d808149e05
commit 998cfec137
2 changed files with 18 additions and 2 deletions

View File

@@ -113,10 +113,13 @@ class OSGVIEWER_EXPORT View : public osg::View, public osgGA::GUIActionAdapter
typedef std::list< osg::ref_ptr<osgGA::GUIEventHandler> > EventHandlers;
/** Add an EventHandler that adds handling of events to the View.*/
void addEventHandler(osgGA::GUIEventHandler* eventHandler);
/** Remove an EventHandler from View.*/
void removeEventHandler(osgGA::GUIEventHandler* eventHandler);
/** Get the View's list of EventHandlers.*/
EventHandlers& getEventHandlers() { return _eventHandlers; }