#include <layermgr.h>
Inheritance diagram for ChangeLyrAttribAction:
Public Member Functions | |
ChangeLyrAttribAction () | |
ChangeLyrAttribAction constructor. | |
~ChangeLyrAttribAction () | |
ChangeLyrAttribAction destructor. | |
virtual ActionCode | Execute () |
Executes the ChangeLyrAttribAction. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *const pOp, ActionList *pActionList, UINT32 ActionSize, LayerStatus &Status, Layer *Layer, 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 | |
Layer * | ChangeLayer |
LayerStatus | Status |
Definition at line 262 of file layermgr.h.
|
ChangeLyrAttribAction constructor.
Definition at line 982 of file layermgr.cpp.
|
|
ChangeLyrAttribAction destructor.
Definition at line 1003 of file layermgr.cpp.
|
|
Executes the ChangeLyrAttribAction.
Reimplemented from Action. Definition at line 1026 of file layermgr.cpp. 01027 { 01028 ChangeLyrAttribAction ChngLyrAct; 01029 ActionCode ActCode; 01030 01031 // Create an action to restore the changes we are about to make 01032 if ((ActCode = ChangeLyrAttribAction::Init(pOperation, 01033 pOppositeActLst, 01034 sizeof(ChangeLyrAttribAction), 01035 ChangeLayer->GetLayerStatus(), // The current status 01036 ChangeLayer, 01037 ( Action**)(&ChngLyrAct))) != AC_FAIL) 01038 { 01039 // Remove the layers selection blobs if we are about to make the layer invisible, 01040 // or if we are about to lock the layer. 01041 //if ((Status.Flags.Locked) || 01042 // (!(Status.Flags.Visible))) 01043 //{ 01044 // NodeRenderableInk::DeselectAllOnLayer( ChangeLayer ); 01045 //} 01046 01047 // Preserve the Active flag of the changing layer 01048 LayerStatus CurrentStatus = ChangeLayer->GetLayerStatus(); 01049 //Status.Flags.Active = CurrentStatus.Flags.Active; 01050 01051 // Change the layer's status 01052 ChangeLayer->SetLayerStatus(Status); 01053 } 01054 return (ActCode); 01055 }
|
|
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.
ActionSize: The size of the action in bytes. This should be the total size of the action (including any objects pointed to by the action). Status: The status which is restored when executed Layer: The layer to change when we execute
AC_OK : The action was successfully initialised and added to the operation. The function calls the Action::Init function passing the runtime class of a ChangeLyrAttribAction.
Definition at line 1107 of file layermgr.cpp. 01116 { 01117 01118 ActionCode Ac = (Action::Init(pOp, 01119 pActionList, 01120 ActionSize, 01121 CC_RUNTIME_CLASS(ChangeLyrAttribAction), 01122 NewAction)); 01123 01124 if (*NewAction != NULL) // The action has been allocated 01125 { 01126 ((ChangeLyrAttribAction*)(*NewAction))->ChangeLayer = Layer; 01127 ((ChangeLyrAttribAction*)(*NewAction))->Status = Status; 01128 } 01129 return (Ac); 01130 }
|
|
Definition at line 279 of file layermgr.h. |
|
Definition at line 280 of file layermgr.h. |