Added getCallbacks() methods

This commit is contained in:
Robert Osfield
2013-07-24 12:17:10 +00:00
parent 28dd1cf8a8
commit 8d7fd88d5f

View File

@@ -314,6 +314,11 @@ class OSGWIDGET_EXPORT EventInterface
return _eventMask;
}
typedef std::list<osg::ref_ptr<Callback> > CallbackList;
inline CallbackList& getCallbacks() { return _callbacks; }
inline const CallbackList& getCallbacks() const { return _callbacks; }
void addCallback(Callback* cb) {
_callbacks.push_back(cb);
}
@@ -400,7 +405,6 @@ class OSGWIDGET_EXPORT EventInterface
bool canKeyUp () const { return (_eventMask & EVENT_KEY_UP) != 0; }
private:
typedef std::list<osg::ref_ptr<Callback> > CallbackList;
unsigned int _eventMask;
CallbackList _callbacks;