SaveDetachAction Class Reference

This action saves and restores the detach flags inside a mould object. More...

#include <moldedit.h>

Inheritance diagram for SaveDetachAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 SaveDetachAction ()
 SaveDetachAction constructor.
virtual ActionCode Execute ()
 Executes the SaveDetachAction.

Static Public Member Functions

static ActionCode Save (Operation *const pOp, NodeMould *const pMould)
 This simple action saves away a rectangle on the undo, which will be invalidated during execution of undo and redo.
static ActionCode Init (Operation *const pOp, ActionList *pActionList, NodeMould *const pMould, Action **NewAction)
 An action to save away the state of the detach flag.

Private Attributes

NodeMouldpCurrMould
BOOL CurrDetached

Detailed Description

This action saves and restores the detach flags inside a mould object.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/01/95
See also:
-

Definition at line 256 of file moldedit.h.


Constructor & Destructor Documentation

SaveDetachAction::SaveDetachAction  ) 
 

SaveDetachAction constructor.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/01/95

Definition at line 1457 of file moldedit.cpp.

01458 {
01459     pCurrMould=NULL;
01460     CurrDetached=FALSE;
01461 }


Member Function Documentation

ActionCode SaveDetachAction::Execute  )  [virtual]
 

Executes the SaveDetachAction.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/01/95
Parameters:
- [INPUTS]
Returns:
ActionCode indicating if the action was successfully executed or not

Reimplemented from Action.

Definition at line 1542 of file moldedit.cpp.

01543 {
01544     SaveDetachAction* MyAct;  
01545     ActionCode Ac = SaveDetachAction::Init( pOperation,
01546                                             pOppositeActLst,
01547                                             pCurrMould,
01548                                             (Action**)(&MyAct));
01549     
01550     if (Ac!=AC_FAIL)
01551     {
01552         if ((pCurrMould->IsDetached())!=CurrDetached)
01553             pCurrMould->ToggleDetachFlag();
01554     }
01555     return Ac;
01556 }   

ActionCode SaveDetachAction::Init Operation *const   pOp,
ActionList pActionList,
NodeMould *const   pMould,
Action **  NewAction
[static]
 

An action to save away the state of the detach flag.

Action** NewAction)

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/01/95
Parameters:
pOp,: The operation to which the action should be added [INPUTS] pActionList: The action list in the operation object pSpread: The rectangles spread
NewAction,: A pointer to the action if it could be allocated. [OUTPUTS]
Returns:
ActionCode: one of AC_OK, AC_NORESTORE, AC_FAIL

Definition at line 1510 of file moldedit.cpp.

01514 {       
01515     ActionCode Ac = (Action::Init(pOp,
01516                                   pActionList,
01517                                   sizeof(SaveDetachAction), 
01518                                   CC_RUNTIME_CLASS(SaveDetachAction), 
01519                                   NewAction));
01520     if (*NewAction != NULL)
01521     {
01522         ((SaveDetachAction*)(*NewAction))->pCurrMould = pMould;
01523         ((SaveDetachAction*)(*NewAction))->CurrDetached = pMould->IsDetached();
01524     }
01525     return (Ac); 
01526 } 

ActionCode SaveDetachAction::Save Operation *const   pOp,
NodeMould *const   pMould
[static]
 

This simple action saves away a rectangle on the undo, which will be invalidated during execution of undo and redo.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/01/95
Parameters:
pOp = The operation to which the action should be added [INPUTS] pMould = The mould object whose data we are saving
- [OUTPUTS]
Returns:
ActionCode: one of AC_OK, AC_NORESTORE, AC_FAIL

Definition at line 1481 of file moldedit.cpp.

01483 {
01484     SaveDetachAction* SvDetAct;  
01485     // Attempt to initialise the next action    
01486     return SaveDetachAction::Init(pOp, pOp->GetUndoActionList(), pMould, (Action**)(&SvDetAct));
01487 }


Member Data Documentation

BOOL SaveDetachAction::CurrDetached [private]
 

Definition at line 271 of file moldedit.h.

NodeMould* SaveDetachAction::pCurrMould [private]
 

Definition at line 270 of file moldedit.h.


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