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
Core/GUI.h@20:ef07d42ea062, 2016-10-18 (annotated)
- Committer:
- elh
- Date:
- Tue Oct 18 19:43:15 2016 +0000
- Revision:
- 20:ef07d42ea062
- Parent:
- 18:d849f3ada858
Initialize Textwidgets _text to NULL preventing crash if widget is draw until a text was set.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
duncanFrance | 8:a460cabc85ac | 1 | #ifndef SIMPLEGUI_GUI_H |
duncanFrance | 8:a460cabc85ac | 2 | #define SIMPLEGUI_GUI_H |
duncanFrance | 8:a460cabc85ac | 3 | |
duncanFrance | 12:63db16fea709 | 4 | class GUI; |
duncanFrance | 12:63db16fea709 | 5 | |
duncanFrance | 12:63db16fea709 | 6 | #include "GraphicsContext.h" |
duncanFrance | 12:63db16fea709 | 7 | #include "Window.h" |
duncanFrance | 8:a460cabc85ac | 8 | |
duncanFrance | 8:a460cabc85ac | 9 | /** |
duncanFrance | 8:a460cabc85ac | 10 | * A singleton class to hold the framework components |
duncanFrance | 8:a460cabc85ac | 11 | **/ |
duncanFrance | 12:63db16fea709 | 12 | class GUI |
duncanFrance | 12:63db16fea709 | 13 | { |
duncanFrance | 12:63db16fea709 | 14 | |
duncanFrance | 12:63db16fea709 | 15 | public: |
duncanFrance | 12:63db16fea709 | 16 | |
duncanFrance | 12:63db16fea709 | 17 | GUI(GraphicsContext* context); |
duncanFrance | 12:63db16fea709 | 18 | |
duncanFrance | 12:63db16fea709 | 19 | GraphicsContext* getGraphicsContext(); |
duncanFrance | 12:63db16fea709 | 20 | Window *rootWindow(); |
duncanFrance | 8:a460cabc85ac | 21 | |
duncanFrance | 18:d849f3ada858 | 22 | void run(); |
duncanFrance | 8:a460cabc85ac | 23 | |
duncanFrance | 12:63db16fea709 | 24 | private: |
duncanFrance | 12:63db16fea709 | 25 | |
duncanFrance | 12:63db16fea709 | 26 | GraphicsContext* _context; |
duncanFrance | 12:63db16fea709 | 27 | Window _rootWindow; |
duncanFrance | 18:d849f3ada858 | 28 | |
duncanFrance | 8:a460cabc85ac | 29 | }; |
duncanFrance | 8:a460cabc85ac | 30 | #endif |