OpMakeNodesShapes Class Reference

This undoable operation converts a given list of nodes to editable shapes (paths), each new node retaining the selection status of the original. More...

#include <mkshapes.h>

Inheritance diagram for OpMakeNodesShapes:

UndoableOperation Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

virtual void DoWithParam (OpDescriptor *, OpParam *pParam)
 This undoable operation converts a given list of nodes to editable shapes (paths), each new node retaining the selection status of the original. See also: OpParamMakeNodesShapes.

Static Public Member Functions

static BOOL Init ()
 Initialise this operation.

Private Member Functions

 CC_DECLARE_DYNCREATE (OpMakeNodesShapes)

Detailed Description

This undoable operation converts a given list of nodes to editable shapes (paths), each new node retaining the selection status of the original.

Author:
Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/11/1999
TODO** NOTE that currently this Op does *NOT* call AllowOp(), which I believe is VERY naughty. This probably needs changing...

See also: OpParamMakeNodesShapes.

Definition at line 151 of file mkshapes.h.


Member Function Documentation

OpMakeNodesShapes::CC_DECLARE_DYNCREATE OpMakeNodesShapes   )  [private]
 

void OpMakeNodesShapes::DoWithParam OpDescriptor pOp,
OpParam pParam
[virtual]
 

This undoable operation converts a given list of nodes to editable shapes (paths), each new node retaining the selection status of the original. See also: OpParamMakeNodesShapes.

Author:
Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/11/1999
Parameters:
pOp unused pointer to an OpDescriptor. [INPUTS] pParam pointer to an OpParamMakeNodesShapes data information structure.
The list of nodes, passed in through the OpParam, is converted in place [OUTPUTS] into paths.

Reimplemented from Operation.

Definition at line 308 of file mkshapes.cpp.

00309 {
00310     std::list<Node*>* plpNodes = ((OpParamMakeNodesShapes*)pParam)->m_plpNodes;
00311 
00312     Node* pNode;
00313     BOOL bFirst = FALSE;
00314     BOOL ok = TRUE;
00315     for (   std::list<Node*>::iterator iterNode = plpNodes->begin();
00316             iterNode != plpNodes->end() && ok;
00317             iterNode++ )
00318     {
00319         pNode = *iterNode;
00320         BecomeA baInfo(BECOMEA_REPLACE, CC_RUNTIME_CLASS(NodePath), this,
00321                                             pNode->IsSelected(), bFirst);
00322         baInfo.SetResultsStayInPlace(TRUE);
00323         ok = pNode->DoBecomeA(&baInfo);
00324 
00325 #ifdef _DEBUG
00326         if (ok)
00327             TRACEUSER( "Karim", _T("converted %s to editable shapes\n"), pNode->Name());
00328 #endif
00329 
00330         bFirst = TRUE;
00331     }
00332 
00333     if (!ok)
00334     {
00335         InformError();
00336         FailAndExecute();
00337     }
00338 
00339     End();
00340     return;
00341 }

BOOL OpMakeNodesShapes::Init void   )  [static]
 

Initialise this operation.

Author:
Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/11/1999
Returns:
TRUE if successful, FALSE otherwise.

Reimplemented from SimpleCCObject.

Definition at line 356 of file mkshapes.cpp.

00357 {
00358     return (RegisterOpDescriptor(0,             // Tool ID
00359                 _R(IDS_MAKENODESSHAPES),            // string resource ID for Op description
00360                 CC_RUNTIME_CLASS(OpMakeNodesShapes),// Op's Runtime class
00361                 OPTOKEN_MAKE_NODES_SHAPES,      // Op's OPTOKEN string
00362                 NULL,                           // Op's GetState function
00363                 0,                              // associated Help system ID
00364                 _R(IDBBL_MAKENODESSHAPES),          // string resource ID for bubble help
00365                 0,                              // bitmap ("icon") or resource ID
00366                 0,                              // associated gadget control ID
00367                 SYSTEMBAR_ILLEGAL,              // associated info-bar ID
00368                 FALSE,                          // receive system messages
00369                 FALSE,                          // Op does smart attr optimisation
00370                 FALSE,                          // Op doesn't modify document
00371                 0,                              // when non-0, only one instance of the
00372                                                 // Op is permitted, and this is the ID
00373                                                 // of a string resource explaining why.
00374                 (DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC)
00375                 ));                             // flags indicating conditions when the Op
00376                                                 // should automatically be greyed/ticked etc.
00377 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:58:24 2007 for Camelot by  doxygen 1.4.4