MatrixRemoveFromPathAction Class Reference

This action is used when fitting a TextStory on a path in order to undo matrix changes. More...

#include <textacts.h>

Inheritance diagram for MatrixRemoveFromPathAction:

BaseTextAction Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 MatrixRemoveFromPathAction ()
 Constructor - initialises the member variables.
 ~MatrixRemoveFromPathAction ()
 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 DoMatrixFitToPath (Operation *pOp, ActionList *, TextStory *)

Detailed Description

This action is used when fitting a TextStory on a path in order to undo matrix changes.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/5/95
See also:
BaseTextAction

Definition at line 266 of file textacts.h.


Constructor & Destructor Documentation

MatrixRemoveFromPathAction::MatrixRemoveFromPathAction  ) 
 

Constructor - initialises the member variables.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/5/95

Definition at line 665 of file textacts.cpp.

00666 {
00667 }

MatrixRemoveFromPathAction::~MatrixRemoveFromPathAction  ) 
 

Destructor.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/5/95

Definition at line 677 of file textacts.cpp.

00678 {
00679 }


Member Function Documentation

BOOL MatrixRemoveFromPathAction::DoMatrixFitToPath Operation pOp,
ActionList ,
TextStory
[static]
 

Definition at line 761 of file textacts.cpp.

00762 {
00763     // Check the parameters
00764     ERROR2IF(pOp == NULL, FALSE, "The operation pointer is NULL");
00765     ERROR2IF(pActionList == NULL, FALSE, "The action list pointer is NULL");
00766     ERROR2IF(pTextStory == NULL, FALSE, "The TextStory pointer is NULL");
00767 
00768     // Insert an action to restore matrices on undo 
00769     ActionCode ActCode;
00770     ActCode = MatrixRemoveFromPathAction::Init(pOp, pActionList, pTextStory);
00771 
00772     // Now set the matrices
00773     if (ActCode != AC_FAIL)
00774         pTextStory->MatrixFitToPath();
00775 
00776     return (ActCode != AC_FAIL);
00777 }

ActionCode MatrixRemoveFromPathAction::Execute  )  [virtual]
 

Called during undo/redo to restore the TextStory matrices Inserts an opposite action into the opposite action list then changes the matrices.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/5/95

Reimplemented from Action.

Definition at line 691 of file textacts.cpp.

00692 {
00693     // Check the member variables
00694     ERROR2IF(pStory == NULL, AC_FAIL, "The TextStory pointer is NULL");
00695     ERROR2IF(pOperation == NULL, AC_FAIL, "The operation pointer is NULL(!)");
00696 
00697     // Insert an action to reverse the path again on redo
00698     ActionCode ActCode;
00699     ActCode = MatrixFitToPathAction::Init(pOperation, pOppositeActLst, pStory);
00700 
00701     // Now set the matrices
00702     if (ActCode != AC_FAIL)
00703         pStory->MatrixRemoveFromPath();
00704 
00705     return ActCode;
00706 }

ActionCode MatrixRemoveFromPathAction::Init Operation ,
ActionList ,
TextStory
[static]
 

Definition at line 725 of file textacts.cpp.

00726 {
00727     // Check the parameters
00728     ERROR2IF(pOp == NULL, AC_FAIL, "The operation pointer is NULL");
00729     ERROR2IF(pActionList == NULL, AC_FAIL, "The action list pointer is NULL");
00730     ERROR2IF(pTextStory == NULL, AC_FAIL, "The TextStory pointer is NULL");
00731 
00732     // Create a new action and insert it in the action list
00733     UINT32 ActSize = sizeof(MatrixRemoveFromPathAction);
00734     MatrixRemoveFromPathAction* pNewAction = NULL;
00735     ActionCode Ac = Action::Init( pOp, pActionList, ActSize, CC_RUNTIME_CLASS(MatrixRemoveFromPathAction), (Action**)&pNewAction);
00736 
00737     // Set the members of the new action
00738     if ((Ac == AC_OK) && (pNewAction != NULL))
00739         pNewAction->pStory = pTextStory;
00740 
00741     return Ac;
00742 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:56:10 2007 for Camelot by  doxygen 1.4.4