This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
neofx-zoomedit/EditManager.h

66 lines
1.3 KiB
C
Raw Normal View History

#ifndef EDITMANAGER_H_
#define EDITMANAGER_H_
#include "SharedPtr.h"
#include "Room.h"
#include "IdManager.h"
class Window;
class EditManager {
private:
IdManager idManager;
Window *window;
LevelObject *hoveredObject;
LevelObject *highlightedObject;
LevelObject *selectedObject;
Vertex hoveredVertex;
bool hasHoveredVertex;
bool lineOk(const Room &newRoom, const Line &l) const;
public:
EditManager(Window *window);
void redraw();
LevelObject* getHoveredObject() {
return hoveredObject;
}
void setHighlightedObject(LevelObject *object) {
highlightedObject = object;
}
LevelObject* getHighlightedObject() {
return highlightedObject;
}
void highlightHoveredObject() {
highlightedObject = hoveredObject;
}
void setSelectedObject(LevelObject *object) {
selectedObject = object;
}
LevelObject* getSelectedObject() {
return selectedObject;
}
bool addRoom(const Room &room);
const Vertex* getHoveredVertex() const;
void setHoveredVertex(const Vertex *v);
2007-12-25 03:27:03 +00:00
bool vertexOk(const Vertex &v, const Room *newRoom = NULL) const;
bool polygonOk(const Polygon &polygon) const;
};
#endif /*EDITMANAGER_H_*/