Browse Source

Add new `Gui` system files for first test

master
Krisjanis Rijnieks 9 years ago
parent
commit
2e1fae811e
  1. 23
      src/Application/Gui.cpp
  2. 25
      src/Application/Gui.h

23
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

25
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 <GuiEvent> event;
void notifyEvent(ofMouseEventArgs & args);
private:
static Gui * _instance;
};
} // piMapper
} // ofx
Loading…
Cancel
Save