#include <opcntr.h>
Inheritance diagram for ChangeContourAttributeProfileAction:
Public Member Functions | |
ChangeContourAttributeProfileAction () | |
Constructor for the action. | |
~ChangeContourAttributeProfileAction () | |
virtual ActionCode | Execute () |
Executes the action. This will reset the num blend steps in pThisNodeBlend to OldNumSteps, after creating another action to record the current num steps of pThisNodeBlend. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *pOp, ActionList *pActionList, NodeContourController *pThisNodeContour, CProfileBiasGain Profile, ChangeContourAttributeProfileAction **NewAction) |
This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NO_RECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation. | |
static void | ChangeAttributeProfileWithNoUndo (CProfileBiasGain &Profile) |
When applying contour (attribute) profiles, we only want to generate one bit of undo information. This function allows us to meet this requirement (the one bit of undo information is generated via OpChangeContourAttributeProfile::DoWithParam ()). This function is ONLY called from within ContourInfoBarOp::ChangeProfile () - after OpChangeContourAttributeProfile::DoWithParam () has been called. | |
Protected Attributes | |
NodeContourController * | m_pNode |
CProfileBiasGain | m_Profile |
Definition at line 597 of file opcntr.h.
|
Constructor for the action.
Definition at line 3055 of file opcntr.cpp.
|
|
Definition at line 3227 of file opcntr.cpp.
|
|
When applying contour (attribute) profiles, we only want to generate one bit of undo information. This function allows us to meet this requirement (the one bit of undo information is generated via OpChangeContourAttributeProfile::DoWithParam ()). This function is ONLY called from within ContourInfoBarOp::ChangeProfile () - after OpChangeContourAttributeProfile::DoWithParam () has been called.
Definition at line 3144 of file opcntr.cpp. 03145 { 03146 BeginSlowJob(-1, TRUE); 03147 03148 List NodeList; 03149 BevelTools::BuildListOfSelectedNodes(&NodeList, CC_RUNTIME_CLASS(NodeContourController)); 03150 03151 NodeListItem * pItem = (NodeListItem *)NodeList.GetHead(); 03152 03153 NodeContourController * pController = NULL; 03154 03155 // Node * pParent = NULL; 03156 03157 // ChangeContourObjectProfileAction * pAction= NULL; 03158 03159 Document * pDoc = Document::GetCurrent(); 03160 03161 while (pItem) 03162 { 03163 pController = (NodeContourController *)pItem->pNode; 03164 03165 // change the profile & regen 03166 pController->SetAttrProfile(Profile); 03167 pController->RegenerateNode(NULL, FALSE); 03168 03169 // redraw the contour 03170 if (pDoc) 03171 { 03172 pDoc->ForceRedraw(pController->FindParentSpread(), 03173 pController->GetBoundingRect(), FALSE, pController); 03174 } 03175 03176 pItem = (NodeListItem *)NodeList.GetNext(pItem); 03177 } 03178 03179 NodeList.DeleteAll(); 03180 03181 EndSlowJob (); 03182 03183 if (pDoc->GetOpHistory ().CanRedo ()) 03184 { 03185 // then we need to clear out the redo information - since we are now 'before' it .... 03186 pDoc->GetOpHistory ().DeleteRedoableOps (); 03187 03188 // and update the state of things .... 03189 DialogBarOp::SetSystemStateChanged(); 03190 DialogBarOp::UpdateStateOfAllBars(); 03191 } 03192 }
|
|
Executes the action. This will reset the num blend steps in pThisNodeBlend to OldNumSteps, after creating another action to record the current num steps of pThisNodeBlend.
Reimplemented from Action. Definition at line 3210 of file opcntr.cpp. 03211 { 03212 ChangeContourAttributeProfileAction * pAction = NULL; 03213 03214 ActionCode Act = ChangeContourAttributeProfileAction::Init( pOperation, 03215 pOppositeActLst, 03216 m_pNode, 03217 m_Profile, 03218 &pAction); 03219 if (Act != AC_FAIL) 03220 { 03221 03222 } 03223 03224 return Act; 03225 }
|
|
This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NO_RECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation.
Definition at line 3092 of file opcntr.cpp. 03097 { 03098 UINT32 ActSize = sizeof(ChangeContourAttributeProfileAction); 03099 03100 ActionCode Ac = Action::Init(pOp,pActionList,ActSize, 03101 CC_RUNTIME_CLASS(ChangeContourAttributeProfileAction),(Action**)NewAction); 03102 03103 Document * pDoc = Document::GetCurrent(); 03104 03105 if (Ac != AC_FAIL) 03106 { 03107 (*NewAction)->m_pNode = pThisNodeContour; 03108 (*NewAction)->m_Profile = pThisNodeContour->GetAttrProfile(); 03109 03110 // change the profile & regen 03111 pThisNodeContour->SetAttrProfile(Profile); 03112 pThisNodeContour->RegenerateNode(NULL, FALSE); 03113 03114 // redraw the contour 03115 if (pDoc) 03116 { 03117 pDoc->ForceRedraw(pThisNodeContour->FindParentSpread(), 03118 pThisNodeContour->GetBoundingRect(), FALSE, pThisNodeContour); 03119 } 03120 } 03121 03122 return Ac; 03123 }
|
|
|
|
|