L_AutAddUndoNode

#include "ltaut.h"

L_LTAUT_API L_INT L_AutAddUndoNode(pAutomation, dwFlags);

Manually adds an undo node to the automation object.

Parameters

pAUTOMATIONHANDLE pAutomation

Pointer to an automation handle.

L_UINT32 dwFlags

Reserved for future use. Use 0.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function adds an undo node to the automation object. When used with L_AutSetUndoEnabled, a lengthy operation, consisting of multiple steps, can be combined into one undo call to L_AutUndo. To accomplish this, use the following steps:

  1. Call L_AutAddUndoNode to add an undo node to the automation handle.
  2. Disable the undo feature by calling L_AutSetUndoEnabled
  3. Perform the operations to be combined into one undo, For example:

    • Vector Rotate
    • Vector Scale
    • Vector Translate
  4. Re-enable the undo feature by calling L_AutSetUndoEnabled(pAutomation, TRUE).

Now, all three operations can be undone with one call to L_AutUndo instead of three calls to L_AutUndo.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT AutAddUndoNodeExample(pAUTOMATIONHANDLE pAutomation) 
{ 
   L_INT nRet; 
   /* Add an undo node manually */ 
   nRet = L_AutAddUndoNode( pAutomation, 0L ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* Disable the undo feature */ 
   nRet = L_AutSetUndoEnabled ( pAutomation, FALSE ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* Do multiple operations on the automation object */ 
 
   /* Re-enable the undo feature */ 
   nRet = L_AutSetUndoEnabled ( pAutomation, TRUE ); 
   if(nRet != SUCCESS) 
      return nRet; 
   return SUCCESS; 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Container and Automation C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.