summaryrefslogtreecommitdiffstats
path: root/ToolAddPolygon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ToolAddPolygon.cpp')
-rw-r--r--ToolAddPolygon.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/ToolAddPolygon.cpp b/ToolAddPolygon.cpp
new file mode 100644
index 0000000..6e4b813
--- /dev/null
+++ b/ToolAddPolygon.cpp
@@ -0,0 +1,24 @@
+#include "ToolAddPolygon.h"
+
+
+const gchar *ToolAddPolygon::name = (const gchar*)"Add polygonal room";
+
+
+ToolAddPolygon::ToolAddPolygon(EditManager *editManager) {
+ this->editManager = editManager;
+
+ image = gtk_image_new_from_stock(GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_BUTTON);
+ g_object_ref_sink(G_OBJECT(image));
+}
+
+ToolAddPolygon::~ToolAddPolygon() {
+ g_object_unref(G_OBJECT(image));
+}
+
+void ToolAddPolygon::action() {
+ editManager->addRoom();
+}
+
+GtkWidget *ToolAddPolygon::getImage() {
+ return image;
+}