summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/EventWindowController.cpp')
-rw-r--r--Swift/Controllers/EventWindowController.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/Swift/Controllers/EventWindowController.cpp b/Swift/Controllers/EventWindowController.cpp
new file mode 100644
index 0000000..4bc5c22
--- /dev/null
+++ b/Swift/Controllers/EventWindowController.cpp
@@ -0,0 +1,18 @@
+#include "Swift/Controllers/EventWindowController.h"
+
+#include <boost/bind.hpp>
+
+namespace Swift {
+
+EventWindowController::EventWindowController(EventController* eventController, EventWindowFactory* windowFactory) {
+ eventController_ = eventController;
+ windowFactory_ = windowFactory;
+ window_ = windowFactory_->createEventWindow();
+ eventController_->onEventQueueEventAdded.connect(boost::bind(&EventWindowController::handleEventQueueEventAdded, this, _1));
+}
+
+void EventWindowController::handleEventQueueEventAdded(boost::shared_ptr<Event> event) {
+ window_->addEvent(event, true);
+}
+
+}