Foundation classes for a basic GUI implementing simple widgets and events

Dependents:   TouchScreenGUIDemo

Revision:
8:a460cabc85ac
Child:
12:63db16fea709
--- /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