#include <pathedit.h>
Inheritance diagram for ModifyFilledAction:
Public Member Functions | |
ModifyFilledAction () | |
Constructor for the action to undo path Filled flag. | |
~ModifyFilledAction () | |
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 | Init (Operation *pOp, ActionList *pActionList, BOOL UndoFillOrStroke, BOOL FilledFlag, NodePath *WhichPath, Action **NewAction) |
This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NO_RECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation. | |
Protected Attributes | |
NodePath * | ChangedPath |
BOOL | UndoFilled |
BOOL | OldFilledState |
Definition at line 825 of file pathedit.h.
|
Constructor for the action to undo path Filled flag.
Definition at line 9433 of file pathedit.cpp. 09434 { 09435 UndoFilled = TRUE; 09436 OldFilledState = FALSE; 09437 }
|
|
Definition at line 9537 of file pathedit.cpp.
|
|
This is a pure virtual method which should be redefined for all derived classes of Action.
Reimplemented from Action. Definition at line 9494 of file pathedit.cpp. 09495 { 09496 // Here we're undoing the modify, so we have to change the element in the path, 09497 // recording redo information at the same time. 09498 09499 ModifyFilledAction* ModAction; 09500 09501 // Create a redo action for this action, which is also a ModifyElementAction 09502 09503 BOOL CurState; 09504 if (UndoFilled) 09505 CurState = ChangedPath->InkPath.IsFilled; 09506 else 09507 CurState = ChangedPath->InkPath.IsStroked; 09508 09509 ActionCode Act; 09510 Act = ModifyFilledAction::Init(pOperation, 09511 pOppositeActLst, 09512 UndoFilled, 09513 CurState, 09514 ChangedPath, 09515 (Action**)(&ModAction)); 09516 if (Act == AC_FAIL) 09517 return AC_FAIL; 09518 09519 // Force a re-draw of the place where the path used to be 09520 Document* pDoc = GetWorkingDoc(); 09521 ERROR2IF( pDoc == NULL, AC_FAIL, "There was no current document when undoing modifypath" ); 09522 Spread* pSpread = ChangedPath->FindParentSpread(); 09523 DocRect Invalid = ChangedPath->GetUnionBlobBoundingRect(); 09524 pDoc->ForceRedraw( pSpread, Invalid, FALSE, ChangedPath ); 09525 09526 if (UndoFilled) 09527 ChangedPath->InkPath.IsFilled = OldFilledState; 09528 else 09529 ChangedPath->InkPath.IsStroked = OldFilledState; 09530 09531 Invalid = ChangedPath->GetUnionBlobBoundingRect(); 09532 pDoc->ForceRedraw( pSpread, Invalid, FALSE, ChangedPath ); 09533 09534 return Act; 09535 }
|
|
This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NO_RECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation.
Definition at line 9473 of file pathedit.cpp. 09479 { 09480 UINT32 ActSize = sizeof(ModifyFilledAction); 09481 09482 ActionCode Ac = Action::Init( pOp, pActionList, ActSize, CC_RUNTIME_CLASS(ModifyFilledAction), NewAction); 09483 if ((Ac==AC_OK) && (*NewAction != NULL)) 09484 { 09485 ((ModifyFilledAction*)*NewAction)->UndoFilled = UndoFillOrStroke; 09486 ((ModifyFilledAction*)*NewAction)->OldFilledState = FilledFlag; 09487 ((ModifyFilledAction*)*NewAction)->ChangedPath = WhichPath; 09488 } 09489 // if (IsUserName("Jim")) TRACE( _T("Creating ModifyElementAction")); 09490 09491 return Ac; 09492 }
|
|
Definition at line 841 of file pathedit.h. |
|
Definition at line 843 of file pathedit.h. |
|
Definition at line 842 of file pathedit.h. |