RedrawBoundsAction Class Reference

An action to record the bounds of the mould. This op differs from RecordBoundsAction in that it does not use GetUnionBlobBounds() which is really bad for perspectives as this includes the vanishing points which results in a vast area of the document being redrawn. So we have to do everything separately. More...

#include <moldedit.h>

Inheritance diagram for RedrawBoundsAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 RedrawBoundsAction ()
virtual ActionCode Execute ()
 This is a pure virtual method which should be redefined for all derived classes of Action.

Static Public Member Functions

static ActionCode DoRecord (Operation *pOp, NodeMould *WhichNode, BOOL Redraw)
static ActionCode Init (Operation *pOp, ActionList *pActionList, NodeMould *WhichNode, Action **NewAction)
static void RedrawNode (Operation *pOp, NodeMould *pNode)

Protected Attributes

NodeMouldChangedNode

Detailed Description

An action to record the bounds of the mould. This op differs from RecordBoundsAction in that it does not use GetUnionBlobBounds() which is really bad for perspectives as this includes the vanishing points which results in a vast area of the document being redrawn. So we have to do everything separately.

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

Definition at line 329 of file moldedit.h.


Constructor & Destructor Documentation

RedrawBoundsAction::RedrawBoundsAction  ) 
 

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/7/94

Definition at line 1390 of file moldedit.cpp.

01391 {
01392     ChangedNode = NULL;
01393 }


Member Function Documentation

ActionCode RedrawBoundsAction::DoRecord Operation pOp,
NodeMould WhichNode,
BOOL  Redraw
[static]
 

Definition at line 1396 of file moldedit.cpp.

01397 {
01398     RedrawBoundsAction* RecAction;
01399     ActionCode Act = RedrawBoundsAction::Init(pOp, 
01400                                               pOp->GetUndoActionList(),
01401                                               WhichNode,
01402                                               (Action**)&RecAction);
01403     if (Act != AC_FAIL && Redraw)
01404         RedrawNode(pOp, WhichNode);
01405     return Act;
01406 }

ActionCode RedrawBoundsAction::Execute  )  [virtual]
 

This is a pure virtual method which should be redefined for all derived classes of Action.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/8/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: If this method is ever called then an ENSURE failure will occur.

See also:
-

Reimplemented from Action.

Definition at line 1423 of file moldedit.cpp.

01424 {
01425     RedrawBoundsAction* ReAction;
01426     ActionCode Act;
01427     Act = RedrawBoundsAction::Init(pOperation, pOppositeActLst, ChangedNode, (Action**)(&ReAction));
01428     if (Act != AC_FAIL)
01429         RedrawNode(pOperation, ChangedNode);
01430     return Act;
01431 }

ActionCode RedrawBoundsAction::Init Operation pOp,
ActionList pActionList,
NodeMould WhichNode,
Action **  NewAction
[static]
 

Definition at line 1409 of file moldedit.cpp.

01413 {
01414     UINT32 ActSize = sizeof(RedrawBoundsAction);
01415     ActionCode Ac = Action::Init( pOp, pActionList, ActSize, CC_RUNTIME_CLASS(RedrawBoundsAction), NewAction);
01416     if ((Ac == AC_OK) && (*NewAction != NULL))
01417         ((RedrawBoundsAction*)*NewAction)->ChangedNode = WhichNode;
01418 
01419     return Ac;
01420 }

void RedrawBoundsAction::RedrawNode Operation pOp,
NodeMould pNode
[static]
 

Definition at line 1434 of file moldedit.cpp.

01435 {
01436     Document* pDoc = pOp->GetWorkingDoc();
01437     ERROR3IF( pDoc == NULL, "There was no current document when undoing RecordMouldBounds" );
01438     Spread* pSpread = pNode->FindParentSpread();
01439     DocRect Invalid = pNode->GetChildrensBounds();
01440     pDoc->ForceRedraw( pSpread, Invalid, FALSE, pNode);
01441 }


Member Data Documentation

NodeMould* RedrawBoundsAction::ChangedNode [protected]
 

Definition at line 349 of file moldedit.h.


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