Foundation classes for a basic GUI implementing simple widgets and events

Dependents:   TouchScreenGUIDemo

Widgets/TextWidget.h

Committer:
duncanFrance
Date:
2016-03-25
Revision:
0:0a590815d51c
Child:
1:48796b602c86

File content as of revision 0:0a590815d51c:

#ifndef SIMPLEGUI_TEXT_WIDGET_H
#define SIMPLEGUI_TEXT_WIDGET_H

#include "Widget.h"

class TextWidget : public Widget {
    
    public:
    
        TextWidget(GraphicsDisplay* display);
                
        // Ccncrete methods for this class
        virtual void setFont(unsigned char *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;
        unsigned char *_font;
        uint8_t _fw, _fh;
};

#endif