rt300@0: // rt300@0: // xyView.h rt300@0: // soundspeed rt300@0: // rt300@0: // Created by Robert Tubb on 20/05/2013. rt300@0: // rt300@0: // rt300@0: rt300@0: #ifndef __soundspeed__xyView__ rt300@0: #define __soundspeed__xyView__ rt300@0: rt300@0: #include rt300@0: #include "ofMain.h" rt300@0: rt300@0: // very sketchy XY rt300@0: rt300@0: class XYView{ rt300@0: private: rt300@0: float screenX, screenY, height, width; rt300@0: float ctrlX, ctrlY; rt300@0: rt300@0: bool isInMyArea(int x, int y); rt300@0: rt300@0: public: rt300@0: rt300@0: XYView(double x, double y, double w, double h){ rt300@0: screenX = x; rt300@0: screenY = y; rt300@0: width = w; rt300@0: height = h; rt300@0: ctrlX = w*0.5; rt300@0: ctrlY = h*0.5; rt300@0: } rt300@0: void draw(); rt300@0: bool handleTouch(double x, double y); // return false if ouside my area rt300@0: rt300@0: }; rt300@0: rt300@0: #endif /* defined(__soundspeed__xyView__) */