From 8d7fd88d5f89ec0783bc20e34b080b1623752c56 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 24 Jul 2013 12:17:10 +0000 Subject: [PATCH] Added getCallbacks() methods --- include/osgWidget/EventInterface | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/osgWidget/EventInterface b/include/osgWidget/EventInterface index 06d586c95..5ac701b62 100644 --- a/include/osgWidget/EventInterface +++ b/include/osgWidget/EventInterface @@ -314,6 +314,11 @@ class OSGWIDGET_EXPORT EventInterface return _eventMask; } + typedef std::list > 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 > CallbackList; unsigned int _eventMask; CallbackList _callbacks;