#include <pathedit.h>
Inheritance diagram for ModifyFlagsAction:
Public Member Functions | |
ModifyFlagsAction () | |
Constructor for the action to undo path flags modification. | |
~ModifyFlagsAction () | |
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, PathFlags Flags, INT32 Index, 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 |
PathFlags | ChangedFlags |
INT32 | ChangedIndex |
Definition at line 791 of file pathedit.h.
|
Constructor for the action to undo path flags modification.
Definition at line 9313 of file pathedit.cpp. 09314 { 09315 ChangedPath = NULL; 09316 }
|
|
Definition at line 9410 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 9372 of file pathedit.cpp. 09373 { 09374 // Here we're undoing the modify, so we have to change the element in the path, 09375 // recording redo information at the same time. 09376 09377 ModifyFlagsAction* ModAction; 09378 09379 // Get pointers to all the arrays of the path 09380 09381 PathFlags* Flags = ChangedPath->InkPath.GetFlagArray(); 09382 09383 // Create a redo action for this action, which is also a ModifyElementAction 09384 09385 ActionCode Act; 09386 Act = ModifyFlagsAction::Init(pOperation, 09387 pOppositeActLst, 09388 Flags[ChangedIndex], 09389 ChangedIndex, 09390 ChangedPath, 09391 (Action**)(&ModAction)); 09392 if (Act == AC_FAIL) 09393 return AC_FAIL; 09394 09395 // Force a re-draw of the place where the path used to be 09396 Document* pDoc = GetWorkingDoc(); 09397 ERROR2IF( pDoc == NULL, AC_FAIL, "There was no current document when undoing modifypath" ); 09398 Spread* pSpread = ChangedPath->FindParentSpread(); 09399 DocRect Invalid = ChangedPath->GetUnionBlobBoundingRect(); 09400 pDoc->ForceRedraw( pSpread, Invalid, FALSE, ChangedPath ); 09401 09402 Flags[ChangedIndex] = ChangedFlags; 09403 09404 Invalid = ChangedPath->GetUnionBlobBoundingRect(); 09405 pDoc->ForceRedraw( pSpread, Invalid, FALSE, ChangedPath ); 09406 09407 return Act; 09408 }
|
|
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 9351 of file pathedit.cpp. 09357 { 09358 UINT32 ActSize = sizeof(ModifyFlagsAction); 09359 09360 ActionCode Ac = Action::Init( pOp, pActionList, ActSize, CC_RUNTIME_CLASS(ModifyFlagsAction), NewAction); 09361 if ((Ac==AC_OK) && (*NewAction != NULL)) 09362 { 09363 ((ModifyFlagsAction*)*NewAction)->ChangedFlags = Flags; 09364 ((ModifyFlagsAction*)*NewAction)->ChangedIndex = Index; 09365 ((ModifyFlagsAction*)*NewAction)->ChangedPath = WhichPath; 09366 } 09367 // if (IsUserName("Jim")) TRACE( _T("Creating ModifyElementAction")); 09368 09369 return Ac; 09370 }
|
|
Definition at line 808 of file pathedit.h. |
|
Definition at line 809 of file pathedit.h. |
|
Definition at line 807 of file pathedit.h. |