Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of SimpleGUI by
Widgets/TextWidget.h
- Committer:
- duncanFrance
- Date:
- 2016-03-27
- Revision:
- 3:cb004f59b715
- Parent:
- 2:bb9183379488
- Child:
- 4:27546fb8b670
File content as of revision 3:cb004f59b715:
#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(GraphicsDisplay* display);
// Ccncrete methods for this class
virtual void setFont(Font* font);
virtual void setText(char* text);
// Implementation to account for whether the event's coordinates intersect this widget
virtual bool isEventTarget(Event e);
virtual void draw();
protected:
char *_text;
Font* _font;
FontRenderer _renderer;
};
#endif
