diff --git a/src/Application/Gui.cpp b/src/Application/Gui.cpp new file mode 100644 index 0000000..43d0234 --- /dev/null +++ b/src/Application/Gui.cpp @@ -0,0 +1,23 @@ +#include "Gui.h" + +namespace ofx { +namespace piMapper { + +Gui * Gui::_instance = 0; + +Gui * Gui::instance(){ + if(_instance == 0){ + _instance = new ofx::piMapper::Gui(); + } + return _instance; +} + +void Gui::notifyEvent(ofMouseEventArgs & args){ + GuiEvent e; + e.args = args; + e.type = 1; + ofNotifyEvent(event, e, this); +} + +} // piMapper +} // ofx \ No newline at end of file diff --git a/src/Application/Gui.h b/src/Application/Gui.h new file mode 100644 index 0000000..1dcd0be --- /dev/null +++ b/src/Application/Gui.h @@ -0,0 +1,25 @@ +#pragma once + +#include "ofEvents.h" + +namespace ofx { +namespace piMapper { + +struct GuiEvent { + ofMouseEventArgs args; + int type; +}; + +class Gui { + public: + static Gui * instance(); + + ofEvent event; + void notifyEvent(ofMouseEventArgs & args); + + private: + static Gui * _instance; +}; + +} // piMapper +} // ofx \ No newline at end of file