Undo/redo stack: opaque string actions + optional tile change groups that can apply directly to a TileBuffer. 更多...
#include <EditorHistory.h>
Public 成员函数 | |
| void | clear () |
| void | push (const std::string &name, const std::string &payload) |
| void | beginGroup (const std::string &name) |
| void | recordTile (int x, int y, int oldGid, int newGid) |
| void | endGroup () |
| bool | isGrouping () const |
| bool | canUndo () const |
| bool | canRedo () const |
| int | getUndoCount () const |
| int | getRedoCount () const |
| bool | undo () |
| bool | redo () |
| bool | applyLastToBuffer (TileBuffer *buffer) |
| Apply last undone/redone tile group to buffer (no-op for opaque actions). | |
| std::string | getLastActionName () const |
| std::string | getLastActionKind () const |
| std::string | getLastPayload () const |
| int | getLastTileCount () const |
| int | getLastTileX (int index) const |
| int | getLastTileY (int index) const |
| int | getLastTileOldGid (int index) const |
| int | getLastTileNewGid (int index) const |
详细描述
Undo/redo stack: opaque string actions + optional tile change groups that can apply directly to a TileBuffer.
在文件 EditorHistory.h 第 14 行定义.
成员函数说明
◆ applyLastToBuffer()
| bool eve::editor::EditorHistory::applyLastToBuffer | ( | TileBuffer * | buffer | ) |
Apply last undone/redone tile group to buffer (no-op for opaque actions).
在文件 EditorHistory.cpp 第 84 行定义.
引用了 eve::editor::TileBuffer::inBounds() , 以及 eve::editor::TileBuffer::setGid().
◆ beginGroup()
| void eve::editor::EditorHistory::beginGroup | ( | const std::string & | name | ) |
在文件 EditorHistory.cpp 第 29 行定义.
引用了 name.
◆ canRedo()
| bool eve::editor::EditorHistory::canRedo | ( | ) | const |
在文件 EditorHistory.cpp 第 58 行定义.
◆ canUndo()
| bool eve::editor::EditorHistory::canUndo | ( | ) | const |
在文件 EditorHistory.cpp 第 57 行定义.
◆ clear()
| void eve::editor::EditorHistory::clear | ( | ) |
在文件 EditorHistory.cpp 第 7 行定义.
◆ endGroup()
| void eve::editor::EditorHistory::endGroup | ( | ) |
在文件 EditorHistory.cpp 第 47 行定义.
◆ getLastActionKind()
| std::string eve::editor::EditorHistory::getLastActionKind | ( | ) | const |
在文件 EditorHistory.cpp 第 95 行定义.
◆ getLastActionName()
| std::string eve::editor::EditorHistory::getLastActionName | ( | ) | const |
在文件 EditorHistory.cpp 第 94 行定义.
◆ getLastPayload()
| std::string eve::editor::EditorHistory::getLastPayload | ( | ) | const |
在文件 EditorHistory.cpp 第 96 行定义.
◆ getLastTileCount()
| int eve::editor::EditorHistory::getLastTileCount | ( | ) | const |
在文件 EditorHistory.cpp 第 98 行定义.
◆ getLastTileNewGid()
| int eve::editor::EditorHistory::getLastTileNewGid | ( | int | index | ) | const |
在文件 EditorHistory.cpp 第 118 行定义.
◆ getLastTileOldGid()
| int eve::editor::EditorHistory::getLastTileOldGid | ( | int | index | ) | const |
在文件 EditorHistory.cpp 第 114 行定义.
◆ getLastTileX()
| int eve::editor::EditorHistory::getLastTileX | ( | int | index | ) | const |
在文件 EditorHistory.cpp 第 106 行定义.
◆ getLastTileY()
| int eve::editor::EditorHistory::getLastTileY | ( | int | index | ) | const |
在文件 EditorHistory.cpp 第 110 行定义.
◆ getRedoCount()
| int eve::editor::EditorHistory::getRedoCount | ( | ) | const |
在文件 EditorHistory.cpp 第 60 行定义.
◆ getUndoCount()
| int eve::editor::EditorHistory::getUndoCount | ( | ) | const |
在文件 EditorHistory.cpp 第 59 行定义.
◆ isGrouping()
|
inline |
在文件 EditorHistory.h 第 23 行定义.
◆ push()
| void eve::editor::EditorHistory::push | ( | const std::string & | name, |
| const std::string & | payload | ||
| ) |
在文件 EditorHistory.cpp 第 19 行定义.
◆ recordTile()
| void eve::editor::EditorHistory::recordTile | ( | int | x, |
| int | y, | ||
| int | oldGid, | ||
| int | newGid | ||
| ) |
在文件 EditorHistory.cpp 第 37 行定义.
◆ redo()
| bool eve::editor::EditorHistory::redo | ( | ) |
在文件 EditorHistory.cpp 第 73 行定义.
引用了 a.
◆ undo()
| bool eve::editor::EditorHistory::undo | ( | ) |
在文件 EditorHistory.cpp 第 62 行定义.
引用了 a.
该类的文档由以下文件生成:
- src/modules/editor/EditorHistory.h
- src/modules/editor/EditorHistory.cpp