src/Graphics/View.hh
branchnew_graphics
changeset 410 41fd46cffc52
child 411 106aaf6eadfe
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Graphics/View.hh	Wed Jan 21 01:57:24 2009 +0200
@@ -0,0 +1,39 @@
+#ifndef GRAPHICS_VIEW_HH
+#define GRAPHICS_VIEW_HH
+
+#include "../Types.hh"
+
+namespace graphics
+{
+
+/**
+ * A view is some area of the display that displays something
+ */
+class View : public Drawable {
+protected:
+    /**
+     * The area of the screen that is ours to draw on
+     */
+    PixelArea area;
+
+public:
+    /**
+     * Set the initial area that is drawn into
+     */
+    View (const PixelArea &area) :
+        area(area)
+    {
+
+    }
+
+    /**
+     * Update the view area
+     */
+    void updateArea (const PixelArea &area) {
+        this->area = area;
+    }
+};
+
+}
+
+#endif