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
Diff: Core/GUI.h
- Revision:
- 8:a460cabc85ac
- Child:
- 12:63db16fea709
diff -r 303850a4b30c -r a460cabc85ac Core/GUI.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Core/GUI.h Mon Apr 11 16:54:02 2016 +0000 @@ -0,0 +1,42 @@ +#ifndef SIMPLEGUI_GUI_H +#define SIMPLEGUI_GUI_H + +#include "GraphicsDisplay.h" +#include "EventDispatcher.h" +#include "FontRenderer.h" + +/** +* A singleton class to hold the framework components +**/ +class GUI { + public: + + GUI(GraphicsDisplay* display, EventDispatcher* dispatcher, FontRenderer* fontRenderer, Font* defaultFont) + : _display(display), _dispatcher(dispatcher), _renderer(fontRenderer), _font(defaultFont) + + {} + + GraphicsDisplay* display() { + return _display; + } + + EventDispatcher* eventDispatcher() { + return _dispatcher; + } + + FontRenderer* fontRenderer() { + return _renderer; + } + + Font* defaultFont() { + return _font; + } + + private: + + GraphicsDisplay* _display; + EventDispatcher* _dispatcher; + FontRenderer* _renderer; + Font* _font; +}; +#endif \ No newline at end of file