You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CommandBase.h"
|
|
|
|
|
#include "GlobalDefine.h"
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
class CCommandMgr
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CCommandMgr(void);
|
|
|
|
|
~CCommandMgr(void);
|
|
|
|
|
void AddUndoCommand(CCommandBase *p);
|
|
|
|
|
void AddUndoCommand(CCommandBase *p,vector<Sptr<CObjBase>> &pMarkObjectVec);
|
|
|
|
|
void AddUndoCommandExt(CCommandBase *p);
|
|
|
|
|
bool HasUndoCmd();
|
|
|
|
|
bool HasRedoCmd();
|
|
|
|
|
void Undo();
|
|
|
|
|
void Redo();
|
|
|
|
|
void Reset();
|
|
|
|
|
private:
|
|
|
|
|
deque<Sptr<CCommandBase>> m_UndoQueue;
|
|
|
|
|
deque<Sptr<CCommandBase>> m_RedoQueue;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern CCommandMgr gCommandMgr;
|