NodeBevelBegin Class Reference

Denotes the beginning of a bevel. More...

#include <nodebev.h>

Inheritance diagram for NodeBevelBegin:

NodeRenderableBounded NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 NodeBevelBegin ()
 Constructor for the NodeBevelBegin class. Notes: This class is purely used to set up the bevel path processor which builds the bevel path.
 NodeBevelBegin (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 Constructor for the NodeBevelBegin class. Notes: This class is purely used to set up the bevel path processor which builds the bevel path.
void Render (RenderRegion *region)
 Pushes the bevel path processor onto the path processor stack of the given render region Notes:.
DocRect GetBoundingRect (BOOL DontUseAttrs, BOOL HitTest)
 Returns the bounding rect of the bevel controller node Notes:.
DocRect GetBlobBoundingRect ()
 Calculates the bounding rectangle of the nodes blobs.This should always be calculated on the fly as the view scale can change without the node knowing, giving an incorrect result.
virtual void RenderEorDrag (RenderRegion *rr)
virtual void RenderObjectBlobs (RenderRegion *pRender)
 This function is the base class version of a blob rendering function, so it actually does nothing. Object Blobs are the blobs that allow you to edit the shape of the node. For example, a path would display blobs on all its coords and a Rectangle may put a blob at each corner.
virtual void RenderTinyBlobs (RenderRegion *pRender)
 This function is the base class version of a blob rendering function, so it actually does nothing. Tiny blobs are displayed by each of the objects that is selected when in bounded region selection mode. Typically a Tiny Blob should be a single small blob.
virtual BOOL ExportRender (RenderRegion *pRegion)
 If pRenderRegion points to a FlashRenderRegion, the bevel will be processed as a bitmap filled shape, and stored as a pair of records (shape and bitmap) within the resulting Flash file.
virtual BOOL NeedsParent (Node *pNode) const
 Do we need a parent of the same class as the given node ??? See also: NodeCompound::OnChildChange.
void SetSelected (BOOL Status)
 To set Nodes selected status (TRUE/FALSE) This routine also deals with "select-inside" by making sure all the SelectedChildren flags are set appropriately. Note: Selecting a node prevents it from being a parent of selected nodes This routine therefore clears the selection of any children! Note2: Calling this routine clears any selection from children of this node and marks it to no longer be the parent of selected children. This is done because selected nodes can't have sel children and because unselecting a node implies that you thought it was selected in which case it shouldn't have selected children.
virtual SubtreeRenderState RenderSubtree (RenderRegion *pRender, Node **ppNextNode=NULL, BOOL bClip=TRUE)
 Is the top path processor a bevel path processor ? if so, I don't need to render myself See also: NodeBevelBegin::Render.

Public Attributes

DocRect m_Rect

Protected Member Functions

virtual NodeSimpleCopy ()
 Returns a copy of me.

Protected Attributes

DocRect m_RegionClipRect

Detailed Description

Denotes the beginning of a bevel.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/98
See also:
-

Definition at line 430 of file nodebev.h.


Constructor & Destructor Documentation

NodeBevelBegin::NodeBevelBegin  ) 
 

Constructor for the NodeBevelBegin class. Notes: This class is purely used to set up the bevel path processor which builds the bevel path.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/98
Parameters:
- [INPUTS]
Returns:

Definition at line 3948 of file nodebev.cpp.

03949 {
03950 }

NodeBevelBegin::NodeBevelBegin Node ContextNode,
AttachNodeDirection  Direction,
BOOL  Locked = FALSE,
BOOL  Mangled = FALSE,
BOOL  Marked = FALSE,
BOOL  Selected = FALSE
 

Constructor for the NodeBevelBegin class. Notes: This class is purely used to set up the bevel path processor which builds the bevel path.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/98
Parameters:
- [INPUTS]
Returns:

Definition at line 3970 of file nodebev.cpp.

03976             : NodeRenderableBounded(ContextNode, Direction, Locked, Mangled, Marked, Selected)
03977 {
03978     
03979 }


Member Function Documentation

BOOL NodeBevelBegin::ExportRender RenderRegion pRegion  )  [virtual]
 

If pRenderRegion points to a FlashRenderRegion, the bevel will be processed as a bitmap filled shape, and stored as a pair of records (shape and bitmap) within the resulting Flash file.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/12/99
Parameters:
pRegion - A pointer to a RenderRegion. [INPUTS]
- [OUTPUTS]
Returns:
TRUE if the RenderRegion is a FlashRenderRegion, otherwise FALSE.

Reimplemented from Node.

Definition at line 4150 of file nodebev.cpp.

04151 {
04152     BOOL bResult = FALSE;
04153 
04154 //  NodeBevelController * pController = (NodeBevelController *)FindParent();
04155 
04156     // Step 1:  Test whether the render region is a Flash one. If so, invoke it's custom
04157     //          export code.
04158     if ( pRegion->IsKindOf ( CC_RUNTIME_CLASS ( FlashRenderRegion ) ) )
04159     {
04160         // Step 1a: Cast the pRegion pointer to be a FlashRenderRegion pointer, so that
04161         //          it can access the custom Flash export methods.
04162         FlashRenderRegion *pFlash = ( FlashRenderRegion* ) pRegion;
04163 
04164         // Step 1b: Pass the character into the appropriate method to export the character.
04165         //          This is where all the hard work is done.
04166         bResult = pFlash->ExportBevelBegin ( this );
04167     }
04168     // Step 2:  Test whether the render region is a CMX one. If so, invoke it's custom
04169     //          export code.
04170 PORTNOTE("cmx", "Removed CMX Support")
04171 #ifndef EXCLUDE_FROM_XARALX
04172     else if ( pRegion->IsKindOf ( CC_RUNTIME_CLASS ( CMXRenderRegion ) ) )
04173     {
04174         // Step 2a: Cast the pRegion pointer to be a CMXRenderRegion pointer, so that
04175         //          it can access the custom CMX export methods.
04176         CMXRenderRegion *pCMX = ( CMXRenderRegion* ) pRegion;
04177 
04178         // Step 2b: Invoke the stub function within the CMX render region.
04179         bResult = pCMX->ExportBevelBegin ( this );
04180     }
04181 #endif
04182     // render bitmap stuff
04183     else
04184     {
04185         // ok, im intersecting so render
04186         Render(pRegion);
04187 
04188         return TRUE;
04189     }
04190 
04191     // Step 3:  The export has been done successfully. Return TRUE to prevent Camelot
04192     //          from rendering the character out as paths as well as text. (If there's
04193     //          been an error, bResult will have been set to FALSE.)
04194     return bResult;
04195 }

DocRect NodeBevelBegin::GetBlobBoundingRect  )  [virtual]
 

Calculates the bounding rectangle of the nodes blobs.This should always be calculated on the fly as the view scale can change without the node knowing, giving an incorrect result.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/01/94
Returns:
DocRect - The rectangle that contains all the nodes selection blobs.

Reimplemented from NodeRenderable.

Definition at line 4062 of file nodebev.cpp.

04063 {
04064     return GetBoundingRect(TRUE, FALSE);
04065 }

DocRect NodeBevelBegin::GetBoundingRect BOOL  DontUseAttrs,
BOOL  HitTest
[virtual]
 

Returns the bounding rect of the bevel controller node Notes:.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/98
Parameters:
- [INPUTS]
Returns:

Reimplemented from NodeRenderableBounded.

Definition at line 4031 of file nodebev.cpp.

04032 {
04033     // same as first sibling
04034     NodeBevelController* pBevelController = (NodeBevelController*)FindParent();
04035 
04036     if (pBevelController->GetInsideBoundingRect().IsEmpty())
04037         return DocRect(0,0,0,0);
04038 
04039     if (pBevelController)
04040     {
04041         NodeBevel* pBevel = pBevelController->GetBevelNode();
04042 
04043         if (pBevel)
04044         {
04045             BoundingRectangle = pBevel->GetBoundingRect(DontUseAttrs, HitTest);
04046             return BoundingRectangle;
04047         }
04048     }
04049     
04050     Node * pNode = this->FindNext(CC_RUNTIME_CLASS(NodeRenderableBounded));
04051     if (!pNode || pNode->IsKindOf(CC_RUNTIME_CLASS(NodeBevel)))
04052     {
04053         // ERROR3("NodeBevelBegin - Can't find renderable node !\n");
04054         return BoundingRectangle;
04055     }
04056 
04057     BoundingRectangle = ((NodeRenderableBounded *)pNode)->GetBoundingRect(DontUseAttrs, HitTest);
04058     return BoundingRectangle;
04059 }

BOOL NodeBevelBegin::NeedsParent Node pNode  )  const [virtual]
 

Do we need a parent of the same class as the given node ??? See also: NodeCompound::OnChildChange.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/5/99
Parameters:
A node to do the class checking on [INPUTS]
Returns:

Reimplemented from Node.

Definition at line 4099 of file nodebev.cpp.

04100 {
04101     if (!pNode || pNode->IsKindOf(CC_RUNTIME_CLASS(NodeBevelController)))
04102         return TRUE;
04103 
04104     return FALSE;
04105 }

void NodeBevelBegin::Render RenderRegion rr  )  [virtual]
 

Pushes the bevel path processor onto the path processor stack of the given render region Notes:.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/98
Parameters:
- [INPUTS]
Returns:

Reimplemented from Node.

Definition at line 3993 of file nodebev.cpp.

03994 {
03995     return;
03996     // is the ink path valid in the ink node ?
03997 /*  Node * pNode = FindNext(CC_RUNTIME_CLASS(NodeBevel));
03998 
03999     NodeBevelController * pControl = (NodeBevelController *)FindParent();
04000 
04001     if (!pControl)
04002         return;
04003 
04004     // no inside bounding rect ? no render !
04005     if (pControl->GetInsideBoundingRect().IsEmpty())
04006         return;
04007 
04008     if (pControl->IsPrinting())
04009     {
04010         // make sure we're intersected with the render regions clipping rectangle
04011         if (!(rr->GetClipRect().IsIntersectedWith(BoundingRectangle)))
04012             return ;
04013     }
04014 
04015     // push the contour path processor to do the extension of the node
04016     // only if we're an outer bevel
04017     BevelAttributeValueIndent * pBevelIndent = (BevelAttributeValueIndent *)
04018         rr->GetCurrentAttribute(ATTR_BEVELINDENT); */
04019 }

virtual void NodeBevelBegin::RenderEorDrag RenderRegion rr  )  [inline, virtual]
 

Definition at line 454 of file nodebev.h.

00454 { };

virtual void NodeBevelBegin::RenderObjectBlobs RenderRegion pRender  )  [inline, virtual]
 

This function is the base class version of a blob rendering function, so it actually does nothing. Object Blobs are the blobs that allow you to edit the shape of the node. For example, a path would display blobs on all its coords and a Rectangle may put a blob at each corner.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/94
Parameters:
pRender - The region to render the blobs into [INPUTS]
See also:
BlobManager

Reimplemented from NodeRenderable.

Definition at line 455 of file nodebev.h.

00455 { };

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

Is the top path processor a bevel path processor ? if so, I don't need to render myself See also: NodeBevelBegin::Render.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/5/99
Parameters:
A Render region [INPUTS]
Returns:

Reimplemented from NodeRenderableBounded.

Definition at line 4129 of file nodebev.cpp.

04130 {
04131     return SUBTREE_ROOTANDCHILDREN;
04132 }

virtual void NodeBevelBegin::RenderTinyBlobs RenderRegion pRender  )  [inline, virtual]
 

This function is the base class version of a blob rendering function, so it actually does nothing. Tiny blobs are displayed by each of the objects that is selected when in bounded region selection mode. Typically a Tiny Blob should be a single small blob.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/94
Parameters:
pRender - The region to render the blobs into [INPUTS]
See also:
BlobManager

Reimplemented from NodeRenderable.

Definition at line 456 of file nodebev.h.

00456 { } ;

void NodeBevelBegin::SetSelected BOOL  Status  )  [virtual]
 

To set Nodes selected status (TRUE/FALSE) This routine also deals with "select-inside" by making sure all the SelectedChildren flags are set appropriately. Note: Selecting a node prevents it from being a parent of selected nodes This routine therefore clears the selection of any children! Note2: Calling this routine clears any selection from children of this node and marks it to no longer be the parent of selected children. This is done because selected nodes can't have sel children and because unselecting a node implies that you thought it was selected in which case it shouldn't have selected children.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/4/93
Parameters:
Status,: Status of node's selected flag [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

Reimplemented from Node.

Definition at line 4109 of file nodebev.cpp.

04110 {
04111     Node::SetSelected(FALSE);
04112 }

Node * NodeBevelBegin::SimpleCopy void   )  [protected, virtual]
 

Returns a copy of me.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/98
Parameters:
- [INPUTS]
Returns:

Reimplemented from NodeRenderableBounded.

Definition at line 4077 of file nodebev.cpp.

04078 {
04079     NodeBevelBegin * pNewNode = new NodeBevelBegin;
04080 
04081     ERRORIF(pNewNode == NULL, _R(IDE_NOMORE_MEMORY), NULL);
04082 
04083     return pNewNode;
04084 }


Member Data Documentation

DocRect NodeBevelBegin::m_Rect
 

Definition at line 452 of file nodebev.h.

DocRect NodeBevelBegin::m_RegionClipRect [protected]
 

Definition at line 473 of file nodebev.h.


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