Mercurial > hg > wabletios
annotate button.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 // button.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_button_h |
rt300@0 | 10 #define Wablet_button_h |
rt300@0 | 11 #include <iostream> |
rt300@0 | 12 #include "ofMain.h" |
rt300@0 | 13 #include "mesh.h" |
rt300@0 | 14 #include "uifunctor.h" |
rt300@0 | 15 class testApp; |
rt300@0 | 16 |
rt300@0 | 17 class ControlButton{ |
rt300@0 | 18 |
rt300@0 | 19 public: |
rt300@0 | 20 ofColor bcolor, hicolor; |
rt300@0 | 21 |
rt300@0 | 22 bool pressed; |
rt300@0 | 23 int width, height, xpos, ypos; |
rt300@0 | 24 std::string name; |
rt300@0 | 25 Mesh *theMesh; |
rt300@0 | 26 int buttonId; |
rt300@0 | 27 ControlButton(int abuttonId,int awidth,int aheight,int axpos,int aypos, std::string aname, Mesh *atheMeshPtr, ofColor acolor); |
rt300@0 | 28 ~ControlButton(); |
rt300@0 | 29 void passCallBack(UIFunctor callBack); |
rt300@0 | 30 void draw(); |
rt300@0 | 31 bool checkTouchArea(int axpos,int aypos); |
rt300@0 | 32 void press(); |
rt300@0 | 33 void release(); |
rt300@0 | 34 }; |
rt300@0 | 35 |
rt300@0 | 36 |
rt300@0 | 37 #endif |