InvalidateArbitaryAction Class Reference

When executed this action will Force a redraw of the bounding rectangle it contains. More...

#include <invalid.h>

Inheritance diagram for InvalidateArbitaryAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 InvalidateArbitaryAction ()
 dummy constructor
virtual ActionCode Execute ()
 Invalidates the region in the action and builds the appropriate undo/redo info to do it again later.
SpreadGetSpread () const
DocRect GetRect () const
void SetRect (DocRect NewRect)

Static Public Member Functions

static ActionCode Init (Operation *const pOp, ActionList *pActionList, Spread *pSpread, const DocRect &InvalidRect, Action **NewAction)
 Creates a new InvalidateArbitaryAction that invalidates an arbitary region in the document.

Protected Attributes

SpreadpSpread
DocRect InvalidRect

Detailed Description

When executed this action will Force a redraw of the bounding rectangle it contains.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/8/94

Definition at line 117 of file invalid.h.


Constructor & Destructor Documentation

InvalidateArbitaryAction::InvalidateArbitaryAction  ) 
 

dummy constructor

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/8/94

Definition at line 131 of file invalid.cpp.

00132 {
00133 }


Member Function Documentation

ActionCode InvalidateArbitaryAction::Execute  )  [virtual]
 

Invalidates the region in the action and builds the appropriate undo/redo info to do it again later.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/8/94
Returns:
An Action Code

Reimplemented from Action.

Definition at line 185 of file invalid.cpp.

00186 {
00187     // Attempt to initialise the action    
00188     InvalidateArbitaryAction* InvRgnAct;  
00189     ActionCode ActCode = InvalidateArbitaryAction::Init(pOperation, pOppositeActLst, pSpread,
00190                          InvalidRect, (Action**)(&InvRgnAct));
00191     
00192     // See if it worked
00193     if (ActCode != AC_FAIL)
00194     {   
00195         // Find out about the current document
00196         Document* pDocument = GetWorkingDoc();
00197         ENSURE(pDocument!=NULL, "There was no document in InvalidateArbitaryAction::Execute()" );
00198         
00199         // actually invalidate the region
00200         if (pDocument != NULL)
00201             pDocument->ForceRedraw(pSpread, InvalidRect, TRUE);
00202     }
00203 
00204     // return the action code we got back earlier
00205     return ActCode;
00206 }

DocRect InvalidateArbitaryAction::GetRect  )  const [inline]
 

Definition at line 134 of file invalid.h.

00134 {return InvalidRect;}

Spread* InvalidateArbitaryAction::GetSpread  )  const [inline]
 

Definition at line 133 of file invalid.h.

00133 {return pSpread;}

ActionCode InvalidateArbitaryAction::Init Operation *const   pOp,
ActionList pActionList,
Spread pSpread,
const DocRect InvalidRect,
Action **  NewAction
[static]
 

Creates a new InvalidateArbitaryAction that invalidates an arbitary region in the document.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/8/94
Parameters:
pOp - The operation that this action is being created from [INPUTS] pActionList - The action list that it should be in pSpread - The spread that the region to invalidate is on InvalidateRect - The region that requires invalidating
NewAction - Will hold a pointer to an action [OUTPUTS]
Returns:
an action code

Definition at line 154 of file invalid.cpp.

00156 {
00157     // go and ask the base class to do all its fabby stuff
00158     ActionCode Ac = Action::Init(pOp, pActionList, sizeof(InvalidateArbitaryAction), 
00159                                  CC_RUNTIME_CLASS(InvalidateArbitaryAction), NewAction);
00160     
00161     // If we got something resonable back, then set up our infomation
00162     if (*NewAction!=NULL)
00163     {
00164         ((InvalidateArbitaryAction*)(*NewAction))->InvalidRect = InvalidRect;
00165         ((InvalidateArbitaryAction*)(*NewAction))->pSpread = pSpread; 
00166     }
00167 
00168     // Whatever happen, we have to tell someone
00169     return Ac; 
00170 }

void InvalidateArbitaryAction::SetRect DocRect  NewRect  )  [inline]
 

Definition at line 135 of file invalid.h.

00135 {InvalidRect = NewRect;}


Member Data Documentation

DocRect InvalidateArbitaryAction::InvalidRect [protected]
 

Definition at line 140 of file invalid.h.

Spread* InvalidateArbitaryAction::pSpread [protected]
 

Definition at line 139 of file invalid.h.


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