From b4adc20ef08257124a01499436f2b8b447adcb33 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 9 Jan 2010 03:18:25 +0100 Subject: Use room list --- src/Instance.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/Instance.h') diff --git a/src/Instance.h b/src/Instance.h index 090e2f1..de6249e 100644 --- a/src/Instance.h +++ b/src/Instance.h @@ -21,7 +21,9 @@ #define ZOOMEDIT_INSTANCE_H_ #include +#include #include + #include namespace ZoomEdit { @@ -32,6 +34,7 @@ class Window; namespace Data { class Level; +class Room; } namespace View { @@ -47,6 +50,11 @@ class Instance { bool loadLevel(const Glib::ustring &file); bool saveLevel(const Glib::ustring &file); + Data::Level* getLevel() {return level;} + + Data::Room* getSelectedRoom() {return selectedRoom;} + void setSelectedRoom(Data::Room *newSelectedRoom); + static bool create(const Glib::ustring &file = Glib::ustring()); private: @@ -55,16 +63,24 @@ class Instance { Glib::RefPtr builder; Gui::Window *window; - xmlpp::DomParser *levelXml; - Data::Level *level; View::TopView *view; View::MapView *mapView; + xmlpp::DomParser *levelXml; + Data::Level *level; + Data::Room *selectedRoom; + Instance(const Glib::ustring &file); void destroy(); + void onUpdate(); + void onRoomListSelect(); + + void deleteLevel(); + void setLevel(); + // Prevent shallow copy Instance(const Instance &o); Instance& operator=(const Instance &o); -- cgit v1.2.3