annotate globalUI.h @ 15:d5758530a039 tip

oF0.84 Retina, and iPhone support
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Tue, 12 May 2015 15:48:52 +0100
parents c667dfe12d47
children
rev   line source
rt300@0 1 //
rt300@0 2 // globalUI.h
rt300@0 3 // Wablet
rt300@0 4 //
rt300@0 5 // Created by Robert Tubb on 19/03/2012.
rt300@0 6 // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
rt300@0 7 //
rt300@0 8
rt300@0 9 #ifndef Wablet_globalUI_h
rt300@0 10 #define Wablet_globalUI_h
rt300@0 11
rt300@0 12 #include "ofMain.h"
rt300@0 13 #include "button.h"
rt300@0 14 #include"mesh.h"
rt300@0 15 #include "uifunctor.h"
rt300@0 16
rt300@0 17 class testApp;
rt300@0 18
rt300@0 19 class GlobalUI{
rt300@0 20
rt300@0 21 public:
rt300@0 22 ofColor red;
rt300@0 23 ofColor blue;
rt300@0 24 ofColor green;
rt300@0 25
rt300@0 26 int borderSize; // size of the button strips to left and right
rt300@0 27 int buttonSize; // sqr button size in pixels
rt300@0 28
rt300@0 29 enum touchModes {GRAB,FORCE_FIELD,SPATIAL_HARMONIC,CONSTRAIN,UNCONSTRAIN,VIBRATE,INSCRIBE_PATH};
rt300@0 30
rt300@0 31 touchModes touchMode;
rt300@0 32
rt300@0 33 int numButtons;
rt300@0 34
rt300@0 35 ControlButton **buttons;
rt300@0 36
rt300@0 37 GlobalUI();
rt300@0 38
rt300@0 39 UIFunctor *theFunctor;
rt300@0 40 Mesh *theMeshPtr;
rt300@0 41 void passCallBack(UIFunctor specFuncA);
rt300@0 42
rt300@0 43 void makeButtons(Mesh *atheMeshPtr);
rt300@0 44 void draw();
rt300@0 45
rt300@0 46 bool handleTouchDown(int ax, int ay);
rt300@0 47 bool handleTouchUp(int ax, int ay);
rt300@0 48 bool handleTouchMove(int ax, int ay);
rt300@0 49
rt300@0 50 private:
rt300@0 51 bool inUIZone(float ax, float ay);
rt300@0 52
rt300@0 53 };
rt300@0 54
rt300@0 55 #endif