CmdHistory Class Reference

#include <command.h>

Inheritance diagram for CmdHistory:

Image PluginImage PNGImage List of all members.

Public Member Functions

 CmdHistory ()
 ~CmdHistory ()
CmdHistoryoperator<< (Cmd *pCmd)
int undoAvailable () const
 How many undo step is available.
bool canUndo () const
 True if undo is possible.
bool canRedo () const
 True if redo is possible.
void rollBack ()
 Cancel last operation. Needed if command crashes during execution.
void undo ()
 Undo last command.
void redo ()
 Undo last undo.
bool needSave ()
 True if image has changed since last saving.
void setSaved ()
 May be called when document is saved.
void startMacro ()
MacroCmdcreateMacroCmd ()

Classes

class  ErrUnderflow

Detailed Description

Class maintaing command history and macro recording. This is one of base classes for Image class.

Definition at line 188 of file command.h.


Constructor & Destructor Documentation

CmdHistory::CmdHistory (  ) 

CmdHistory::~CmdHistory (  ) 


Member Function Documentation

CmdHistory& CmdHistory::operator<< ( Cmd pCmd  ) 

Put command to history list. *pCmd object must by allocated on the heap and can never be destroyed. CmdHistory destroys it.

Parameters:
pCmd Pointer to command.
Returns:
Reference to this. Needed for << operator concatenation.

Reimplemented in Image.

Referenced by Image::operator<<().

int CmdHistory::undoAvailable (  )  const

How many undo step is available.

bool CmdHistory::canUndo (  )  const

True if undo is possible.

bool CmdHistory::canRedo (  )  const

True if redo is possible.

void CmdHistory::rollBack (  ) 

Cancel last operation. Needed if command crashes during execution.

void CmdHistory::undo (  ) 

Undo last command.

void CmdHistory::redo (  ) 

Undo last undo.

bool CmdHistory::needSave (  ) 

True if image has changed since last saving.

void CmdHistory::setSaved (  ) 

May be called when document is saved.

void CmdHistory::startMacro (  ) 

Start macro loading.

MacroCmd* CmdHistory::createMacroCmd (  ) 

Create new macro. Note that startMacro method should be called first.

Returns:
Return pointer to on heap allocated MacroCmd.


The documentation for this class was generated from the following file:
Generated on Wed Aug 29 00:01:04 2007 for GED 2006 by  doxygen 1.5.2