AttrBevelLightTilt Class Reference

Bevel indent attribute. More...

#include <attrbev.h>

Inheritance diagram for AttrBevelLightTilt:

AttrBevel NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrBevelLightTilt ()
 Default constructor for Line Width Attribute class.
 AttrBevelLightTilt (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 Creates a bValue Attribute.
virtual CCRuntimeClassGetAttributeType ()
virtual AttributeValueGetAttributeValue ()
virtual AttrIndex GetAttributeIndex ()
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.
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 EffectsParentBounds ()
 Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes the line width record to the filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)
void SetValue (INT32 NewValue)
BOOL Blend (BlendAttrParam *pBlendParam)
 Blends this light angle to another.
virtual void PolyCopyNodeContents (NodeRenderable *pNodeCopy)
 Polymorphically copies the contents of this node to another.

Public Attributes

BevelAttributeValueLightTilt Value

Private Member Functions

void CopyNodeContents (AttrBevelLightTilt *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 576 of file attrbev.h.


Constructor & Destructor Documentation

AttrBevelLightTilt::AttrBevelLightTilt  ) 
 

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 2541 of file attrbev.cpp.

02542 {
02543 }

AttrBevelLightTilt::AttrBevelLightTilt 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 2516 of file attrbev.cpp.

02522              : AttrBevel(ContextNode, Direction, Locked, Mangled, Marked, Selected)  
02523 {                         
02524 } 


Member Function Documentation

BOOL AttrBevelLightTilt::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 2648 of file attrbev.cpp.

02649 {
02650     ERROR2IF(pBlendParam == NULL,FALSE,"pBlendParam == NULL");
02651     ERROR3IF(!(pBlendParam->GetOtherAttr()->IS_KIND_OF(AttrBevelLightTilt)),
02652         "Blend attribute isn't a bevel light tilt attribute");
02653 
02654     AttrBevelLightTilt * pBlendedAttr = NULL;
02655 
02656     // assign the other attribute we're looking at
02657     AttrBevelLightTilt * pOtherAttr = (AttrBevelLightTilt *)pBlendParam->GetOtherAttr();
02658 
02659     // split at the half way mark
02660     if (pBlendParam->GetBlendRatio() <= 0.5)
02661     {
02662         pBlendedAttr = (AttrBevelLightTilt *)SimpleCopy();
02663     }
02664     else
02665     {
02666         pBlendedAttr = (AttrBevelLightTilt *)pOtherAttr->SimpleCopy();
02667     }
02668 
02669     // set the blended attribute
02670     pBlendParam->SetBlendedAttr(pBlendedAttr);
02671 
02672     if (!pBlendedAttr)
02673         return FALSE;
02674 
02675     double LightTilt1           = Value.m_LightTilt;
02676     double LightTilt2           = pOtherAttr->Value.m_LightTilt;
02677     double NewLightTilt         = ((LightTilt2 - LightTilt1) * pBlendParam->GetBlendRatio()) + LightTilt1;
02678 
02679     // set the blended attribute's values
02680     pBlendedAttr->Value.m_LightTilt = (INT32) NewLightTilt;
02681     
02682     return TRUE;
02683 }

void AttrBevelLightTilt::CopyNodeContents AttrBevelLightTilt 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 2726 of file attrbev.cpp.

02727 {
02728     NodeAttribute::CopyNodeContents( NodeCopy );
02729 
02730     NodeCopy->Value = Value;
02731 } 

virtual BOOL AttrBevelLightTilt::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 606 of file attrbev.h.

00606 { return FALSE; }

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

Reimplemented from NodeAttribute.

Definition at line 591 of file attrbev.h.

00591 { return ATTR_BEVELLIGHTTILT; }

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

Reimplemented from NodeAttribute.

Definition at line 589 of file attrbev.h.

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

Reimplemented from NodeAttribute.

Definition at line 590 of file attrbev.h.

00590 { return &Value; }

UINT32 AttrBevelLightTilt::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 2702 of file attrbev.cpp.

02703 {
02704     return (_R(IDS_BEVEL_LIGHTTILT_ID)); 
02705 }               

void AttrBevelLightTilt::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 2776 of file attrbev.cpp.

02777 {
02778 #ifdef _DEBUG
02779     if (Str)
02780     {
02781         NodeAttribute::GetDebugDetails( Str );
02782         String_256 TempStr;
02783         TempStr._MakeMsg( TEXT("\r\nValue=#1%d\r\n"), Value.m_LightTilt );
02784         (*Str) += TempStr;
02785     }
02786 #else
02787     if (Str)
02788     {
02789         *Str = wxT("");
02790     }
02791 #endif
02792 }

UINT32 AttrBevelLightTilt::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 2810 of file attrbev.cpp.

02811 {     
02812     return (sizeof(AttrBevelLightTilt)); 
02813 }  

INT32 AttrBevelLightTilt::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 AttrBevelLightTilt [INPUTS]
- [OUTPUTS]
Returns:
-

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

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 2629 of file attrbev.cpp.

02630 {
02631     ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrBevelLightTilt)), 
02632         "Trying to compare two objects with different types"); 
02633     AttrBevelLightTilt * Attr = (AttrBevelLightTilt *) &Attrib;
02634     return (Attr->Value.m_LightTilt == Value.m_LightTilt); 
02635 } 

void AttrBevelLightTilt::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 2745 of file attrbev.cpp.

02746 {
02747     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
02748     ENSURE(IS_A(pNodeCopy, AttrBevelLightTilt), "PolyCopyNodeContents given wrong dest node type");
02749 
02750     if (IS_A(pNodeCopy, AttrBevelLightTilt))
02751         CopyNodeContents((AttrBevelLightTilt*)pNodeCopy);
02752 }

void AttrBevelLightTilt::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 2561 of file attrbev.cpp.

02562 {
02563 }

void AttrBevelLightTilt::SetValue INT32  NewValue  )  [inline]
 

Definition at line 612 of file attrbev.h.

00612 { Value.m_LightTilt = NewValue; }

void AttrBevelLightTilt::ShowDebugTreeDetails  )  const
 

Displays debugging info of the tree.

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

Definition at line 2766 of file attrbev.cpp.

02767 {
02768     // Display a bit of debugging info
02769     // For now, we will just call the base class version
02770 #ifdef _DEBUG
02771     NodeAttribute::ShowDebugTreeDetails();  
02772 #endif
02773 }

Node * AttrBevelLightTilt::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 2601 of file attrbev.cpp.

02602 {
02603     AttrBevelLightTilt* NodeCopy = new AttrBevelLightTilt();
02604     ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 
02605     CopyNodeContents(NodeCopy);
02606     NodeCopy->Value.m_LightTilt = Value.m_LightTilt;
02607     return NodeCopy;
02608 } 

void AttrBevelLightTilt::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 2577 of file attrbev.cpp.

02578 {
02579     
02580 }

BOOL AttrBevelLightTilt::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 2852 of file attrbev.cpp.

02853 {
02854 #ifdef DO_EXPORT
02855     return WritePreChildrenWeb(pFilter);
02856 #else
02857     return FALSE;
02858 #endif
02859 }

BOOL AttrBevelLightTilt::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the line width record to the filter.

> virtual BOOL AttrBevelLightTilt::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 2828 of file attrbev.cpp.

02829 {
02830 /*
02831 #ifdef DO_EXPORT
02832     ERROR2IF(pFilter == NULL,FALSE,"NULL filter param");
02833 
02834     CamelotFileRecord Rec(pFilter,TAG_BEVATTR_LightTilt,sizeof(Value.m_LightTilt));
02835 
02836     BOOL ok = Rec.Init();
02837 
02838     if (ok) ok = Rec.WriteINT32(Value.m_LightTilt);
02839     if (ok) ok = pFilter->Write(&Rec);
02840 
02841     return ok;
02842 #else
02843     return FALSE;
02844 #endif
02845     */
02846     return TRUE;
02847 }


Member Data Documentation

BevelAttributeValueLightTilt AttrBevelLightTilt::Value
 

Definition at line 621 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