el h / SimpleGUI

Fork of SimpleGUI by Duncan McIntyre

Committer:
duncanFrance
Date:
Sun Mar 27 15:37:32 2016 +0000
Revision:
4:27546fb8b670
Parent:
3:cb004f59b715
Child:
7:303850a4b30c
Added Bitmap_FG_BG to help render monochrome bitmaps

Who changed what in which revision?

UserRevisionLine numberNew contents of line
duncanFrance 0:0a590815d51c 1 #ifndef SIMPLEGUI_TEXT_WIDGET_H
duncanFrance 0:0a590815d51c 2 #define SIMPLEGUI_TEXT_WIDGET_H
duncanFrance 0:0a590815d51c 3
duncanFrance 0:0a590815d51c 4 #include "Widget.h"
duncanFrance 2:bb9183379488 5 #include "Font.h"
duncanFrance 3:cb004f59b715 6 #include "FontRenderer.h"
duncanFrance 0:0a590815d51c 7
duncanFrance 0:0a590815d51c 8 class TextWidget : public Widget {
duncanFrance 0:0a590815d51c 9
duncanFrance 0:0a590815d51c 10 public:
duncanFrance 0:0a590815d51c 11
duncanFrance 0:0a590815d51c 12 TextWidget(GraphicsDisplay* display);
duncanFrance 0:0a590815d51c 13
duncanFrance 0:0a590815d51c 14 // Ccncrete methods for this class
duncanFrance 2:bb9183379488 15 virtual void setFont(Font* font);
duncanFrance 1:48796b602c86 16
duncanFrance 0:0a590815d51c 17 virtual void setText(char* text);
duncanFrance 0:0a590815d51c 18
duncanFrance 0:0a590815d51c 19 // Implementation to account for whether the event's coordinates intersect this widget
duncanFrance 0:0a590815d51c 20 virtual void draw();
duncanFrance 0:0a590815d51c 21
duncanFrance 0:0a590815d51c 22 protected:
duncanFrance 0:0a590815d51c 23
duncanFrance 0:0a590815d51c 24 char *_text;
duncanFrance 2:bb9183379488 25 Font* _font;
duncanFrance 3:cb004f59b715 26 FontRenderer _renderer;
duncanFrance 0:0a590815d51c 27 };
duncanFrance 0:0a590815d51c 28
duncanFrance 0:0a590815d51c 29 #endif