#include <colormgr.h>
Inheritance diagram for ActionColourChange:
Public Member Functions | |
ActionColourChange () | |
ActionColourChange constructor. | |
~ActionColourChange () | |
ActionColourChange destructor. | |
virtual ActionCode | Execute () |
Executes the ActionColourChange to swap the two IndexedColours over and generates another ActionColourChange to undo this change. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *const pOp, ActionList *pActionList, UINT32 ActionSize, IndexedColour *TheTarget, IndexedColour *TheNewDefn, BOOL ChangeIsInvisible, 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. | |
Protected Attributes | |
BOOL | IsInvisible |
Private Attributes | |
IndexedColour * | Target |
IndexedColour * | NewDefn |
Friends | |
class | OpColourChange |
Definition at line 465 of file colormgr.h.
|
ActionColourChange constructor.
Definition at line 3444 of file colormgr.cpp.
|
|
ActionColourChange destructor.
Definition at line 3460 of file colormgr.cpp.
|
|
Executes the ActionColourChange to swap the two IndexedColours over and generates another ActionColourChange to undo this change.
Reimplemented from Action. Definition at line 3480 of file colormgr.cpp. 03481 { 03482 ActionColourChange ColChangeAct; 03483 ActionCode ActCode; 03484 03485 // Create an action to restore the changes we are about to make 03486 if ((ActCode = ActionColourChange::Init(pOperation, 03487 pOppositeActLst, 03488 sizeof(ActionColourChange), 03489 Target, NewDefn, IsInvisible, 03490 (Action**)(&ColChangeAct))) != AC_FAIL) 03491 { 03492 // Swap the colour and its undo partner over 03493 Target->SwapWith(NewDefn); 03494 03495 // Broadcast the change 03496 Document *ScopeDoc = GetWorkingDoc(); 03497 ColourList *ColList = ScopeDoc->GetIndexedColours(); 03498 if (IsInvisible) 03499 ColourManager::ColourHasChangedInvisible(ScopeDoc, ColList, Target); 03500 else 03501 ColourManager::ColourHasChanged(ScopeDoc, ColList, Target); 03502 } 03503 03504 return (ActCode); 03505 }
|
|
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.
AC_OK : The action was successfully initialised and added to the operation. The function calls the Action::Init function passing the runtime class of an ActionColourChange.
Definition at line 3562 of file colormgr.cpp. 03569 { 03570 03571 03572 ActionCode Ac = (Action::Init(pOp, 03573 pActionList, 03574 ActionSize, 03575 CC_RUNTIME_CLASS(ActionColourChange), 03576 NewAction)); 03577 if (*NewAction != NULL) 03578 { 03579 ActionColourChange *ACC = (ActionColourChange*) (*NewAction); 03580 ACC->Target = TheTarget; 03581 ACC->NewDefn = TheNewDefn; 03582 ACC->IsInvisible = ChangeIsInvisible; 03583 } 03584 03585 return (Ac); 03586 }
|
|
Definition at line 469 of file colormgr.h. |
|
Definition at line 484 of file colormgr.h. |
|
Definition at line 488 of file colormgr.h. |
|
Definition at line 487 of file colormgr.h. |