commands.h

来自「股票控件源代码」· C头文件 代码 · 共 46 行

H
46
字号
// Commands.h: interface for the CCommands class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_COMMANDS_H__64EC0AE8_6BC6_4830_B616_6E1A73084575__INCLUDED_)
#define AFX_COMMANDS_H__64EC0AE8_6BC6_4830_B616_6E1A73084575__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CCommand;
typedef CList<CCommand *,CCommand *&> CommandList;
class CCommands : public CObject  
{
public:
	CCommands();
	virtual ~CCommands();
private:
	
	CCommand *m_pUndoCommand;//UNDO命令
	CCommand *m_pRedoCommand;//REDO命令

public:
	CommandList *m_pCommandList;
	CCommand *UndoCommand(){return m_pUndoCommand;};
	void UndoCommand(CCommand *pCommand)
	{
        m_pUndoCommand=pCommand;
	};
	CCommand *RedoCommand(){return m_pRedoCommand;};
	void RedoCommand(CCommand *pCommand)
	{
        m_pRedoCommand=pCommand;
	};
friend int GetCount(CCommands *pCommands)
{
	return pCommands->m_pCommandList->GetCount();
}
friend void AddCommand(CCommands *pCommands,CCommand *pCommand);
friend CCommand *NextCommand(CCommands *pCommands,CCommand *pCommand);
friend CCommand *PreCommand(CCommands *pCommands,CCommand *pCommand);
};


#endif // !defined(AFX_COMMANDS_H__64EC0AE8_6BC6_4830_B616_6E1A73084575__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?