1// SuperTux
2// Copyright (C) 2015 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_TOOL_ICON_HPP
18#define HEADER_SUPERTUX_EDITOR_TOOL_ICON_HPP
19
20#include "video/surface_ptr.hpp"
21#include "math/vector.hpp"
22
23#include <string>
24#include <vector>
25
26class DrawingContext;
27
28class ToolIcon final
29{
30public:
31 ToolIcon(const std::string& icon);
32
33 void draw(DrawingContext& context);
34
35 int get_mode() const { return m_mode; }
36
37 void next_mode();
38
39 void push_mode(const std::string& icon);
40 SurfacePtr get_current_surface() const;
41
42public:
43 Vector m_pos;
44
45private:
46 std::vector<SurfacePtr> m_surfaces;
47 int m_mode;
48 int m_surf_count;
49
50private:
51 ToolIcon(const ToolIcon&) = delete;
52 ToolIcon& operator=(const ToolIcon&) = delete;
53};
54
55#endif
56
57/* EOF */
58