#include <prpsgds.h>
Inheritance diagram for LayerColourAction:
Public Member Functions | |
LayerColourAction () | |
Constructor for the action. | |
~LayerColourAction () | |
virtual ActionCode | Execute () |
Executes the action. Puts the action's layer's visible state to the opposite setting. | |
Static Public Member Functions | |
static ActionCode | Init (UndoableOperation *pOp, ActionList *pActionList, OpChangeLayerColourParam Param) |
The action that does the layer colour change biz. | |
Protected Attributes | |
OpChangeLayerColourParam | Param |
Definition at line 300 of file prpsgds.h.
|
Constructor for the action.
Definition at line 1030 of file prpsgds.cpp.
|
|
Definition at line 1125 of file prpsgds.cpp.
|
|
Executes the action. Puts the action's layer's visible state to the opposite setting.
Reimplemented from Action. Definition at line 1108 of file prpsgds.cpp. 01109 { 01110 ActionCode Ac = AC_FAIL; 01111 01112 if (pOperation->IS_KIND_OF(UndoableOperation)) 01113 { 01114 Ac = LayerColourAction::Init((UndoableOperation*)pOperation,pOppositeActLst,Param); 01115 01116 } 01117 else 01118 { 01119 ERROR3("LayerColourAction::Execute() called with op that's not an undoable op"); 01120 } 01121 01122 return Ac; 01123 }
|
|
The action that does the layer colour change biz.
Definition at line 1056 of file prpsgds.cpp. 01059 { 01060 UINT32 ActSize = sizeof(LayerColourAction); 01061 01062 LayerColourAction* pNewAction; 01063 ActionCode Ac = Action::Init(pOp,pActionList,ActSize,CC_RUNTIME_CLASS(LayerColourAction),(Action**)&pNewAction); 01064 01065 if (Ac != AC_FAIL && pNewAction != NULL) 01066 { 01067 OpChangeLayerColourParam& Param = ((LayerColourAction*)pNewAction)->Param; 01068 01069 Document* pDoc = EntryParam.pDoc; 01070 Layer* pLayer = EntryParam.pLayer; 01071 01072 Param.pDoc = pDoc; 01073 Param.pLayer = pLayer; 01074 01075 if (pDoc != NULL && pLayer != NULL) 01076 { 01077 DocColour* pDocColour = pLayer->GetGuideColour(); 01078 Param.pColour = pDocColour->FindParentIndexedColour(); 01079 01080 pLayer->SetGuideColour(EntryParam.pColour); 01081 LayerSGallery::ForceRedrawLayer(pDoc,pLayer); 01082 BROADCAST_TO_ALL(LayerMsg(pLayer,LayerMsg::GUIDELINES_CHANGED)); 01083 } 01084 01085 ERROR3IF(pDoc == NULL, "pDoc is NULL"); 01086 ERROR3IF(pLayer == NULL,"pLayer is NULL"); 01087 } 01088 01089 return Ac; 01090 }
|
|
|