MatrixFitToPathAction 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 MatrixFitToPathAction:

BaseTextAction Action ListItem CCObject SimpleCCObject List of all members.

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 *)

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 239 of file textacts.h.


Constructor & Destructor Documentation

MatrixFitToPathAction::MatrixFitToPathAction  ) 
 

Constructor - initialises the member variables.

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

Definition at line 540 of file textacts.cpp.

00541 {
00542 }

MatrixFitToPathAction::~MatrixFitToPathAction  ) 
 

Destructor.

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

Definition at line 552 of file textacts.cpp.

00553 {
00554 }


Member Function Documentation

BOOL MatrixFitToPathAction::DoMatrixRemoveFromPath Operation pOp,
ActionList ,
TextStory
[static]
 

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 }

ActionCode MatrixFitToPathAction::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 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 }

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

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 }


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