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.
Dependents: TouchScreenGUIDemo
Widgets/BitmapWidget.h@14:e6515b19f5a0, 2016-05-21 (annotated)
- Committer:
- duncanFrance
- Date:
- Sat May 21 16:36:02 2016 +0000
- Revision:
- 14:e6515b19f5a0
- Parent:
- 12:63db16fea709
- Child:
- 16:e9a771ecfdbe
Added OKCancelDialog
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
duncanFrance | 4:27546fb8b670 | 1 | #ifndef SIMPLEGUI_BITMAP_WIDGET_H |
duncanFrance | 4:27546fb8b670 | 2 | #define SIMPLEGUI_BITMAP_WIDGET_H |
duncanFrance | 4:27546fb8b670 | 3 | |
duncanFrance | 4:27546fb8b670 | 4 | #include "Widget.h" |
duncanFrance | 4:27546fb8b670 | 5 | |
duncanFrance | 4:27546fb8b670 | 6 | class BitmapWidget : public Widget { |
duncanFrance | 4:27546fb8b670 | 7 | |
duncanFrance | 4:27546fb8b670 | 8 | public: |
duncanFrance | 4:27546fb8b670 | 9 | |
duncanFrance | 12:63db16fea709 | 10 | BitmapWidget(GraphicsContext *context); |
duncanFrance | 12:63db16fea709 | 11 | BitmapWidget(GraphicsContext *context, bool monochrome); |
duncanFrance | 4:27546fb8b670 | 12 | |
duncanFrance | 4:27546fb8b670 | 13 | // Ccncrete methods for this class |
duncanFrance | 14:e6515b19f5a0 | 14 | void setBitmap(unsigned char const * bitmap, int width, int height); |
duncanFrance | 4:27546fb8b670 | 15 | |
duncanFrance | 4:27546fb8b670 | 16 | // Set to draw the bitmap in monochrome |
duncanFrance | 4:27546fb8b670 | 17 | void setMonochrome(bool enabled); |
duncanFrance | 4:27546fb8b670 | 18 | bool isMonochrome(); |
duncanFrance | 4:27546fb8b670 | 19 | |
duncanFrance | 8:a460cabc85ac | 20 | protected: |
duncanFrance | 12:63db16fea709 | 21 | |
duncanFrance | 8:a460cabc85ac | 22 | virtual void _draw(); |
duncanFrance | 12:63db16fea709 | 23 | |
duncanFrance | 4:27546fb8b670 | 24 | unsigned char* _bitmap; |
duncanFrance | 4:27546fb8b670 | 25 | bool _monochrome; |
duncanFrance | 4:27546fb8b670 | 26 | }; |
duncanFrance | 4:27546fb8b670 | 27 | |
duncanFrance | 4:27546fb8b670 | 28 | #endif |