#include <textacts.h>
Inheritance diagram for MatrixFitToPathAction:
Public Member Functions | |
MatrixFitToPathAction () | |
Constructor - initialises the member variables. | |
~MatrixFitToPathAction () | |
Destructor. | |
virtual ActionCode | Execute () |
Called during undo/redo to restore the TextStory matrices Inserts an opposite action into the opposite action list then changes the matrices. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *, ActionList *, TextStory *) |
static BOOL | DoMatrixRemoveFromPath (Operation *pOp, ActionList *, TextStory *) |
Definition at line 239 of file textacts.h.
|
Constructor - initialises the member variables.
Definition at line 540 of file textacts.cpp.
|
|
Destructor.
Definition at line 552 of file textacts.cpp.
|
|
Definition at line 635 of file textacts.cpp. 00636 { 00637 // Check the parameters 00638 ERROR2IF(pOp == NULL, FALSE, "The operation pointer is NULL"); 00639 ERROR2IF(pActionList == NULL, FALSE, "The action list pointer is NULL"); 00640 ERROR2IF(pTextStory == NULL, FALSE, "The TextStory pointer is NULL"); 00641 00642 // Insert an action to restore matrices on undo 00643 ActionCode ActCode; 00644 ActCode = MatrixFitToPathAction::Init(pOp, pActionList, pTextStory); 00645 00646 // Now set the matrices 00647 if (ActCode != AC_FAIL) 00648 pTextStory->MatrixRemoveFromPath(); 00649 00650 return (ActCode != AC_FAIL); 00651 }
|
|
Called during undo/redo to restore the TextStory matrices Inserts an opposite action into the opposite action list then changes the matrices.
Reimplemented from Action. Definition at line 566 of file textacts.cpp. 00567 { 00568 // Check the member variables 00569 ERROR2IF(pStory == NULL, AC_FAIL, "The TextStory pointer is NULL"); 00570 ERROR2IF(pOperation == NULL, AC_FAIL, "The operation pointer is NULL(!)"); 00571 00572 // Insert an action to reverse the path again on redo 00573 ActionCode ActCode; 00574 ActCode = MatrixRemoveFromPathAction::Init(pOperation, pOppositeActLst, pStory); 00575 00576 // Now set the matrices 00577 if (ActCode != AC_FAIL) 00578 pStory->MatrixFitToPath(); 00579 00580 return ActCode; 00581 }
|
|
Definition at line 599 of file textacts.cpp. 00600 { 00601 // Check the parameters 00602 ERROR2IF(pOp == NULL, AC_FAIL, "The operation pointer is NULL"); 00603 ERROR2IF(pActionList == NULL, AC_FAIL, "The action list pointer is NULL"); 00604 ERROR2IF(pTextStory == NULL, AC_FAIL, "The TextStory pointer is NULL"); 00605 00606 // Create a new action and insert it in the action list 00607 UINT32 ActSize = sizeof(MatrixFitToPathAction); 00608 MatrixFitToPathAction* pNewAction = NULL; 00609 ActionCode Ac = Action::Init( pOp, pActionList, ActSize, CC_RUNTIME_CLASS(MatrixFitToPathAction), (Action**)&pNewAction); 00610 00611 // Set the members of the new action 00612 if ((Ac == AC_OK) && (pNewAction != NULL)) 00613 pNewAction->pStory = pTextStory; 00614 00615 return Ac; 00616 }
|