|
E-XD++ Enterprise Edition -- Product Information
|
|
|
22. Macro Commands
E-XD++ supports batch-command operation, which means that you can integrate several operations into a one-time operation. This integrated operation can be manipulated later in a single Undo/Redo operation.
Functions for batch commands are shown below:
// Starting action.
void BegAction(const UINT &nActionType = 0,const BOOL &bUpdateAll = FALSE,
const BOOL &bRemoveAllSelection = TRUE,const BOOL &bEnablePrepare = FALSE);
// Starting action.
void BegAction(const CString& strComment,const UINT &nActionType = 0,const BOOL &bUpdateAll = FALSE,
const BOOL &bRemoveAllSelection = TRUE,const BOOL &bEnablePrepare = FALSE);
// Starting action.
void BegActionExt(const UINT& nIDComment,const UINT &nActionType = 0,const BOOL &bUpdateAll = FALSE,
const BOOL &bRemoveAllSelection = TRUE,const BOOL &bEnablePrepare = FALSE);
// Prepare and starting the group action
void BegActionExt(CFODirectActionMacro* pUndoGrp);
// Change action's comment
// strComment -- comment string of the action
void SetUndoComment(const CString& strComment);
// Change action's comment
// nIDComment -- string id for the action
void SetUndoComment(const UINT& nIDComment);
// Add action.
// pAction -- pointer of the action
virtual void AddAction(CFOAction *pAction);
// Add action.
// pAction -- pointer of the action
virtual void AddMacroAction(CFOActionMacro *pAction);
// Add action.
// pList -- list of the actions
virtual void AddMultiActions(CActionList *pList);
// End current macro action.
void EndAction();
Usage:
Call BegAction first, then call AddAction to add commands to
batch commands. In the end, call EndAction to acknowledge the new added commands.
|