summary refs log tree commit diff stats
path: root/tools/mapedit/src/frame.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mapedit/src/frame.h')
-rw-r--r--tools/mapedit/src/frame.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/tools/mapedit/src/frame.h b/tools/mapedit/src/frame.h index d201e86..dd8424c 100644 --- a/tools/mapedit/src/frame.h +++ b/tools/mapedit/src/frame.h
@@ -7,27 +7,25 @@
7#include <wx/wx.h> 7#include <wx/wx.h>
8#endif 8#endif
9 9
10#include "map.h"
11#include "widget.h"
12#include "tile_widget.h"
13#include <list> 10#include <list>
14#include <wx/notebook.h> 11#include <wx/notebook.h>
15#include <memory> 12#include <memory>
16#include <wx/treectrl.h> 13#include <wx/treectrl.h>
17#include <wx/splitter.h> 14#include <wx/splitter.h>
18#include "undo.h"
19 15
20class MapPtrCtr : public wxTreeItemData { 16class Map;
21 public: 17class MapeditWidget;
22 Map* map; 18class TileWidget;
23 19class Undoable;
24 MapPtrCtr(Map* map) : map(map) {} 20class UndoableTextBox;
25}; 21
22#include "world.h"
26 23
27class MapeditFrame : public wxFrame { 24class MapeditFrame : public wxFrame {
28 public: 25 public:
29 MapeditFrame() {} 26 MapeditFrame() {}
30 MapeditFrame(std::unique_ptr<World> world); 27 MapeditFrame(World* world);
28 ~MapeditFrame() { delete world; }
31 29
32 MapeditWidget* GetMapEditor(); 30 MapeditWidget* GetMapEditor();
33 void SetIsAddingEntity(bool isAddingEntity); 31 void SetIsAddingEntity(bool isAddingEntity);
@@ -39,7 +37,7 @@ class MapeditFrame : public wxFrame {
39 37
40 std::list<wxWindow*>::iterator closer; 38 std::list<wxWindow*>::iterator closer;
41 39
42 static void LaunchWindow(std::unique_ptr<World> world); 40 static void LaunchWindow(World* world);
43 void populateMapTree(wxTreeItemId node, std::list<std::shared_ptr<Map>> maps); 41 void populateMapTree(wxTreeItemId node, std::list<std::shared_ptr<Map>> maps);
44 void SelectMap(Map* map); 42 void SelectMap(Map* map);
45 wxTreeItemId MoveTreeNode(wxTreeItemId toCopy, wxTreeItemId newParent); 43 wxTreeItemId MoveTreeNode(wxTreeItemId toCopy, wxTreeItemId newParent);
@@ -68,8 +66,16 @@ class MapeditFrame : public wxFrame {
68 void OnCancelSetStartpos(wxCommandEvent& event); 66 void OnCancelSetStartpos(wxCommandEvent& event);
69 void OnOneMovingSash(wxSplitterEvent& event); 67 void OnOneMovingSash(wxSplitterEvent& event);
70 void OnThreeMovingSash(wxSplitterEvent& event); 68 void OnThreeMovingSash(wxSplitterEvent& event);
69 void OnSetLeftmapType(wxCommandEvent& event);
70 void OnSetLeftmapMap(wxCommandEvent& event);
71 void OnSetRightmapType(wxCommandEvent& event);
72 void OnSetRightmapMap(wxCommandEvent& event);
73 void OnSetUpmapType(wxCommandEvent& event);
74 void OnSetUpmapMap(wxCommandEvent& event);
75 void OnSetDownmapType(wxCommandEvent& event);
76 void OnSetDownmapMap(wxCommandEvent& event);
71 77
72 std::unique_ptr<World> world; 78 World* world;
73 Map* currentMap; 79 Map* currentMap;
74 80
75 MapeditWidget* mapEditor; 81 MapeditWidget* mapEditor;