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_WAYPOINT_BRUSH_H
19#define RME_WAYPOINT_BRUSH_H
20
21#include "brush.h"
22
23//=============================================================================
24// WaypointBrush, draws waypoints simply
25// This doesn't actually draw anything, and the draw/undraw functions will ASSERT if
26// you try to call them, so I strongly advice against it
27
28class WaypointBrush : public Brush {
29public:
30 WaypointBrush();
31 virtual ~WaypointBrush();
32
33 bool isWaypoint() const {
34 return true;
35 }
36 WaypointBrush* asWaypoint() {
37 return static_cast<WaypointBrush*>(this);
38 }
39
40 // Not used
41 virtual bool load(pugi::xml_node node, wxArrayString& warnings) {
42 return true;
43 }
44
45 virtual bool canDraw(BaseMap* map, const Position& position) const;
46 // Will ASSERT
47 virtual void draw(BaseMap* map, Tile* tile, void* parameter);
48 virtual void undraw(BaseMap* map, Tile* tile);
49
50 virtual bool canDrag() const {
51 return false;
52 }
53 virtual bool canSmear() const {
54 return false;
55 }
56 virtual bool oneSizeFitsAll() const {
57 return true;
58 }
59
60 std::string getWaypoint() const;
61 void setWaypoint(Waypoint* wp);
62 virtual int getLookID() const {
63 return 0;
64 } // We don't have a graphic
65 virtual std::string getName() const {
66 return "Waypoint Brush";
67 }
68
69protected:
70 std::string waypoint_name;
71};
72
73#endif
74