palette_waypoints.h

main 70 lines · 2.2 KB Raw
Alex Alex Commit Map Editor 18/10/2026 23:40
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_PALETTE_WAYPOINTS_H_
19#define RME_PALETTE_WAYPOINTS_H_
20
21#include <wx/listctrl.h>
22
23#include "waypoints.h"
24#include "palette_common.h"
25
26class WaypointPalettePanel : public PalettePanel {
27public:
28 WaypointPalettePanel(wxWindow* parent, wxWindowID id = wxID_ANY);
29 ~WaypointPalettePanel();
30
31 wxString GetName() const;
32 PaletteType GetType() const;
33
34 // Select the first brush
35 void SelectFirstBrush();
36 // Returns the currently selected brush (first brush if panel is not loaded)
37 Brush* GetSelectedBrush() const;
38 // Returns the currently selected brush size
39 int GetSelectedBrushSize() const;
40 // Select the brush in the parameter, this only changes the look of the panel
41 bool SelectBrush(const Brush* whatbrush);
42
43 // Called sometimes?
44 void OnUpdate();
45 // Called when this page is about to be displayed
46 void OnSwitchIn();
47 // Called when this page is hidden
48 void OnSwitchOut();
49
50public:
51 // wxWidgets event handling
52 void OnClickWaypoint(wxListEvent& event);
53 void OnBeginEditWaypointLabel(wxListEvent& event);
54 void OnEditWaypointLabel(wxListEvent& event);
55 void OnClickAddWaypoint(wxCommandEvent& event);
56 void OnClickRemoveWaypoint(wxCommandEvent& event);
57
58 void SetMap(Map* map);
59
60protected:
61 Map* map;
62 wxListCtrl* waypoint_list;
63 wxButton* add_waypoint_button;
64 wxButton* remove_waypoint_button;
65
66 DECLARE_EVENT_TABLE()
67};
68
69#endif
70
Top