summaryrefslogtreecommitdiffstats
path: root/EditManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'EditManager.h')
-rw-r--r--EditManager.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/EditManager.h b/EditManager.h
index a1561eb..6b52389 100644
--- a/EditManager.h
+++ b/EditManager.h
@@ -2,6 +2,7 @@
#define EDITMANAGER_H_
#include "Room.h"
+#include "IdManager.h"
class Window;
@@ -16,9 +17,19 @@ class EditManager {
private:
Mode mode;
+ IdManager idManager;
+
Window *window;
- //Room newRoom;
+ Room newRoom;
+ Room *activeRoom;
+
+ Room *hoveredRoom;
+
+ Vertex hoveredVertex;
+ bool hasHoveredVertex;
+
+ bool lineOk(const Line& l) const;
public:
EditManager(Window *window);
@@ -28,9 +39,25 @@ class EditManager {
void addVertex(const Vertex &v);
- Mode getMode() {
+ Mode getMode() const {
return mode;
}
+
+ Room* getActiveRoom() {
+ return activeRoom;
+ }
+
+ Room* getHoveredRoom() {
+ return hoveredRoom;
+ }
+
+ Vertex* getHoveredVertex();
+ void setHoveredVertex(Vertex *v);
+
+ void buttonPress(unsigned int button);
+
+ bool vertexOk(const Vertex& v) const;
+ bool polygonOk(const Polygon& polygon) const;
};
#endif /*EDITMANAGER_H_*/