comparison testApp.h @ 16:fb2ef16dd013

Split alert views. Settled on using portrait mode.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Thu, 17 Jan 2013 18:21:48 +0000
parents e2c6cfe8c6b7
children 8c0783739337
comparison
equal deleted inserted replaced
15:e45c3e631d20 16:fb2ef16dd013
15 #include "ofxPd.h" 15 #include "ofxPd.h"
16 #include "frequencer.h" 16 #include "frequencer.h"
17 17
18 #include "json.h" 18 #include "json.h"
19 19
20 #import "iViewController.h" 20
21 #import "QuestionnaireViewController.h"
21 22
22 #define HOST "169.254.1.1" 23 #define HOST "169.254.1.1"
23 #define PORT 12345 24 #define PORT 12345
24 25
25 class testApp : public ofxiPhoneApp { 26 class testApp : public ofxiPhoneApp {
29 30
30 31
31 int prevTouchX; 32 int prevTouchX;
32 int prevTouchY; 33 int prevTouchY;
33 double prevDist; 34 double prevDist;
34 35 bool paused;
35 // not many so dont bother with vectors/arrays? 36 // not many so dont bother with vectors/arrays?
36 TwoVector touch0; 37 TwoVector touch0;
37 TwoVector touch1; 38 TwoVector touch1;
38 TwoVector prevTouch0; 39 TwoVector prevTouch0;
39 TwoVector prevTouch1; 40 TwoVector prevTouch1;
53 vector<int> sliderVals; 54 vector<int> sliderVals;
54 vector<int> freqIndexes; 55 vector<int> freqIndexes;
55 56
56 int numActiveTouches; 57 int numActiveTouches;
57 58
58 ofxiPhoneKeyboard * keyboard; 59 QuestionnaireViewController * questionnaireViewController;
59 // 60 //
60 61
61 void setup(); 62 void setup();
62 void update(); 63 void update();
63 void draw(); 64 void draw();
64 void exit(); 65 void exit();
65 66
66 void touchDown(ofTouchEventArgs &touch); 67 float getWidth();
67 void touchMoved(ofTouchEventArgs &touch); 68 float getHeight();
68 void touchUp(ofTouchEventArgs &touch); 69
69 void touchDoubleTap(ofTouchEventArgs &touch); 70 void touchDown(ofTouchEventArgs &touch);
70 void touchCancelled(ofTouchEventArgs &touch); 71 void touchMoved(ofTouchEventArgs &touch);
72 void touchUp(ofTouchEventArgs &touch);
73 void touchDoubleTap(ofTouchEventArgs &touch);
74 void touchCancelled(ofTouchEventArgs &touch);
71 75
72 void handleScroll(); 76 void handleScroll();
73 void handleZoom(); 77 void handleZoom();
74 78
75 vector<float> vectorFilter(vector<float> newVec); 79 vector<float> vectorFilter(vector<float> newVec);
76 80
77 void lostFocus(); 81 void lostFocus();
78 void gotFocus(); 82 void gotFocus();
79 void gotMemoryWarning(); 83 void gotMemoryWarning();
80 void deviceOrientationChanged(int newOrientation); 84 void deviceOrientationChanged(int newOrientation);
81 85
82 ofxOscSender sender; 86 ofxOscSender sender;
83 void sendOSCParams(); 87 void sendOSCParams();
88
89 void showQuestionnaire();
90 void questionnaireHidden(NSArray * answers);
84 91
85 // stardard GUI - knbs and sliders - hides zoomer 92 // stardard GUI - knbs and sliders - hides zoomer
86 bool standardGUIShowing; 93 bool standardGUIShowing;
87 void standardGUIEvent(ofxUIEventArgs &e); 94 void standardGUIEvent(ofxUIEventArgs &e);
88 void setupStandardGui(); 95 void setupStandardGui();