Mercurial > hg > tweakathon2ios
annotate UI code/TextPanel.h @ 0:a223551fdc1f
First commit - copy from tweakathlon.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Fri, 10 Oct 2014 11:46:42 +0100 |
parents | |
children | 8124f46eda65 |
rev | line source |
---|---|
rt300@0 | 1 |
rt300@0 | 2 #ifndef __tweakathlon__TextPanel__ |
rt300@0 | 3 #define __tweakathlon__TextPanel__ |
rt300@0 | 4 |
rt300@0 | 5 #include <iostream> |
rt300@0 | 6 #include "ofMain.h" |
rt300@0 | 7 #include "UIElement.h" |
rt300@0 | 8 #include "boost/function.hpp" |
rt300@0 | 9 #include "boost/bind.hpp" |
rt300@0 | 10 |
rt300@0 | 11 class TextPanel : public UIElement{ |
rt300@0 | 12 public: |
rt300@0 | 13 |
rt300@0 | 14 TextPanel(string text, int x, int y,int w,int h, const UIProps& props); |
rt300@0 | 15 void draw(); |
rt300@0 | 16 |
rt300@0 | 17 void setText(string at){ |
rt300@0 | 18 theText = at; |
rt300@0 | 19 }; |
rt300@0 | 20 void setColor(ofColor col){ |
rt300@0 | 21 foregroundHi = col; |
rt300@0 | 22 } |
rt300@0 | 23 void setFontSize(FontSize f){ |
rt300@0 | 24 fontSize = f; |
rt300@0 | 25 } |
rt300@0 | 26 ofColor foregroundHi; |
rt300@0 | 27 ofColor backgroundHi; |
rt300@0 | 28 ofColor foregroundLo; |
rt300@0 | 29 ofColor backgroundLo; |
rt300@0 | 30 |
rt300@0 | 31 bool handleMyTouch(int x, int y, touchType ttype, int touchID){ |
rt300@0 | 32 return false; |
rt300@0 | 33 } |
rt300@0 | 34 |
rt300@0 | 35 private: |
rt300@0 | 36 string theText; |
rt300@0 | 37 bool transparent; |
rt300@0 | 38 FontSize fontSize; |
rt300@0 | 39 }; |
rt300@0 | 40 |
rt300@0 | 41 #endif /* defined(__tweakathlon__TextPanel__) */ |