#include <ops.h>
Inheritance diagram for SelectDeselectAction:
Public Member Functions | |
SelectDeselectAction () | |
SelectDeselectAction constructor. | |
~SelectDeselectAction () | |
virtual ActionCode | Execute () |
Executes the SelectDeselectAction which will render node's selection blobs (which could remove them), and set it's selection state. If node is currently selected then the node is deselected. If node is currently deselected it is selected. It creates a second SelectDeselectAction for the node and adds it to the opposite action list. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *const pOp, ActionList *pActionList, Node *SelDeNode, Spread *pSpread, 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. | |
Public Attributes | |
Node * | node |
Spread * | Parent |
Definition at line 1093 of file ops.h.
|
SelectDeselectAction constructor.
Definition at line 4448 of file ops.cpp.
|
|
Definition at line 4452 of file ops.cpp.
|
|
Executes the SelectDeselectAction which will render node's selection blobs (which could remove them), and set it's selection state. If node is currently selected then the node is deselected. If node is currently deselected it is selected. It creates a second SelectDeselectAction for the node and adds it to the opposite action list.
Reimplemented from Action. Definition at line 4476 of file ops.cpp. 04477 { 04478 SelectDeselectAction* SelDeAct; 04479 ActionCode ActCode; 04480 // Attempt to initialise the action 04481 if ((ActCode = SelectDeselectAction::Init(pOperation, 04482 pOppositeActLst, 04483 node, 04484 Parent, 04485 ( Action**)(&SelDeAct))) != AC_FAIL) 04486 { 04487 // The action was successfully initialised 04488 ENSURE((node->IsKindOf(CC_RUNTIME_CLASS(NodeRenderableInk))), 04489 "Cannot select/deselect a non NodeRenderableInk node"); 04490 04491 if (node->IsSelected()) 04492 ((NodeRenderableInk*)node)->DeSelect(FALSE); // DeSelect 04493 else 04494 ((NodeRenderableInk*)node)->Select(FALSE); // Select 04495 } 04496 return (ActCode); 04497 }
|
|
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.
Size: The size of the action in bytes. This should be the total size of the action (including any objects pointed to by the action).
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 ShowNodeAction.
Definition at line 4544 of file ops.cpp. 04549 { 04550 ActionCode Ac = (Action::Init(pOp, 04551 pActionList, 04552 sizeof(SelectDeselectAction), 04553 CC_RUNTIME_CLASS(SelectDeselectAction), 04554 NewAction)); 04555 04556 if (Ac != AC_FAIL) 04557 if (*NewAction != NULL) 04558 { 04559 ((SelectDeselectAction*)(*NewAction))->node = SelDeNode; 04560 ((SelectDeselectAction*)(*NewAction))->Parent = pSpread; 04561 } 04562 04563 return (Ac); 04564 }
|
|
|
|
|