summaryrefslogtreecommitdiffstats
path: root/ToolAddPolygon.h
diff options
context:
space:
mode:
Diffstat (limited to 'ToolAddPolygon.h')
-rw-r--r--ToolAddPolygon.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/ToolAddPolygon.h b/ToolAddPolygon.h
index b3c7856..69a0e07 100644
--- a/ToolAddPolygon.h
+++ b/ToolAddPolygon.h
@@ -3,13 +3,19 @@
#include "Tool.h"
#include "EditManager.h"
+#include "SidebarAdd.h"
-class ToolAddPolygon : public Tool {
+
+class ToolAddPolygon : public Tool, public EventHandler, public Renderer {
private:
GtkWidget *image;
EditManager *editManager;
+ SidebarAdd sidebar;
+
+ Room newRoom;
+
// prevent shallow copy
ToolAddPolygon(const ToolAddPolygon &t);
const ToolAddPolygon& operator=(const ToolAddPolygon &t);
@@ -29,13 +35,29 @@ class ToolAddPolygon : public Tool {
return "Add polygonal room";
}
- bool isSensitive() {
+ virtual bool isSensitive() {
return TRUE;
}
virtual GtkWidget *getImage() {
return image;
}
+
+ virtual EventHandler* getEventHandler() {
+ return this;
+ }
+
+ virtual Renderer *getRenderer() {
+ return this;
+ }
+
+ virtual void render(const Level &level, const Rectangle &rect, float scale);
+
+ virtual bool buttonPress(unsigned int button);
+
+ virtual Sidebar* getSidebar() {
+ return &sidebar;
+ }
};
#endif /*TOOLADDPOLYGON_H_*/