summary refs log tree commit diff stats
path: root/tools/mapedit/src/mapselect_combo.h
blob: 9f0fe25d054ef257b5ad1d71561e3cece6128636 (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
#ifndef MAPSELECT_COMBO_H
#define MAPSELECT_COMBO_H

#include <wx/wxprec.h>

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

#include <wx/combo.h>
#include <wx/treectrl.h>

class MapeditFrame;

class MapSelectComboPopup : public wxTreeCtrl, public wxComboPopup {
  public:
    MapSelectComboPopup(wxTreeCtrl* mapTree, int initial);
    void Init();
    bool Create(wxWindow* parent);
    wxWindow* GetControl();
    wxString GetStringValue() const;
    void OnPopup();
    void OnMouseClick(wxMouseEvent& event);
    int GetSelectedMapID() const;
    void SetSelectedMapID(int id);
    
  private:
    void CopyNodes(wxTreeItemId from, wxTreeItemId to);
    
    wxTreeCtrl* mapTree;
    int lastSelected = 0;
    
    wxDECLARE_EVENT_TABLE();
};

#endif