Foundation classes for a basic GUI implementing simple widgets and events

Dependents:   TouchScreenGUIDemo

Revision:
12:63db16fea709
Child:
18:d849f3ada858
diff -r b485561aa112 -r 63db16fea709 Widgets/Window.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Widgets/Window.h	Sun May 08 14:42:08 2016 +0000
@@ -0,0 +1,39 @@
+#ifndef SIMPLEGUI_WINDOW_H
+#define SIMPLEGUI_WINDOW_H
+
+/**
+* Defines an interface for classes which can contain widgets
+**/
+
+class Window;
+
+#include "Widget.h"
+#include "GraphicsContext.h"
+#include "LinkedList.h"
+
+class Window : public Widget {
+    
+public:
+    
+    Window(GraphicsContext *context);
+    
+    /**
+    * We are going to override these Widget methods
+    **/
+    virtual void attach(Widget *widget);
+    virtual void detach(Widget *widget);   
+    virtual void dirtyAll();
+    
+protected:
+
+    /**
+    * Override to draw all the children
+    **/
+    virtual void _draw();
+
+    LinkedList<Widget> _widgets;
+    
+    void _dirtyIntersected(Widget *w);
+};
+
+#endif
\ No newline at end of file