RedoColAction Class Reference

Simple BlobbyOp action which restores the colour of a documents page to the colour it was prior to the operation being undone. More...

#include <blobby.h>

Inheritance diagram for RedoColAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 RedoColAction ()
 RedoColAction constructor.
virtual ActionCode Execute ()
 Executes the RedoColAction setting the paper colour to the colour it was prior to the operation being undone.

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 UndoColAction

Detailed Description

Simple BlobbyOp action which restores the colour of a documents page to the colour it was prior to the operation being undone.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/8/93
See also:
BlobbyOp

Definition at line 187 of file blobby.h.


Constructor & Destructor Documentation

RedoColAction::RedoColAction  ) 
 

RedoColAction constructor.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/8/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 444 of file blobby.cpp.

00444                             :Action()
00445 {
00446 }


Member Function Documentation

ActionCode RedoColAction::Execute  )  [virtual]
 

Executes the RedoColAction setting the paper colour to the colour it was prior to the operation being undone.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/8/93
Parameters:
- [INPUTS]
ActionCode indicating if the action was successfully executed or not [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from Action.

Definition at line 521 of file blobby.cpp.

00522 {
00523     UndoColAction* UndoColAct;
00524     ActionCode ActCode;
00525     // Attempt to initialise the action
00526     if ((ActCode = UndoColAction::Init(pOperation,
00527                                        pOperation->GetUndoActionList(),
00528                                        10,
00529                                        ((Action**)&UndoColAct))) == AC_OK) // 10 is bodge
00530         if (UndoColAct != NULL)// Check we are not unwinding
00531             UndoColAct->Color = Page::GetPageColour();
00532 
00533     if (ActCode != AC_FAIL)
00534     {
00535         // The action was successfully initialised
00536         Page::SetPageColour(Color);                 // Set the page colour to the colour it was
00537                                                     // prior to the operation being undone.
00538         (DocView::GetSelected())->ForceRedraw();    // Show the colour change
00539     }
00540     return (ActCode);
00541 }

ActionCode RedoColAction::Init Operation *const   pOp,
ActionList pActionList,
UINT32  ActionSize,
Action **  NewAction
[static]
 

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.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/8/93
Parameters:
pOp,: The operation to which the action should be added [INPUTS]
pActionList: The action list in the operation object

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).

Parameters:
NewAction,: A pointer to the action if it could be allocated. [OUTPUTS]
Returns:
AC_FAIL: There was not enough room in the operation history for the action and the user did not wish to continue. Usually End() should be called in this situation.
AC_NORECORD: There was not enough room in the operation history for the action, but the user requested that he wished to continue without undo.

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 a RedoColAction.

Returns:
Errors: -
See also:
Action::Init

Definition at line 492 of file blobby.cpp.

00496 {
00497     return(Action::Init(pOp,
00498                         pActionList,
00499                         ActionSize,
00500                         CC_RUNTIME_CLASS(RedoColAction),
00501                         NewAction));
00502 }


Friends And Related Function Documentation

friend class UndoColAction [friend]
 

Definition at line 190 of file blobby.h.


Member Data Documentation

DocColour RedoColAction::Color [private]
 

Definition at line 200 of file blobby.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:00:24 2007 for Camelot by  doxygen 1.4.4