comparison testApp.h @ 24:a4908ad8c78e

Top and bottom toolbars. Intro page.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Fri, 01 Feb 2013 11:16:56 +0000
parents 8c0783739337
children f42a00e3f22d
comparison
equal deleted inserted replaced
23:dae6d77657a0 24:a4908ad8c78e
17 17
18 #include "json.h" 18 #include "json.h"
19 19
20 20
21 #import "QuestionnaireViewController.h" 21 #import "QuestionnaireViewController.h"
22 #import "BottomTabViewController.h"
23 #import "IntroViewController.h"
24 #import "TopButtonViewController.h"
22 25
23 #define HOST "169.254.1.1" 26 #define HOST "169.254.1.1"
24 #define PORT 12345 27 #define PORT 12345
28
29 typedef enum {SLIDERS,ZOOMER,BOTH,INTRO,QUESTIONNAIRE}interfaceType;
25 30
26 class testApp : public ofxiPhoneApp { 31 class testApp : public ofxiPhoneApp {
27 32
28 33
29 public: 34 public:
30 35
31 36 interfaceType whichInterfaceShowing;
37 bool consentGiven;
38 BottomTabViewController *bottomTabViewController;
32 int prevTouchX; 39 int prevTouchX;
33 int prevTouchY; 40 int prevTouchY;
34 double prevDist; 41 double prevDist;
35 bool paused; 42 bool paused;
36 // not many so dont bother with vectors/arrays? 43 // not many so dont bother with vectors/arrays?
55 vector<int> freqIndexes; 62 vector<int> freqIndexes;
56 63
57 int numActiveTouches; 64 int numActiveTouches;
58 65
59 QuestionnaireViewController * questionnaireViewController; 66 QuestionnaireViewController * questionnaireViewController;
67 IntroViewController * introViewController;
68 TopButtonViewController * topButtonViewController;
69
60 // 70 //
61 71
62 void setup(); 72 void setup();
63 void update(); 73 void update();
64 void draw(); 74 void draw();
84 void deviceOrientationChanged(int newOrientation); 94 void deviceOrientationChanged(int newOrientation);
85 95
86 ofxOscSender sender; 96 ofxOscSender sender;
87 void sendOSCParams(); 97 void sendOSCParams();
88 98
99 void lockSynthPressed(bool locked);
100 void lockSequencerPressed(bool locked);
101
89 void showQuestionnaire(); 102 void showQuestionnaire();
90 void questionnaireHidden(vector<int> answers); 103 void questionnaireHidden(vector<int> answers);
104 void showIntro();
105 void introHidden(bool OK);
106 void interfaceSelected(int which);
107 void seqStartStop(bool go);
108
109 void setupBottomGui();
110 void bottomGuiEvent();
111 void setupTopGui();
112 void topGuiEvent();
91 113
92 // stardard GUI - knbs and sliders - hides zoomer 114 // stardard GUI - knbs and sliders - hides zoomer
93 bool standardGUIShowing; 115 void sliderGUIEvent(ofxUIEventArgs &e);
94 void standardGUIEvent(ofxUIEventArgs &e); 116 void setupSliderGui();
95 void setupStandardGui(); 117 ofxUICanvas *sliderGUI;
96 ofxUICanvas *standardGUI; 118
97 void sliderMoved(int which, float value); 119 void sliderMoved(int which, float value);
98 void setAllGUISliders(vector<int> vals); 120 void setAllGUISliders(vector<int> vals);
99 121
100 // zoom gui - the swap view button and save preset button 122 // zoom gui - the swap view button and save preset button
101 void zoomGUIEvent(ofxUIEventArgs &e); 123 void zoomGUIEvent(ofxUIEventArgs &e);