#include <invalid.h>
Inheritance diagram for InvalidateArbitaryAction:
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. | |
Spread * | GetSpread () 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 | |
Spread * | pSpread |
DocRect | InvalidRect |
Definition at line 117 of file invalid.h.
|
dummy constructor
Definition at line 131 of file invalid.cpp.
|
|
Invalidates the region in the action and builds the appropriate undo/redo info to do it again later.
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 }
|
|
Definition at line 134 of file invalid.h. 00134 {return InvalidRect;}
|
|
Definition at line 133 of file invalid.h. 00133 {return pSpread;}
|
|
Creates a new InvalidateArbitaryAction that invalidates an arbitary region in the document.
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 }
|
|
Definition at line 135 of file invalid.h. 00135 {InvalidRect = NewRect;}
|
|
|
|
|