AttrBevelType Class Reference

Bevel indent attribute. More...

#include <attrbev.h>

Inheritance diagram for AttrBevelType:

AttrBevel NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrBevelType ()
 Default constructor for Line Width Attribute class.
 AttrBevelType (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 Creates a bValue Attribute.
void Render (RenderRegion *pRender)
 'Renders' a Line Width attribute.
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 INT32 operator== (const NodeAttribute &NodeAttrib)
 A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
virtual UINT32 GetAttrNameID (void)
 Returns back a string resource ID describing the attribute.
virtual CCRuntimeClassGetAttributeType ()
virtual AttributeValueGetAttributeValue ()
virtual AttrIndex GetAttributeIndex ()
void ShowDebugTreeDetails () const
 Displays debugging info of the tree.
void GetDebugDetails (StringBase *Str)
 For obtaining debug information about the Node.
virtual UINT32 GetNodeSize () const
 For finding the size of the node.
virtual void Transform (TransformBase &)
 Scale the Line Width.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes the line width record to the filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)
void SetValue (INT32 NewValue)
virtual BOOL Blend (BlendAttrParam *pBlendParam)
 Blends this light angle to another.
virtual BOOL EffectsParentBounds ()
 Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads.
DocRect GetAttrBoundingRect (NodeRenderableInk *pParent=NULL, CCAttrMap *pAttribMap=NULL)
 Gets the bounding rect of this attribute.
virtual BOOL CanBecomeA (BecomeA *pBecomeA)
 Informs whether this node can be changed into another node or not.
virtual BOOL DoBecomeA (BecomeA *pBecomeA)
 Changes this node into something else, maybe even altering the original node.
virtual void PolyCopyNodeContents (NodeRenderable *pNodeCopy)
 Polymorphically copies the contents of this node to another.

Public Attributes

BevelAttributeValueType Value

Private Member Functions

void CopyNodeContents (AttrBevelType *NodeCopy)
 This method copies the node's contents to the node pointed to by NodeCopy.

Detailed Description

Bevel indent attribute.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/11/98

Definition at line 482 of file attrbev.h.


Constructor & Destructor Documentation

AttrBevelType::AttrBevelType  ) 
 

Default constructor for Line Width Attribute class.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 1248 of file attrbev.cpp.

01249 {
01250 }

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

Creates a bValue Attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 1223 of file attrbev.cpp.

01229              : AttrBevel(ContextNode, Direction, Locked, Mangled, Marked, Selected)  
01230 {                         
01231 } 


Member Function Documentation

BOOL AttrBevelType::Blend BlendAttrParam pBlendParam  )  [virtual]
 

Blends this light angle to another.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/12/99
Parameters:
The blend attribute param [INPUTS]
See also:

Reimplemented from NodeAttribute.

Definition at line 1519 of file attrbev.cpp.

01520 {
01521     ERROR2IF(pBlendParam == NULL,FALSE,"pBlendParam == NULL");
01522     ERROR3IF(!(pBlendParam->GetOtherAttr()->IS_KIND_OF(AttrBevelType)),
01523         "Blend attribute isn't a bevel type attribute");
01524 
01525     AttrBevelType * pBlendedAttr = NULL;
01526 
01527     // assign the other attribute we're looking at
01528     AttrBevelType * pOtherAttr = (AttrBevelType *)pBlendParam->GetOtherAttr();
01529 
01530     // split at the half way mark
01531     if (pBlendParam->GetBlendRatio() <= 0.5)
01532     {
01533         pBlendedAttr = (AttrBevelType *)SimpleCopy();
01534     }
01535     else
01536     {
01537         pBlendedAttr = (AttrBevelType *)pOtherAttr->SimpleCopy();
01538     }
01539 
01540     if (!pBlendedAttr)
01541         return FALSE;
01542 
01543     // set the blended attribute
01544     pBlendParam->SetBlendedAttr(pBlendedAttr);
01545 
01546     return TRUE;
01547 }

BOOL AttrBevelType::CanBecomeA BecomeA pBecomeA  )  [virtual]
 

Informs whether this node can be changed into another node or not.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/12/99
Parameters:
pClass - the class to convert this to [INPUTS] pNumObjects - returns the number of objects this is converted into
Returns:
TRUE if we can do the change, FALSE if otherwise
See also:
-

Reimplemented from Node.

Definition at line 1562 of file attrbev.cpp.

01563 {
01564     if (!Value.m_bPassback)
01565         return FALSE;
01566 
01567     if (pBecomeA->BAPath())
01568     {
01569         pBecomeA->AddCount(1);
01570         return TRUE;
01571     }
01572 
01573     return FALSE;
01574 }

void AttrBevelType::CopyNodeContents AttrBevelType NodeCopy  )  [private]
 

This method copies the node's contents to the node pointed to by NodeCopy.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/4/93
Parameters:
[INPUTS] 
A copy of this node [OUTPUTS]
Returns:
-

Errors: An assertion failure will occur if NodeCopy is NULL

Scope: protected

Definition at line 1392 of file attrbev.cpp.

01393 {
01394     NodeAttribute::CopyNodeContents( NodeCopy );
01395 
01396     NodeCopy->Value.SimpleCopy(&Value);
01397 } 

BOOL AttrBevelType::DoBecomeA BecomeA pBecomeA  )  [virtual]
 

Changes this node into something else, maybe even altering the original node.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/12/99
Parameters:
pBecomeA - The become A structure to use [INPUTS]
Returns:
TRUE if we can do the change, FALSE if otherwise
See also:
-

Reimplemented from Node.

Definition at line 1589 of file attrbev.cpp.

01590 {
01591     return TRUE;
01592 }

virtual BOOL AttrBevelType::EffectsParentBounds  )  [inline, virtual]
 

Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/4/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if the node will effect the bounds of it's parent.
See also:
NodeAttribute::GetAttrBoundingRect

Reimplemented from NodeAttribute.

Definition at line 522 of file attrbev.h.

00522 { return Value.m_bPassback; }

DocRect AttrBevelType::GetAttrBoundingRect NodeRenderableInk pParent = NULL,
CCAttrMap pAttribMap = NULL
[virtual]
 

Gets the bounding rect of this attribute.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/12/99

Reimplemented from NodeAttribute.

Definition at line 1469 of file attrbev.cpp.

01470 {
01471     if (!pParent)
01472         return DocRect(0,0,0,0);
01473     
01474     if (!Value.m_bPassback)
01475         return pParent->GetBoundingRect(TRUE, FALSE);
01476 
01477     DocRect dr = pParent->GetBoundingRect(TRUE, FALSE);
01478 
01479     if (Value.GetIndent() < 0)
01480     {
01481         dr.Inflate(-Value.GetIndent());
01482     }
01483 
01484     return dr;
01485 }

virtual AttrIndex AttrBevelType::GetAttributeIndex  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 503 of file attrbev.h.

00503 { return ATTR_BEVELTYPE; }

virtual CCRuntimeClass* AttrBevelType::GetAttributeType  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 501 of file attrbev.h.

00501 { return CC_RUNTIME_CLASS(AttrBevelType); }

virtual AttributeValue* AttrBevelType::GetAttributeValue  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 502 of file attrbev.h.

00502 { return &Value; }

UINT32 AttrBevelType::GetAttrNameID void   )  [virtual]
 

Returns back a string resource ID describing the attribute.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/2/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
Attribute description ID

Errors: -

See also:
-

Reimplemented from NodeAttribute.

Definition at line 1368 of file attrbev.cpp.

01369 {
01370     return (_R(IDS_BEVEL_TYPE_ID)); 
01371 }               

void AttrBevelType::GetDebugDetails StringBase Str  )  [virtual]
 

For obtaining debug information about the Node.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/9/93
Parameters:
Str,: String giving debug info about the node [OUTPUTS]

Reimplemented from NodeRenderable.

Definition at line 1442 of file attrbev.cpp.

01443 {
01444 #ifdef _DEBUG
01445     if (!Str)
01446         return ;
01447 
01448     NodeAttribute::GetDebugDetails( Str );
01449     String_256 TempStr;
01450     TempStr._MakeMsg( TEXT("\r\nValue=#1%d\r\n"), Value.m_Type );
01451     (*Str) += TempStr;
01452 #else
01453     if (Str)
01454     {
01455         *Str = wxT("");
01456     }
01457 #endif
01458 }

UINT32 AttrBevelType::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

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

Reimplemented from Node.

Definition at line 1503 of file attrbev.cpp.

01504 {     
01505     return (sizeof(AttrBevelType)); 
01506 }  

INT32 AttrBevelType::operator== const NodeAttribute Attrib  )  [virtual]
 

A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/2/94
Parameters:
Atrib,: The attribute to compare, which must be an AttrBevelType [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: An ENSURE failure will occur if Attrib does not have a AttrBevelType runtime class.

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 1336 of file attrbev.cpp.

01337 {
01338     ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrBevelType)), 
01339         "Trying to compare two objects with different types"); 
01340     AttrBevelType * Attr = (AttrBevelType *) &Attrib;
01341 
01342     if (Attr->Value.IsDifferent(&Value))
01343     {
01344         return FALSE;
01345     }
01346 
01347     return TRUE; 
01348     
01349 } 

void AttrBevelType::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 NodeRenderable.

Definition at line 1411 of file attrbev.cpp.

01412 {
01413     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
01414     ENSURE(IS_A(pNodeCopy, AttrBevelType), "PolyCopyNodeContents given wrong dest node type");
01415 
01416     if (IS_A(pNodeCopy, AttrBevelType))
01417         CopyNodeContents((AttrBevelType*)pNodeCopy);
01418 }

void AttrBevelType::Render RenderRegion pRender  )  [virtual]
 

'Renders' a Line Width attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from NodeAttribute.

Definition at line 1267 of file attrbev.cpp.

01268 {
01269 }

void AttrBevelType::SetValue INT32  NewValue  )  [inline]
 

Definition at line 517 of file attrbev.h.

00517 { Value.m_Type = NewValue; }

void AttrBevelType::ShowDebugTreeDetails  )  const
 

Displays debugging info of the tree.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93

Definition at line 1432 of file attrbev.cpp.

01433 {
01434     // Display a bit of debugging info
01435     // For now, we will just call the base class version
01436 #ifdef _DEBUG
01437     NodeAttribute::ShowDebugTreeDetails();  
01438 #endif
01439 }

Node * AttrBevelType::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:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93
Parameters:
- [INPUTS]
[OUTPUTS] 
Returns:
A copy of the node, or NULL if memory runs 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.

Scope: protected

Reimplemented from NodeAttribute.

Definition at line 1308 of file attrbev.cpp.

01309 {
01310     AttrBevelType* NodeCopy = new AttrBevelType();
01311     ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 
01312     CopyNodeContents(NodeCopy);
01313     NodeCopy->Value.SimpleCopy(&Value);
01314     return NodeCopy;
01315 } 

void AttrBevelType::Transform TransformBase Trans  )  [virtual]
 

Scale the Line Width.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/8/94
Parameters:
Trans - the transform object to apply to this attribute. [INPUTS]
See also:
NodeRenderable::Transform

Reimplemented from NodeRenderable.

Definition at line 1284 of file attrbev.cpp.

01285 {
01286     
01287 }

BOOL AttrBevelType::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 1615 of file attrbev.cpp.

01616 {
01617 #ifdef DO_EXPORT
01618     return WritePreChildrenWeb(pFilter);
01619 #else
01620     return FALSE;
01621 #endif
01622 }

BOOL AttrBevelType::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the line width record to the filter.

> virtual BOOL AttrBevelType::WritePreChildrenWeb(BaseCamelotFilter* pFilter)

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/5/96
Parameters:
pFilter = ptr to the filter [INPUTS]
Returns:
TRUE if record is written, FALSE if not
See also:
-

Reimplemented from Node.

Definition at line 1607 of file attrbev.cpp.

01608 {
01609     return TRUE;
01610 }


Member Data Documentation

BevelAttributeValueType AttrBevelType::Value
 

Definition at line 533 of file attrbev.h.


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