载入中...
搜索中...
未找到
eve::level_editing::EditorHistory类 参考

Undo/redo stack: opaque string actions + optional tile change groups that can apply directly to a TileBuffer. 更多...

#include <EditorHistory.h>

Public 成员函数

void clear ()
 Clears .
 
void push (const std::string &name, const std::string &payload)
 Pushes .
 
void beginGroup (const std::string &name)
 Begins group.
 
void recordTile (int x, int y, int oldGid, int newGid)
 Record tile.
 
void endGroup ()
 Ends group.
 
bool isGrouping () const
 True when grouping.
 
bool canUndo () const
 Can undo.
 
bool canRedo () const
 Can redo.
 
int getUndoCount () const
 Returns the undo count.
 
int getRedoCount () const
 Returns the redo count.
 
editing::Result< std::string > undoAction ()
 Move the latest action to redo history and return its stable name.
 
editing::Result< std::string > redoAction ()
 Move the latest redo action back to undo history and return its stable name.
 
bool undo ()
 Compatibility-only boolean projection of undoAction().
 
bool redo ()
 Compatibility-only boolean projection of redoAction().
 
editing::Result< void > applyLastToBufferChecked (TileBuffer &buffer)
 Apply last undone/redone tile group to buffer (no-op for opaque actions).
 
bool applyLastToBuffer (TileBuffer *buffer)
 Compatibility-only nullable pointer projection of applyLastToBufferChecked().
 
std::string getLastActionName () const
 Returns the last action name.
 
std::string getLastActionKind () const
 Returns the last action kind.
 
std::string getLastPayload () const
 Returns the last payload.
 
int getLastTileCount () const
 Returns the last tile count.
 
int getLastTileX (int index) const
 Returns the last tile x.
 
int getLastTileY (int index) const
 Returns the last tile y.
 
int getLastTileOldGid (int index) const
 Returns the last tile old gid.
 
int getLastTileNewGid (int index) const
 Returns the last tile new gid.
 

详细描述

Undo/redo stack: opaque string actions + optional tile change groups that can apply directly to a TileBuffer.

在文件 EditorHistory.h 第 17 行定义.

成员函数说明

◆ applyLastToBuffer()

bool eve::level_editing::EditorHistory::applyLastToBuffer ( TileBuffer *  buffer)

Compatibility-only nullable pointer projection of applyLastToBufferChecked().

在文件 EditorHistory.cpp 第 106 行定义.

引用了 applyLastToBufferChecked() , 以及 buffer.

◆ applyLastToBufferChecked()

editing::Result< void > eve::level_editing::EditorHistory::applyLastToBufferChecked ( TileBuffer &  buffer)

Apply last undone/redone tile group to buffer (no-op for opaque actions).

Apply the latest tile action with a structured failure result.

在文件 EditorHistory.cpp 第 92 行定义.

引用了 buffer , 以及 t.

被这些函数引用 applyLastToBuffer().

◆ beginGroup()

void eve::level_editing::EditorHistory::beginGroup ( const std::string &  name)

Begins group.

在文件 EditorHistory.cpp 第 29 行定义.

引用了 name.

◆ canRedo()

bool eve::level_editing::EditorHistory::canRedo ( ) const

Can redo.

在文件 EditorHistory.cpp 第 58 行定义.

◆ canUndo()

bool eve::level_editing::EditorHistory::canUndo ( ) const

Can undo.

在文件 EditorHistory.cpp 第 57 行定义.

◆ clear()

void eve::level_editing::EditorHistory::clear ( )

Clears .

在文件 EditorHistory.cpp 第 7 行定义.

◆ endGroup()

void eve::level_editing::EditorHistory::endGroup ( )

Ends group.

在文件 EditorHistory.cpp 第 47 行定义.

◆ getLastActionKind()

std::string eve::level_editing::EditorHistory::getLastActionKind ( ) const

Returns the last action kind.

在文件 EditorHistory.cpp 第 111 行定义.

◆ getLastActionName()

std::string eve::level_editing::EditorHistory::getLastActionName ( ) const

Returns the last action name.

在文件 EditorHistory.cpp 第 110 行定义.

◆ getLastPayload()

std::string eve::level_editing::EditorHistory::getLastPayload ( ) const

Returns the last payload.

在文件 EditorHistory.cpp 第 112 行定义.

◆ getLastTileCount()

int eve::level_editing::EditorHistory::getLastTileCount ( ) const

Returns the last tile count.

在文件 EditorHistory.cpp 第 114 行定义.

◆ getLastTileNewGid()

int eve::level_editing::EditorHistory::getLastTileNewGid ( int  index) const

Returns the last tile new gid.

在文件 EditorHistory.cpp 第 134 行定义.

引用了 index.

◆ getLastTileOldGid()

int eve::level_editing::EditorHistory::getLastTileOldGid ( int  index) const

Returns the last tile old gid.

在文件 EditorHistory.cpp 第 130 行定义.

引用了 index.

◆ getLastTileX()

int eve::level_editing::EditorHistory::getLastTileX ( int  index) const

Returns the last tile x.

在文件 EditorHistory.cpp 第 122 行定义.

引用了 index.

◆ getLastTileY()

int eve::level_editing::EditorHistory::getLastTileY ( int  index) const

Returns the last tile y.

在文件 EditorHistory.cpp 第 126 行定义.

引用了 index.

◆ getRedoCount()

int eve::level_editing::EditorHistory::getRedoCount ( ) const

Returns the redo count.

在文件 EditorHistory.cpp 第 60 行定义.

◆ getUndoCount()

int eve::level_editing::EditorHistory::getUndoCount ( ) const

Returns the undo count.

在文件 EditorHistory.cpp 第 59 行定义.

◆ isGrouping()

bool eve::level_editing::EditorHistory::isGrouping ( ) const
inline

True when grouping.

在文件 EditorHistory.h 第 32 行定义.

◆ push()

void eve::level_editing::EditorHistory::push ( const std::string &  name,
const std::string &  payload 
)

Pushes .

在文件 EditorHistory.cpp 第 19 行定义.

引用了 a, name , 以及 payload.

◆ recordTile()

void eve::level_editing::EditorHistory::recordTile ( int  x,
int  y,
int  oldGid,
int  newGid 
)

Record tile.

在文件 EditorHistory.cpp 第 37 行定义.

引用了 t, x , 以及 y.

◆ redo()

bool eve::level_editing::EditorHistory::redo ( )

Compatibility-only boolean projection of redoAction().

在文件 EditorHistory.cpp 第 90 行定义.

引用了 redoAction().

◆ redoAction()

editing::Result< std::string > eve::level_editing::EditorHistory::redoAction ( )

Move the latest redo action back to undo history and return its stable name.

在文件 EditorHistory.cpp 第 75 行定义.

引用了 a.

被这些函数引用 redo().

◆ undo()

bool eve::level_editing::EditorHistory::undo ( )

Compatibility-only boolean projection of undoAction().

在文件 EditorHistory.cpp 第 88 行定义.

引用了 undoAction().

◆ undoAction()

editing::Result< std::string > eve::level_editing::EditorHistory::undoAction ( )

Move the latest action to redo history and return its stable name.

在文件 EditorHistory.cpp 第 62 行定义.

引用了 a.

被这些函数引用 undo().


该类的文档由以下文件生成: