summaryrefslogtreecommitdiff
path: root/gui/src/ofApp.h
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/ofApp.h')
-rw-r--r--gui/src/ofApp.h38
1 files changed, 35 insertions, 3 deletions
diff --git a/gui/src/ofApp.h b/gui/src/ofApp.h
index 24ab46e..41418b3 100644
--- a/gui/src/ofApp.h
+++ b/gui/src/ofApp.h
@@ -37,6 +37,31 @@ enum Source{
};
+class mouseSelectPanel : public ofxPanel {
+ public:
+ bool isSelected;
+ bool mouseMoved(ofMouseEventArgs & args){
+ if (args.x>getPosition().x&&
+ args.x-getPosition().x<getWidth()&&
+ args.y>getPosition().y&&
+ args.y-getPosition().y<getHeight()){
+ if (!isSelected){
+ isSelected=true;
+ setBorderColor(ofColor(128,64,0));
+ //ofLog()<<"IN> "<<args.x<<","<<args.y;
+ }
+ }
+ else {
+ if (isSelected){
+ isSelected=false;
+ setBorderColor(ofColor(0,0,0));
+ //ofLog()<<"OUT> "<<args.x<<","<<args.y;
+ }
+ }
+ }
+};
+
+
class ofApp: public ofBaseApp, public ofxMidiListener {
public:
@@ -56,6 +81,8 @@ class ofApp: public ofBaseApp, public ofxMidiListener {
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
+ void lMouseMoved(ofMouseEventArgs & args); //mouseMoved listener
+
void newMidiMessage(ofxMidiMessage& eventArgs);
void updateOutput(ofEventArgs & args);
@@ -110,7 +137,7 @@ class ofApp: public ofBaseApp, public ofxMidiListener {
//======== audio gui
ofxPanel audiogui;
- ofParameter<bool> useMic;
+ ofParameter<bool> useMic;
ofParameter<bool> useFft;
ofParameter<float> scalePlot;
ofParameter<float> decayPlot;
@@ -129,8 +156,13 @@ class ofApp: public ofBaseApp, public ofxMidiListener {
//======== chaos gui
- ofxPanel chaosgui;
-
+ mouseSelectPanel chaosgui;
+ ofxLabel plugin_label;
+ ofParameter<string> plugin_name;
+
+ // best architecture for the chaos plugin?
+ // how to use it on an arbitrary set of data
+ // should it be a part of the audio plotter?
//======================================== //thresholding