Foundation classes for a basic GUI implementing simple widgets and events
Dependents: TouchScreenGUIDemo
Widgets/TextWidget.h
- Committer:
- duncanFrance
- Date:
- 2016-04-11
- Revision:
- 9:616a9686d5db
- Parent:
- 8:a460cabc85ac
- Child:
- 11:b485561aa112
File content as of revision 9:616a9686d5db:
#ifndef SIMPLEGUI_TEXT_WIDGET_H #define SIMPLEGUI_TEXT_WIDGET_H #include "Widget.h" #include "Font.h" #include "FontRenderer.h" class TextWidget : public Widget { public: TextWidget(GUI* gui); TextWidget(GUI* gui, FontRenderer* renderer); TextWidget(GUI* gui, FontRenderer* renderer, Font* font); // Ccncrete methods for this class virtual void setFont(Font* font); virtual void setText(char* text); protected: // Implementation to account for whether the event's coordinates intersect this widget virtual void _draw(); virtual void _clear(); char* _text; FontRenderer* _renderer; Font* _font; }; #endif