#include <opbezier.h>
Inheritance diagram for RemoveFloaterAction:
Public Member Functions | |
RemoveFloaterAction () | |
Constructor for the action to remove a floating endpoint. | |
~RemoveFloaterAction () | |
virtual ActionCode | Execute () |
Removes the floating endpoint from the Line Tool, creating an undo action to insert the endpoint. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *pOp, ActionList *pActionList, BezierTool *pTool, Action **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 ActionCode | DoRemove (Operation *pOp, ActionList *pActionList, BezierTool *pTool) |
This static function makes it a little easier to use this action. It creates an instance of this action and appends it to the action list. | |
Protected Attributes | |
BezierTool * | pLineTool |
Definition at line 296 of file opbezier.h.
|
Constructor for the action to remove a floating endpoint.
Definition at line 1280 of file opbezier.cpp.
|
|
Definition at line 1411 of file opbezier.cpp.
|
|
This static function makes it a little easier to use this action. It creates an instance of this action and appends it to the action list.
Definition at line 1350 of file opbezier.cpp. 01353 { 01354 RemoveFloaterAction* RecAction; 01355 ActionCode Act = RemoveFloaterAction::Init(pOp, pActionList, pTool, (Action**)&RecAction); 01356 return Act; 01357 }
|
|
Removes the floating endpoint from the Line Tool, creating an undo action to insert the endpoint.
Reimplemented from Action. Definition at line 1376 of file opbezier.cpp. 01377 { 01378 ERROR3IF(pLineTool == NULL, "Pointer to line tool was NULL"); 01379 01380 InsertFloaterAction* ReAction = NULL; 01381 ActionCode Act = AC_FAIL; 01382 01383 // Create a redo action for this action, which is an InsertFloaterAction 01384 if (pLineTool != NULL) 01385 { 01386 DocCoord OldPos; 01387 Spread* OldpSpread; 01388 Document* OldpDoc; 01389 01390 if (pLineTool->GetMoveTo(&OldpSpread, &OldPos, &OldpDoc)) 01391 { 01392 Act = InsertFloaterAction::Init(pOperation, pOppositeActLst, (Action**)(&ReAction)); 01393 if (ReAction != NULL) 01394 { 01395 ReAction->pLineTool = pLineTool; 01396 ReAction->pSpread = OldpSpread; 01397 ReAction->Point = OldPos; 01398 } 01399 01400 if (Act == AC_FAIL) 01401 return AC_FAIL; 01402 } 01403 01404 // Now do the actual action 01405 pLineTool->ClearMoveTo(); 01406 } 01407 01408 return Act; 01409 }
|
|
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 1313 of file opbezier.cpp. 01317 { 01318 UINT32 ActSize = sizeof(RemoveFloaterAction); 01319 01320 ActionCode Ac = Action::Init( pOp, pActionList, ActSize, CC_RUNTIME_CLASS(RemoveFloaterAction), NewAction); 01321 if ((Ac == AC_OK) && (*NewAction != NULL)) 01322 { 01323 ((RemoveFloaterAction*)*NewAction)->pLineTool = pTool; 01324 } 01325 return Ac; 01326 }
|
|
Definition at line 313 of file opbezier.h. |