NodeMouldGroup Class Reference

defines the structure of a mould group object. This object lives inside a NodeMould and keeps track of all mould source objects. More...

#include <ndmldgrp.h>

Inheritance diagram for NodeMouldGroup:

NodeGroup NodeCompound NodeRenderableInk NodeRenderableBounded NodeRenderable Node CCObject SimpleCCObject List of all members.

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 NodeSimpleCopy ()
 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

Detailed Description

defines the structure of a mould group object. This object lives inside a NodeMould and keeps track of all mould source objects.

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

Definition at line 147 of file ndmldgrp.h.


Constructor & Destructor Documentation

NodeMouldGroup::NodeMouldGroup  ) 
 

This constructor creates a NodeMouldGroup linked to no other, with all status flags false and an uninitialised bounding rectangle.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/12/94
Parameters:
[INPUTS] 
[OUTPUTS] 
Returns:

Errors:

Definition at line 158 of file ndmldgrp.cpp.

00158                               : NodeGroup()
00159 {
00160 }

NodeMouldGroup::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.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/12/94
Parameters:
ContextNode,: Pointer to a node which this node is to be attached to. [INPUTS]
Direction:

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 ?

Parameters:
- [OUTPUTS]
Returns:
-

Errors: An assertion error will occur if ContextNode is NULL

Definition at line 207 of file ndmldgrp.cpp.

00213                 :NodeGroup(ContextNode, Direction, Locked, Mangled, Marked, 
00214                 Selected) 
00215 { 
00216 } 

NodeMouldGroup::~NodeMouldGroup  ) 
 

This destructor calls the parent class destructor.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/11/94
Parameters:
[INPUTS] 
[OUTPUTS] 
Returns:

Definition at line 232 of file ndmldgrp.cpp.

00233 {
00234 }


Member Function Documentation

NodeMouldGroup::CC_DECLARE_DYNAMIC NodeMouldGroup   )  [private]
 

virtual BOOL NodeMouldGroup::ChildrenAreEorDragRenderedByMe  )  [inline, virtual]
 

Reimplemented from NodeRenderableInk.

Definition at line 183 of file ndmldgrp.h.

00183 { return TRUE; }

void NodeMouldGroup::CopyNodeContents NodeMouldGroup pCopyOfNode  )  [private]
 

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.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/12/94
Parameters:
pCopyOfNode - The node to copy data to [INPUTS]
- [OUTPUTS]
Returns:
-
See also:
NodeGroup::CopyNodeContents

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 }

String NodeMouldGroup::Describe BOOL  Plural,
BOOL  Verbose
[virtual]
 

To return a description of the Mould object in either the singular or the plural. This method is called by the DescribeRange method.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/12/94
Parameters:
Plural,: Flag indicating if the string description should be plural or [INPUTS] singular.
- [OUTPUTS] Retuns: Description of the mould group node
The description will always begin with a lower case letter.

Returns:
Errors: -
See also:
-

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 }; 

BOOL NodeMouldGroup::ExportRender RenderRegion pRegion  )  [virtual]
 

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.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/03/95
Parameters:
pRegion = ptr to the export render region to export to [INPUTS]
[OUTPUTS] 
Returns:
TRUE if ok, FALSE if something went wrong

Errors:

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 }

virtual void NodeMouldGroup::Extend const ExtendParams ExtParams  )  [inline, virtual]
 

Perform an Extend operation on this Node, and its children if appropriate. Default implementation just calls Extend() on its children.

Author:
Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/11/1999
Parameters:
ExtParams description parameters for the extension. [INPUTS]
This node and some of its children may have their dimensions altered. [OUTPUTS]
Returns:

Errors: See also:

Reimplemented from Node.

Definition at line 216 of file ndmldgrp.h.

00216 {}

DocRect NodeMouldGroup::GetBlobBoundingRect  )  [virtual]
 

Returns a completely null rectangle.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/01/95
Returns:
DocRect - The bounding rect of the mould group and its blobs

Reimplemented from NodeGroup.

Definition at line 422 of file ndmldgrp.cpp.

00423 {
00424     DocRect Rect;
00425     return Rect;
00426 }

DocRect NodeMouldGroup::GetBoundingRect BOOL  DontUseAttrs = FALSE,
BOOL  HitTest = FALSE
[virtual]
 

Returns a completely null rectangle.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/01/95
Parameters:
DontUseAttrs - TRUE if you don't want to use the nodes attrs to calculate [INPUTS] the bounding rect (defaults will be used). Defaults to FALSE. HitTest - TRUE if being called during HitTest
Returns:
A 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 }

DocRect NodeMouldGroup::GetChildrensBounds BOOL  DontUseAttrs = FALSE  ) 
 

Returns the bounding rect of this object. For internal use only.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/01/95
Parameters:
DontUseAttrs - TRUE if you don't want to use the nodes attrs to calculate [INPUTS] the bounding rect (defaults will be used). Defaults to FALSE.
Returns:
A null rectangle

Definition at line 442 of file ndmldgrp.cpp.

00443 {
00444     return NodeRenderableBounded::GetBoundingRect(DontUseAttrs);
00445 }

virtual DocRect NodeMouldGroup::GetEorDragBoundingRect  )  [inline, virtual]
 

Gets the eor drag bounding rect for all my children.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/1/2000
Parameters:
None [INPUTS]
Returns:
The eor drag bounding rect for all of my children
See also:
-

Reimplemented from NodeGroup.

Definition at line 177 of file ndmldgrp.h.

00177 { return DocRect(0, 0, 0, 0); }

UINT32 NodeMouldGroup::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/12/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The size of the node in bytes
See also:
Node::GetSubtreeSize

Reimplemented from NodeGroup.

Definition at line 362 of file ndmldgrp.cpp.

00363 {     
00364     return (sizeof(NodeMouldGroup)); 
00365 }  

BOOL NodeMouldGroup::HidingNode  )  [virtual]
 

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.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/12/94
Parameters:
- [INPUTS]
- [OUTPUTS]

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 }

virtual BOOL NodeMouldGroup::IsTypeExtendible  )  const [inline, virtual]
 

Reimplemented from Node.

Definition at line 211 of file ndmldgrp.h.

00211 { return FALSE; }

virtual BOOL NodeMouldGroup::IsValidEffectAttr NodeAttribute pAttr  )  const [inline, virtual]
 

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.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/01/2005
Parameters:
Attribute [INPUTS]
Returns:
TRUE if the attr is a valid effect attr

Reimplemented from NodeGroup.

Definition at line 221 of file ndmldgrp.h.

00221 {return FALSE;}

BOOL NodeMouldGroup::NeedsToExport RenderRegion pRender,
BOOL  VisibleLayersOnly = FALSE,
BOOL  CheckSelected = FALSE
[virtual]
 

Virtual function - this version will return FALSE for exporting to ArtWorks or Camelot EPS render regions.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/03/95
Parameters:
pRender - A pointer to the current export region [INPUTS] VisibleLayersOnly - TRUE => remove nodes which are on invisible layers
  • FALSE => export everything CheckSelected - TRUE => we check if object selected and only export selected bjects
  • FALSE => we don't bother checking for selection or not
    Returns:
    TRUE => please export me.

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 }

ChangeCode NodeMouldGroup::OnChildChange ObjChangeParam pParam  )  [virtual]
 

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.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/06/95
Parameters:
pParam = pointer to a object change parameter class [INPUTS]
Returns:
CC_OK if we have successfully processed the change. CC_FAIL if we cannot handle this particular change and must prevent the child from continuing
See also:
WarnParentOfChange(),AllowOp();

Reimplemented from NodeGroup.

Definition at line 769 of file ndmldgrp.cpp.

00770 {
00771     return CC_OK;
00772 }

BOOL NodeMouldGroup::OnClick DocCoord  PointerPos,
ClickType  Click,
ClickModifiers  ClickMods,
Spread pSpread
[virtual]
 

Does nothing at the moment - Just returns FALSE.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/12/94
Parameters:
PointerPos - The Location of the mouse pointer at the time of the click [INPUTS] Click - The type of click received (single, double, drag etc) ClickMods - The modifiers to the click (eg shift, control etc )
Returns:
TRUE - if the node claims the click as its own FALSE - if it is not interested in the click

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 }

void NodeMouldGroup::PolyCopyNodeContents NodeRenderable pNodeCopy  )  [virtual]
 

Polymorphically copies the contents of this node to another.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/12/2003
Parameters:
- [OUTPUTS]
Returns:
Errors: An assertion failure will occur if NodeCopy is NULL Scope: protected

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 }

BOOL NodeMouldGroup::PostExportAWEPS RenderRegion pRegion  )  [private]
 

Definition at line 744 of file ndmldgrp.cpp.

00745 {
00746     return TRUE;
00747 }

BOOL NodeMouldGroup::PostExportNATEPS RenderRegion pRegion  )  [private]
 

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::PreExportAWEPS RenderRegion pRegion  )  [private]
 

void NodeMouldGroup::Pre/Post ExportAWEPS(RenderRegion* pRegion)

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/03/95

Definition at line 740 of file ndmldgrp.cpp.

00741 {
00742 }

void NodeMouldGroup::PreExportNATEPS RenderRegion pRegion  )  [private]
 

Export delimiter tokens for this particular object. The format is defined as csmp path description cemp.

BOOL NodeMouldGroup::Pre/Post ExportNATEPS(RenderRegion* pRegion)

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/03/95

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 }

void NodeMouldGroup::PreExportRender RenderRegion pRegion  )  [virtual]
 

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.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/03/95
Parameters:
pRegion = ptr to the export render region to export to [INPUTS]
[OUTPUTS] 
Returns:

Errors:

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 }

virtual void NodeMouldGroup::RenderEorDrag RenderRegion pRender  )  [inline, virtual]
 

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.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/10/93
Parameters:
pRender - A pointer to a render region to draw in [INPUTS]

Reimplemented from NodeRenderableInk.

Definition at line 172 of file ndmldgrp.h.

00172 {}

virtual void NodeMouldGroup::RenderEorDragChildren RenderRegion pRender  )  [inline, virtual]
 

Recursively calls RenderEorDrag for all children of this node, ignoring nodes which have ChildrenAreEorDragRenderedByMe() returning TRUE.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/1/2000
Parameters:
pRender - Render region to use [INPUTS]
See also:
NodeRenderableInk::RenderEorDrag, NodeRenderableInk::ChildrenAreEorDragRenderedByMe

Reimplemented from NodeRenderableInk.

Definition at line 173 of file ndmldgrp.h.

00173 {}

SubtreeRenderState NodeMouldGroup::RenderSubtree RenderRegion pRender,
Node **  ppNextNode = NULL,
BOOL  bClip = TRUE
[virtual]
 

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.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/01/95
Parameters:
pRender - A pointer to the current render region (null if none) [INPUTS]
Returns:
TRUE => This node should be rendered, FALSE => This node does not need to be rendered.
See also:
Node::NeedsToRender

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 }

BOOL NodeMouldGroup::ShouldBeRendered  )  const [virtual]
 

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.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
03/07/95
Returns:
FALSE => this node should not be rendered.
See also:
Node::ShouldBeRendered

Reimplemented from NodeRenderable.

Definition at line 383 of file ndmldgrp.cpp.

00384 {
00385     // Don't render the un-moulded objects!
00386     return FALSE;
00387 }

BOOL NodeMouldGroup::ShowingNode  )  [virtual]
 

Called whenever the node gets shown after it's been hidden.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/12/94
Parameters:
- [INPUTS]
- [OUTPUTS]

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 }

Node * NodeMouldGroup::SimpleCopy void   )  [virtual]
 

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.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/12/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
A copy of the node, or NULL if memory has run out

Errors: If memory runs out when trying to copy, then ERROR is called with an out of memory error and the function returns NULL.

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 }   

void NodeMouldGroup::Transform TransformBase Trans  )  [virtual]
 

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.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/01/95
Parameters:
Trans - A transformation object [INPUTS]

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 }

virtual DocRect NodeMouldGroup::ValidateExtend const ExtendParams ExtParams  )  [inline, virtual]
 

Tests the reversibility of an Extend operation applied to this node.

Author:
Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/11/1999
Parameters:
ExtParams description parameters for the extension. [INPUTS]
[OUTPUTS] 
Returns:
TRUE if extending this Node would be a valid operation, ie by passing appropriate inverse extend parameters, the Node could be un-extended back to its original state. FALSE if the operation would be irreversible.
Note that where appropriate, this function asks the Node's children if they may validly extend, only returning TRUE if the extension is completely ok with everyone.

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).

Returns:
Errors: See also: Node::IsTypeExtendible(), Node::Extend().

Reimplemented from Node.

Definition at line 212 of file ndmldgrp.h.

00213         {
00214             return DocRect(INT32_MAX, INT32_MAX, INT32_MAX, INT32_MAX);
00215         }

BOOL NodeMouldGroup::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from NodeGroup.

Definition at line 827 of file ndmldgrp.cpp.

00828 {
00829     return WritePreChildrenWeb(pFilter);
00830 }

BOOL NodeMouldGroup::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes out a records associated with this node.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/7/96
Parameters:
pFilter = ptr to the filter to write to [INPUTS]
Returns:
TRUE is a record has been written, FALSE otherwise
It either writes out an envelope or perspective record, depending on the geometry.

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 }


Member Data Documentation

String_32 NodeMouldGroup::MouldGroupName [private]
 

Definition at line 233 of file ndmldgrp.h.


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