CombineBecomeA Class Reference

This is the class that is passed to other nodes when the combine op gets them to to turn into other types via their DoBecomeA() method. More...

#include <combshps.h>

Inheritance diagram for CombineBecomeA:

BecomeA List of all members.

Public Member Functions

 CombineBecomeA (BecomeAReason ThisReason, UndoableOperation *pOp, SelObjPathList *pThisSelObjPathList, Node *pThisSelNode, BOOL IsFirstNode=FALSE)
virtual BOOL PassBack (NodeRenderableInk *pNewNode, NodeRenderableInk *pCreatedByNode, CCAttrMap *pAttrMap)
 This is the func that receives the NodePaths generated by the selection. The constructor ensures that we have a list to add SelObjPathListItems to.
BOOL IsCombineBecomeA ()
void SetStrokeCreatedPassbackPath (BOOL newVal)

Private Member Functions

 CC_DECLARE_MEMDUMP (CombineBecomeA)

Private Attributes

SelObjPathListpSelObjPathList
BOOL strokeCreatedPassbackPath

Detailed Description

This is the class that is passed to other nodes when the combine op gets them to to turn into other types via their DoBecomeA() method.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/1/95

Definition at line 392 of file combshps.h.


Constructor & Destructor Documentation

CombineBecomeA::CombineBecomeA BecomeAReason  ThisReason,
UndoableOperation pOp,
SelObjPathList pThisSelObjPathList,
Node pThisSelNode,
BOOL  IsFirstNode = FALSE
[inline]
 

Definition at line 396 of file combshps.h.

00396                                                                                                                                                        :
00397                 BecomeA(ThisReason,CC_RUNTIME_CLASS(NodePath),pOp,TRUE,IsFirstNode), pSelObjPathList(pThisSelObjPathList)
00398                 { strokeCreatedPassbackPath = FALSE; }


Member Function Documentation

CombineBecomeA::CC_DECLARE_MEMDUMP CombineBecomeA   )  [private]
 

BOOL CombineBecomeA::IsCombineBecomeA  )  [inline, virtual]
 

Reimplemented from BecomeA.

Definition at line 403 of file combshps.h.

00403 { return TRUE; }

BOOL CombineBecomeA::PassBack NodeRenderableInk pNewNode,
NodeRenderableInk pCreatedByNode,
CCAttrMap pAttrMap
[virtual]
 

This is the func that receives the NodePaths generated by the selection. The constructor ensures that we have a list to add SelObjPathListItems to.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/1/95
Parameters:
pNewNode = ptr to new generated node (should be a NodePath) [INPUTS] pCreatedByNode = ptr to the node that generated this NodePath pAttrMap = ptr attr map (NULL means get attrs applied to pCreatedByNode)
- [OUTPUTS]
Returns:
-

Errors: -

See also:
CreateSelObjPathList()

Reimplemented from BecomeA.

Definition at line 2583 of file combshps.cpp.

02584 {
02585     // Do a quick param check
02586     ERROR2IF(pNewNode == NULL,FALSE,"pNewNode == NULL");
02587     ERROR2IF(pSelObjPathList == NULL,FALSE,"pSelObjPathList is NULL");
02588     ERROR2IF(!pNewNode->IsNodePath(),FALSE,"pNewNode not a kind of NodePath");
02589 
02590     // We've received a NodePath from a selected object, so make a sel obj path list item
02591     // out of it and add it to the list
02592 
02593     SelObjPathListItem* pSelObjPathListItem = new SelObjPathListItem((NodePath*)pNewNode,pCreatedByNode,pAttrMap, strokeCreatedPassbackPath);
02594 
02595     if (pSelObjPathListItem != NULL)
02596     {
02597         pSelObjPathList->AddTailItem(pSelObjPathListItem);
02598         return TRUE;
02599     }
02600     else
02601         return FALSE;
02602 
02603 /*
02604     *** code for splitting the new NodePath into separate subpaths ***
02605 
02606     // Get ptr to src path of new node
02607     Path* pSrcPath = &(((NodePath*)pNewNode)->InkPath);
02608 
02609     // We've received a NodePath from a selected object, so make sel obj path list items
02610     // for each of the sub paths contained within it
02611 
02612     Path DestPath;
02613     BOOL ok = DestPath.Initialise();
02614 
02615     INT32 StartIndex = 0;
02616 
02617     if (ok)
02618     {
02619         do
02620         {
02621             ok = OpCombineShapes::GetSubpath(*pSrcPath,&DestPath,&StartIndex);
02622             if (ok)
02623             {
02624                 NodePath* pNodePath = new NodePath;
02625 
02626                 ok = (pNodePath != NULL);
02627 
02628                 if (ok) ok = pNodePath->SetUpPath(DestPath.GetNumCoords());
02629                 if (ok) ok = pNodePath->InkPath.CopyPathDataFrom(&DestPath);
02630 
02631                 if (ok)
02632                 {
02633                     SelObjPathListItem* pSelObjPathListItem = new SelObjPathListItem(pNodePath,pCreatedByNode);
02634                     ok = (pSelObjPathListItem != NULL);
02635                     if (ok) pSelObjPathList->AddTailItem(pSelObjPathListItem);
02636                 }
02637 
02638                 if (!ok && pNodePath!=NULL)
02639                     delete pNodePath;
02640             }
02641 
02642         } while (ok && StartIndex >=0);
02643     }
02644 
02645     if (pNewNode != NULL)
02646         delete pNewNode;
02647 
02648     return ok;
02649 */
02650 }

void CombineBecomeA::SetStrokeCreatedPassbackPath BOOL  newVal  )  [inline]
 

Definition at line 409 of file combshps.h.

00409 { strokeCreatedPassbackPath = newVal; }


Member Data Documentation

SelObjPathList* CombineBecomeA::pSelObjPathList [private]
 

Definition at line 412 of file combshps.h.

BOOL CombineBecomeA::strokeCreatedPassbackPath [private]
 

Definition at line 414 of file combshps.h.


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