1// SuperTux
2// Copyright (C) 2016 Hume2 <teratux.mail@gmail.com>
3//
4// This program 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// This program 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#ifndef HEADER_SUPERTUX_EDITOR_NODE_MARKER_HPP
18#define HEADER_SUPERTUX_EDITOR_NODE_MARKER_HPP
19
20#include "editor/marker_object.hpp"
21#include "object/path.hpp"
22
23class NodeMarker : public MarkerObject
24{
25public:
26 NodeMarker(Path* path_, std::vector<Path::Node>::iterator node_iterator, size_t id_);
27
28 virtual void move_to(const Vector& pos) override;
29 virtual void editor_delete() override;
30 virtual Vector get_point_vector() const override;
31 virtual Vector get_offset() const override;
32 virtual bool has_settings() const override { return true; }
33 virtual ObjectSettings get_settings() override;
34 virtual void editor_update() override;
35
36 void update_iterator();
37
38private:
39 Path* m_path;
40
41public:
42 std::vector<Path::Node>::iterator m_node;
43
44private:
45 size_t m_id;
46
47private:
48 NodeMarker(const NodeMarker&) = delete;
49 NodeMarker& operator=(const NodeMarker&) = delete;
50};
51
52#endif
53
54/* EOF */
55