1 | // Aseprite |
2 | // Copyright (C) 2020 Igara Studio S.A. |
3 | // |
4 | // This program is distributed under the terms of |
5 | // the End-User License Agreement for Aseprite. |
6 | |
7 | #ifndef APP_CMD_SET_TILESET_NAME_H_INCLUDED |
8 | #define APP_CMD_SET_TILESET_NAME_H_INCLUDED |
9 | #pragma once |
10 | |
11 | #include "app/cmd.h" |
12 | #include "app/cmd/with_tileset.h" |
13 | |
14 | #include <string> |
15 | |
16 | namespace app { |
17 | namespace cmd { |
18 | using namespace doc; |
19 | |
20 | class SetTilesetName : public Cmd |
21 | , public WithTileset { |
22 | public: |
23 | SetTilesetName(Tileset* tileset, const std::string& name); |
24 | |
25 | protected: |
26 | void onExecute() override; |
27 | void onUndo() override; |
28 | size_t onMemSize() const override { |
29 | return sizeof(*this); |
30 | } |
31 | |
32 | private: |
33 | std::string m_oldName; |
34 | std::string m_newName; |
35 | }; |
36 | |
37 | } // namespace cmd |
38 | } // namespace app |
39 | |
40 | #endif |
41 | |