Foundation classes for a basic GUI implementing simple widgets and events

Dependents:   TouchScreenGUIDemo

Widgets/TextWidget.h

Committer:
duncanFrance
Date:
2016-04-10
Revision:
7:303850a4b30c
Parent:
4:27546fb8b670
Child:
8:a460cabc85ac

File content as of revision 7:303850a4b30c:

#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, FontRenderer* renderer);
                
        // 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 void draw();      
    
    protected:
    
        char *_text;
        Font* _font;
        FontRenderer* _renderer;
};

#endif