summary refs log tree commit diff stats
path: root/tools/mapedit/src/frame.h
blob: 5e119f3351ff5f9814057adbade8f62a95bdeaab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef FRAME_H
#define FRAME_H

#include <wx/wxprec.h>

#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif

#include "map.h"
#include "widget.h"
#include "tile_widget.h"
#include <list>

class MapeditFrame : public wxFrame {
  public:
    MapeditFrame() {}
    MapeditFrame(Map map, std::string filename);
    
    MapeditWidget* GetMapEditor();
    
    static void NewMap();
    static void OpenMap(const char* filename);
    
    std::list<wxWindow*>::iterator closer;

  private:
    static void LaunchWindow(Map map, const char* filename);
      
    void ZoomIn(wxCommandEvent& event);
    void ZoomOut(wxCommandEvent& event);
    void OnNew(wxCommandEvent& event);
    void OnOpen(wxCommandEvent& event);
    void OnSave(wxCommandEvent& event);
    void OnClose(wxCommandEvent& event);
    void OnExit(wxCloseEvent& event);
    void OnQuit(wxCommandEvent& event);
    void OnTitleChange(wxCommandEvent& event);
    
    Map map;
    MapeditWidget* mapEditor;
    TileWidget* tileEditor;
    wxTextCtrl* titleBox;
    std::string filename;
    
    wxDECLARE_EVENT_TABLE();
};

#endif