#include <ndmldgrp.h>
Inheritance diagram for NodeMouldGroup:
Public Member Functions | |
NodeMouldGroup () | |
This constructor creates a NodeMouldGroup linked to no other, with all status flags false and an uninitialised bounding rectangle. | |
NodeMouldGroup (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
This method initialises the node and links it to ContextNode in the direction specified by Direction. All necessary tree links are updated. | |
~NodeMouldGroup () | |
This destructor calls the parent class destructor. | |
virtual void | PreExportRender (RenderRegion *pRender) |
Called before this node or any of its children have been rendered to the export region. This outputs the "start mould source objects" command. Supports ArtWorks EPS and Camelot EPS. | |
virtual BOOL | ExportRender (RenderRegion *pRender) |
Called after this node and all of its children have been rendered to the export region. This outputs the "end mould source objs" command. Supports ArtWorks EPS and Camelot EPS. | |
virtual SubtreeRenderState | RenderSubtree (RenderRegion *pRender, Node **ppNextNode=NULL, BOOL bClip=TRUE) |
Virtual function - this function will indicate to the caller whether or not we want to render the given node, according to the information passed in. | |
virtual BOOL | NeedsToExport (RenderRegion *pRender, BOOL VisibleLayersOnly=FALSE, BOOL CheckSelected=FALSE) |
Virtual function - this version will return FALSE for exporting to ArtWorks or Camelot EPS render regions. | |
virtual void | RenderEorDrag (RenderRegion *pRender) |
Each class derived from NodeRenderableInk should write a version of this member function. In most cases it will be the same as the Render() member function but some of the nodes (such as groups) need to perform special actions. The function is for drawing the object while it is being dragged about by the selector tool. It should do this with an effective wysiwyg level of 0 so that the drawing is fast. | |
virtual void | RenderEorDragChildren (RenderRegion *pRender) |
Recursively calls RenderEorDrag for all children of this node, ignoring nodes which have ChildrenAreEorDragRenderedByMe() returning TRUE. | |
virtual DocRect | GetEorDragBoundingRect () |
Gets the eor drag bounding rect for all my children. | |
virtual DocRect | GetBoundingRect (BOOL DontUseAttrs=FALSE, BOOL HitTest=FALSE) |
Returns a completely null rectangle. | |
virtual DocRect | GetBlobBoundingRect () |
Returns a completely null rectangle. | |
DocRect | GetChildrensBounds (BOOL DontUseAttrs=FALSE) |
Returns the bounding rect of this object. For internal use only. | |
virtual void | Transform (TransformBase &) |
Will allow certain transformations through to the original objects. So INT32 as the mould shape and source bbox are updated in the parent above us then all will be well. | |
virtual BOOL | ChildrenAreEorDragRenderedByMe () |
virtual String | Describe (BOOL Plural, BOOL Verbose) |
To return a description of the Mould object in either the singular or the plural. This method is called by the DescribeRange method. | |
virtual Node * | SimpleCopy () |
This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes. | |
virtual UINT32 | GetNodeSize () const |
For finding the size of the node. | |
virtual BOOL | ShouldBeRendered () const |
Indicate to the caller that this node should never be rendered. This is mainly used during printing where due to complications to do with banding and transparency, we cannot use NeedsToRender() to filter out such nodes, so we use this function instead. | |
virtual BOOL | OnClick (DocCoord, ClickType, ClickModifiers, Spread *) |
Does nothing at the moment - Just returns FALSE. | |
virtual BOOL | HidingNode () |
Called whenever the node gets hidden. The function will call all base class derivations of this object and then all children connected to this object in the tree. | |
virtual BOOL | ShowingNode () |
Called whenever the node gets shown after it's been hidden. | |
virtual ChangeCode | OnChildChange (ObjChangeParam *pParam) |
This function should be overridden in derived object classes. Composite objects can use this function to respond to one of their children undergoing a change. They should return CC_FAIL whenever they are unable to cope with the change. | |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *pFilter) |
Writes out a records associated with this node. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
virtual BOOL | IsTypeExtendible () const |
virtual DocRect | ValidateExtend (const ExtendParams &ExtParams) |
Tests the reversibility of an Extend operation applied to this node. | |
virtual void | Extend (const ExtendParams &ExtParams) |
Perform an Extend operation on this Node, and its children if appropriate. Default implementation just calls Extend() on its children. | |
virtual void | PolyCopyNodeContents (NodeRenderable *pNodeCopy) |
Polymorphically copies the contents of this node to another. | |
virtual BOOL | IsValidEffectAttr (NodeAttribute *pAttr) const |
Get width of pixels for use in capturing this group as a tight group bitmapDetermine whether this type of attribute can be an effect attribute On this node at this time.Determine whether this attribute instance can be an effect attribute On this node at this time. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (NodeMouldGroup) | |
void | CopyNodeContents (NodeMouldGroup *pCopyOfNode) |
Copies the data from this node to pCopyOfNode by first calling the base class to get it to copy its stuff, and then copying its own stuff Scope: protected. | |
void | PreExportNATEPS (RenderRegion *pRegion) |
Export delimiter tokens for this particular object. The format is defined as csmp path description cemp. | |
BOOL | PostExportNATEPS (RenderRegion *pRegion) |
void | PreExportAWEPS (RenderRegion *pRegion) |
BOOL | PostExportAWEPS (RenderRegion *pRegion) |
Private Attributes | |
String_32 | MouldGroupName |
Definition at line 147 of file ndmldgrp.h.
|
This constructor creates a NodeMouldGroup linked to no other, with all status flags false and an uninitialised bounding rectangle.
Definition at line 158 of file ndmldgrp.cpp. 00158 : NodeGroup() 00159 { 00160 }
|
|
This method initialises the node and links it to ContextNode in the direction specified by Direction. All necessary tree links are updated.
Specifies the direction in which this node is to be attached to the ContextNode. The values this variable can take are as follows: PREV : Attach node as a previous sibling of the context node NEXT : Attach node as a next sibling of the context node FIRSTCHILD: Attach node as the first child of the context node LASTCHILD : Attach node as a last child of the context node The remaining inputs specify the status of the node: Locked: Is node locked ? Mangled: Is node mangled ? Marked: Is node marked ? Selected: Is node selected ?
Definition at line 207 of file ndmldgrp.cpp. 00213 :NodeGroup(ContextNode, Direction, Locked, Mangled, Marked, 00214 Selected) 00215 { 00216 }
|
|
This destructor calls the parent class destructor.
Definition at line 232 of file ndmldgrp.cpp.
|
|
|
|
Reimplemented from NodeRenderableInk. Definition at line 183 of file ndmldgrp.h. 00183 { return TRUE; }
|
|
Copies the data from this node to pCopyOfNode by first calling the base class to get it to copy its stuff, and then copying its own stuff Scope: protected.
Definition at line 312 of file ndmldgrp.cpp. 00313 { 00314 ERROR3IF(pCopyOfNode==NULL,"NodeMouldGroup::CopyNodeContents() passed a null node"); 00315 if (pCopyOfNode==NULL) 00316 return; 00317 00318 // just call the parent copy function for the mo. 00319 NodeGroup::CopyNodeContents(pCopyOfNode); 00320 }
|
|
To return a description of the Mould object in either the singular or the plural. This method is called by the DescribeRange method.
Reimplemented from NodeGroup. Definition at line 258 of file ndmldgrp.cpp. 00259 { 00260 if (Plural) 00261 return(String(_R(IDS_MOULDGROUP_DESCRP))); 00262 else 00263 return(String(_R(IDS_MOULDGROUP_DESCRS))); 00264 };
|
|
Called after this node and all of its children have been rendered to the export region. This outputs the "end mould source objs" command. Supports ArtWorks EPS and Camelot EPS.
Reimplemented from NodeGroup. Definition at line 683 of file ndmldgrp.cpp. 00684 { 00685 #if !defined(EXCLUDE_FROM_RALPH) 00686 if (pRegion->IS_KIND_OF(NativeRenderRegion)) 00687 return PostExportNATEPS(pRegion); 00688 00689 if (pRegion->IS_KIND_OF(ArtWorksEPSRenderRegion)) 00690 return PostExportAWEPS(pRegion); 00691 #endif 00692 return FALSE; 00693 }
|
|
Perform an Extend operation on this Node, and its children if appropriate. Default implementation just calls Extend() on its children.
Reimplemented from Node. Definition at line 216 of file ndmldgrp.h.
|
|
Returns a completely null rectangle.
Reimplemented from NodeGroup. Definition at line 422 of file ndmldgrp.cpp.
|
|
Returns a completely null rectangle.
Reimplemented from NodeGroup. Definition at line 404 of file ndmldgrp.cpp. 00405 { 00406 // a rect to put the new version of the bounding rect into 00407 DocRect Rect; 00408 return Rect; 00409 }
|
|
Returns the bounding rect of this object. For internal use only.
Definition at line 442 of file ndmldgrp.cpp. 00443 { 00444 return NodeRenderableBounded::GetBoundingRect(DontUseAttrs); 00445 }
|
|
Gets the eor drag bounding rect for all my children.
Reimplemented from NodeGroup. Definition at line 177 of file ndmldgrp.h. 00177 { return DocRect(0, 0, 0, 0); }
|
|
For finding the size of the node.
Reimplemented from NodeGroup. Definition at line 362 of file ndmldgrp.cpp. 00363 { 00364 return (sizeof(NodeMouldGroup)); 00365 }
|
|
Called whenever the node gets hidden. The function will call all base class derivations of this object and then all children connected to this object in the tree.
Reimplemented from Node. Definition at line 488 of file ndmldgrp.cpp. 00489 { 00490 // Call the base class first 00491 if (!NodeGroup::HidingNode()) 00492 return FALSE; 00493 00494 BOOL ok = TRUE; 00495 /* 00496 Node* pNode = FindFirstChild(); 00497 while (pNode != NULL && ok) 00498 { 00499 // send the hiding node message on to our children 00500 ok = pNode->HidingNode(); 00501 pNode = pNode->FindNext(); 00502 } 00503 */ 00504 return ok; 00505 }
|
|
Reimplemented from Node. Definition at line 211 of file ndmldgrp.h. 00211 { return FALSE; }
|
|
Get width of pixels for use in capturing this group as a tight group bitmapDetermine whether this type of attribute can be an effect attribute On this node at this time.Determine whether this attribute instance can be an effect attribute On this node at this time.
Reimplemented from NodeGroup. Definition at line 221 of file ndmldgrp.h. 00221 {return FALSE;}
|
|
Virtual function - this version will return FALSE for exporting to ArtWorks or Camelot EPS render regions.
Reimplemented from NodeRenderable. Definition at line 620 of file ndmldgrp.cpp. 00621 { 00622 if (pRender==NULL) 00623 return TRUE; 00624 00625 #if !defined(EXCLUDE_FROM_RALPH) 00626 // only export to native documents! 00627 if (pRender->GetRuntimeClass() == CC_RUNTIME_CLASS(NativeRenderRegion)) 00628 return TRUE; 00629 #endif 00630 return FALSE; 00631 }
|
|
This function should be overridden in derived object classes. Composite objects can use this function to respond to one of their children undergoing a change. They should return CC_FAIL whenever they are unable to cope with the change.
Reimplemented from NodeGroup. Definition at line 769 of file ndmldgrp.cpp. 00770 { 00771 return CC_OK; 00772 }
|
|
Does nothing at the moment - Just returns FALSE.
Reimplemented from NodeGroup. Definition at line 466 of file ndmldgrp.cpp. 00468 { 00469 // we did not use the click, so let someone else try 00470 return FALSE; 00471 }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from NodeGroup. Definition at line 336 of file ndmldgrp.cpp. 00337 { 00338 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 00339 ENSURE(IS_A(pNodeCopy, NodeMouldGroup), "PolyCopyNodeContents given wrong dest node type"); 00340 00341 if (IS_A(pNodeCopy, NodeMouldGroup)) 00342 CopyNodeContents((NodeMouldGroup*)pNodeCopy); 00343 }
|
|
Definition at line 744 of file ndmldgrp.cpp. 00745 { 00746 return TRUE; 00747 }
|
|
Definition at line 720 of file ndmldgrp.cpp. 00721 { 00722 #if !defined(EXCLUDE_FROM_RALPH) 00723 EPSExportDC *pDC = (EPSExportDC *) pRegion->GetRenderDC(); 00724 pDC->OutputToken(_T("ceso")); // Camelot "end mould source" token 00725 pDC->OutputNewLine(); 00726 #endif 00727 return TRUE; 00728 }
|
|
void NodeMouldGroup::Pre/Post ExportAWEPS(RenderRegion* pRegion)
Definition at line 740 of file ndmldgrp.cpp.
|
|
Export delimiter tokens for this particular object. The format is defined as csmp path description cemp. BOOL NodeMouldGroup::Pre/Post ExportNATEPS(RenderRegion* pRegion)
Definition at line 710 of file ndmldgrp.cpp. 00711 { 00712 #if !defined(EXCLUDE_FROM_RALPH) 00713 EPSExportDC *pDC = (EPSExportDC *) pRegion->GetRenderDC(); 00714 pDC->OutputToken(_T("csso")); // Camelot "start mould source" token 00715 pDC->OutputNewLine(); 00716 #endif 00717 }
|
|
Called before this node or any of its children have been rendered to the export region. This outputs the "start mould source objects" command. Supports ArtWorks EPS and Camelot EPS.
Reimplemented from NodeGroup. Definition at line 650 of file ndmldgrp.cpp. 00651 { 00652 #if !defined(EXCLUDE_FROM_RALPH) 00653 if (pRegion->IS_KIND_OF(NativeRenderRegion)) 00654 { 00655 PreExportNATEPS(pRegion); 00656 return; 00657 } 00658 00659 if (pRegion->IS_KIND_OF(ArtWorksEPSRenderRegion)) 00660 { 00661 PreExportAWEPS(pRegion); 00662 return; 00663 } 00664 #endif 00665 }
|
|
Each class derived from NodeRenderableInk should write a version of this member function. In most cases it will be the same as the Render() member function but some of the nodes (such as groups) need to perform special actions. The function is for drawing the object while it is being dragged about by the selector tool. It should do this with an effective wysiwyg level of 0 so that the drawing is fast.
Reimplemented from NodeRenderableInk. Definition at line 172 of file ndmldgrp.h.
|
|
Recursively calls RenderEorDrag for all children of this node, ignoring nodes which have ChildrenAreEorDragRenderedByMe() returning TRUE.
Reimplemented from NodeRenderableInk. Definition at line 173 of file ndmldgrp.h.
|
|
Virtual function - this function will indicate to the caller whether or not we want to render the given node, according to the information passed in.
Reimplemented from NodeGroup. Definition at line 556 of file ndmldgrp.cpp. 00557 { 00558 if (pRender && pRender->RenderPaperAsInk()) 00559 return SUBTREE_ROOTANDCHILDREN; 00560 00561 return SUBTREE_NORENDER; 00562 }
|
|
Indicate to the caller that this node should never be rendered. This is mainly used during printing where due to complications to do with banding and transparency, we cannot use NeedsToRender() to filter out such nodes, so we use this function instead.
Reimplemented from NodeRenderable. Definition at line 383 of file ndmldgrp.cpp. 00384 { 00385 // Don't render the un-moulded objects! 00386 return FALSE; 00387 }
|
|
Called whenever the node gets shown after it's been hidden.
Reimplemented from Node. Definition at line 520 of file ndmldgrp.cpp. 00521 { 00522 // Call the base class first 00523 if (!NodeGroup::ShowingNode()) 00524 return FALSE; 00525 00526 // and then all the child objects 00527 BOOL ok = TRUE; 00528 00529 /* 00530 Node* pNode = FindFirstChild(); 00531 while (pNode != NULL && ok) 00532 { 00533 ok = pNode->ShowingNode(); 00534 pNode = pNode->FindNext(); 00535 } 00536 */ 00537 return ok; 00538 }
|
|
This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes.
Reimplemented from NodeGroup. Definition at line 287 of file ndmldgrp.cpp. 00288 { 00289 NodeMouldGroup* pCopyOfNode = new NodeMouldGroup(); 00290 ERROR1IF(pCopyOfNode == NULL,NULL,_R(IDE_NOMORE_MEMORY)); 00291 CopyNodeContents(pCopyOfNode); 00292 return (pCopyOfNode); 00293 }
|
|
Will allow certain transformations through to the original objects. So INT32 as the mould shape and source bbox are updated in the parent above us then all will be well.
Reimplemented from NodeGroup. Definition at line 578 of file ndmldgrp.cpp. 00579 { 00580 // there are only two types of transform that dont alter the 00581 // relationship of the bounding box with respect to its objects. 00582 // These are the only ones I can allow through otherwise the 00583 // mould will shear. 00584 // Unfortunately Scales don't seem to work too well either 00585 // so we're gonna have to put up with simple translations only 00586 // ok I've commented this lot out for now until someone complains 00587 // about it... Moving the source objects about is a bit of a pain 00588 // as during undo the final position of the object is weird. 00589 // (See bug 4630 for instance) 00590 00591 if (IS_A(&Trans, Trans2DMatrix)) 00592 { 00593 Trans2DMatrix* t = (Trans2DMatrix*)(&Trans); 00594 Matrix m = t->GetMatrix(); 00595 00596 if (m.IsTranslation()) 00597 NodeRenderableInk::TransformChildren(Trans); 00598 } 00599 }
|
|
Tests the reversibility of an Extend operation applied to this node.
Also note that if a node is of a non-extending type, it should normally consider itself a 'valid extender', as doing nothing is completely reversible (it should of course still check its children).
Reimplemented from Node. Definition at line 212 of file ndmldgrp.h.
|
|
Reimplemented from NodeGroup. Definition at line 827 of file ndmldgrp.cpp. 00828 { 00829 return WritePreChildrenWeb(pFilter); 00830 }
|
|
Writes out a records associated with this node.
The only piece of data that needs to be saved out with a node mould is the error threshold. Reimplemented from NodeGroup. Definition at line 791 of file ndmldgrp.cpp. 00792 { 00793 ERROR2IF(pFilter == NULL,FALSE,"NULL filter param"); 00794 00795 // WEBSTER - markn 10/2/97 00796 // Mould bounds record 00797 00798 BOOL ok = TRUE; 00799 00800 // Add a description of the TAG_MOULD_BOUNDS record, for older importers that don't understand this record 00801 pFilter->AddTagDescription(TAG_MOULD_BOUNDS,_R(IDS_TAG_MOULD_BOUNDS)); 00802 00803 // Write out the bounds record 00804 DocRect Rect = GetChildrensBounds(FALSE); 00805 00806 CamelotFileRecord BoundsRec(pFilter,TAG_MOULD_BOUNDS,TAG_MOULD_BOUNDS_SIZE); 00807 00808 ok = BoundsRec.Init(); 00809 00810 if (ok) ok = BoundsRec.WriteCoord(Rect.lo); 00811 if (ok) ok = BoundsRec.WriteCoord(Rect.hi); 00812 if (ok) ok = pFilter->Write(&BoundsRec); 00813 00814 // Write out the actual mould group record 00815 CXaraFileRecord Rec(TAG_MOULD_GROUP,TAG_MOULD_GROUP_SIZE); 00816 00817 if (ok) ok = pFilter->Write(&Rec); 00818 00819 if (!ok) 00820 pFilter->GotError(_R(IDE_FILE_WRITE_ERROR)); 00821 00822 return ok; 00823 }
|
|
Definition at line 233 of file ndmldgrp.h. |