Foundation classes for a basic GUI implementing simple widgets and events
Dependents: TouchScreenGUIDemo
Core/GUI.h
- Committer:
- duncanFrance
- Date:
- 2016-04-11
- Revision:
- 8:a460cabc85ac
- Child:
- 12:63db16fea709
File content as of revision 8:a460cabc85ac:
#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