1//////////////////////////////////////////////////////////////////////
2// This file is part of Remere's Map Editor
3//////////////////////////////////////////////////////////////////////
4// Remere's Map Editor is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// Remere's Map Editor is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program. If not, see <http://www.gnu.org/licenses/>.
16//////////////////////////////////////////////////////////////////////
17
18#ifndef RME_MAINTOOLBAR_H_
19#define RME_MAINTOOLBAR_H_
20
21#include <wx/wx.h>
22#include <wx/aui/aui.h>
23#include <wx/aui/auibar.h>
24
25#include "gui_ids.h"
26#include "numbertextctrl.h"
27
28class MainToolBar : public wxEvtHandler {
29public:
30 MainToolBar(wxWindow* parent, wxAuiManager* manager);
31 ~MainToolBar();
32
33 wxAuiPaneInfo& GetPane(ToolBarID id);
34 void UpdateButtons();
35 void UpdateBrushButtons();
36 void UpdateBrushSize(BrushShape shape, int size);
37 void Show(ToolBarID id, bool show);
38 void HideAll(bool update = true);
39 void LoadPerspective();
40 void SavePerspective();
41 void RegisterHotkeys();
42
43 void OnStandardButtonClick(wxCommandEvent& event);
44 void OnBrushesButtonClick(wxCommandEvent& event);
45 void OnPositionButtonClick(wxCommandEvent& event);
46 void OnPositionKeyUp(wxKeyEvent& event);
47 void OnPastePositionText(wxClipboardTextEvent& event);
48 void OnSizesButtonClick(wxCommandEvent& event);
49
50private:
51 static const wxString STANDARD_BAR_NAME;
52 static const wxString BRUSHES_BAR_NAME;
53 static const wxString POSITION_BAR_NAME;
54 static const wxString SIZES_BAR_NAME;
55
56 wxAuiToolBar* standard_toolbar;
57 wxAuiToolBar* brushes_toolbar;
58 wxAuiToolBar* position_toolbar;
59 NumberTextCtrl* x_control;
60 NumberTextCtrl* y_control;
61 NumberTextCtrl* z_control;
62 wxButton* go_button;
63 wxAuiToolBar* sizes_toolbar;
64};
65
66#endif // RME_MAINTOOLBAR_H_
67