#include <blobby.h>
Inheritance diagram for UndoColAction:
Public Member Functions | |
UndoColAction () | |
UndoColAction constructor. | |
virtual ActionCode | Execute () |
Executes the UndoColAction setting the paper colour to the colour it was prior to the operation being done or redone. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *const pOp, ActionList *pActionList, UINT32 ActionSize, Action **NewAction) |
To check that there is sufficient room for the action in the operation history, and if there is, then to add the action to the operations action list. | |
Private Attributes | |
DocColour | Color |
Friends | |
class | RedoColAction |
class | BlobbyOp |
Definition at line 156 of file blobby.h.
|
UndoColAction constructor.
Definition at line 330 of file blobby.cpp. 00330 :Action() 00331 { 00332 }
|
|
Executes the UndoColAction setting the paper colour to the colour it was prior to the operation being done or redone.
Reimplemented from Action. Definition at line 406 of file blobby.cpp. 00407 { 00408 RedoColAction* RedoColAct; 00409 ActionCode ActCode; 00410 // Attempt to initialise the action 00411 if ((ActCode = RedoColAction::Init(pOperation, 00412 pOperation->GetRedoActionList(), 00413 10, 00414 ((Action**)&RedoColAct))) != AC_FAIL) // 10 is bodge 00415 if (RedoColAct != NULL) // Check we are not unwinding 00416 RedoColAct->Color = Page::GetPageColour(); 00417 00418 if (ActCode != AC_FAIL) 00419 { 00420 // The action did not fail to initialise 00421 Page::SetPageColour(Color); // Set the paper colour to the colour it was 00422 // prior to the operation being done or redone 00423 (DocView::GetSelected())->ForceRedraw(); // Show the new colour 00424 } 00425 return (ActCode); 00426 }
|
|
To check that there is sufficient room for the action in the operation history, and if there is, then to add the action to the operations action list.
Size: The size of the action in bytes. This should be the total size of the action (including any objects pointed to by the action).
AC_OK : The action was successfully initialised and added to the operation. The function simply calls the Action::Init function passing the runtime class of an UndoColAction.
Definition at line 377 of file blobby.cpp. 00381 { 00382 00383 return(Action::Init(pOp, 00384 pActionList, 00385 ActionSize, 00386 CC_RUNTIME_CLASS(UndoColAction), 00387 NewAction)); 00388 }
|
|
|
|
|
|
|