Foundation classes for a basic GUI implementing simple widgets and events

Dependents:   TouchScreenGUIDemo

Widgets/BitmapWidget.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_BITMAP_WIDGET_H
#define SIMPLEGUI_BITMAP_WIDGET_H

#include "Widget.h"

class BitmapWidget : public Widget {
    
    public:
    
        BitmapWidget(GraphicsDisplay& display);
                
        // Ccncrete methods for this class
        void setBitmap(unsigned char* bitmap);
        
        // Set to draw the bitmap in monochrome
        void setMonochrome(bool enabled);
        bool isMonochrome();
    
        // Implementation to account for whether the event's coordinates intersect this widget
        virtual void draw();      
    
    protected:
        unsigned char* _bitmap;
        bool _monochrome;
};

#endif