#include <lineattr.h>
Inheritance diagram for AttrEndArrow:
Public Member Functions | |
AttrEndArrow () | |
Default constructor for End Arrow Attribute class. | |
AttrEndArrow (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
Creates an EndArrow Attribute. | |
void | Render (RenderRegion *pRender) |
'Renders' a EndArrow attribute. | |
virtual BOOL | EffectsParentBounds () |
Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads. | |
virtual DocRect | GetAttrBoundingRect (NodeRenderableInk *pParent=NULL, CCAttrMap *pAttribMap=NULL) |
Finds the bounding rect of the arrowhead. | |
virtual AttributeValue * | GetAttributeValue () |
virtual CCRuntimeClass * | GetAttributeType () |
virtual AttrIndex | GetAttributeIndex () |
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 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 | GetDebugDetails (StringBase *Str) |
For obtaining debug information about the Node. | |
virtual UINT32 | GetNodeSize () const |
For finding the size of the node. | |
virtual void | PolyCopyNodeContents (NodeRenderable *pNodeCopy) |
Polymorphically copies the contents of this node to another. | |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *pFilter) |
Writes the end arrow record to the filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
Public Attributes | |
EndArrowAttribute | Value |
Private Member Functions | |
void | CopyNodeContents (AttrEndArrow *NodeCopy) |
This method copies the node's contents to the node pointed to by NodeCopy. |
Definition at line 493 of file lineattr.h.
|
Default constructor for End Arrow Attribute class.
Definition at line 2309 of file lineattr.cpp. 02309 : NodeAttribute() 02310 { 02311 }
|
|
Creates an EndArrow Attribute.
Definition at line 2284 of file lineattr.cpp. 02290 : NodeAttribute(ContextNode, Direction, Locked, Mangled, Marked, Selected) 02291 { 02292 }
|
|
This method copies the node's contents to the node pointed to by NodeCopy.
Definition at line 2468 of file lineattr.cpp. 02469 { 02470 NodeAttribute::CopyNodeContents( NodeCopy ); 02471 02472 //Copy contents specific to derived class here 02473 NodeCopy->Value.EndArrow = Value.EndArrow; 02474 }
|
|
Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads.
Reimplemented from NodeAttribute. Definition at line 2333 of file lineattr.cpp. 02334 { 02335 return !Value.EndArrow.IsNullArrow(); 02336 }
|
|
Finds the bounding rect of the arrowhead.
Reimplemented from NodeAttribute. Definition at line 2349 of file lineattr.cpp. 02350 { 02351 if (!pParent->IsNodePath()) 02352 { 02353 // ERROR3("Arrow is not applied to a Path !!"); 02354 return DocRect(0, 0, 0, 0); 02355 } 02356 02357 02358 INT32 LineWidth = 0; 02359 02360 // Now extract the info we need from the applied attributes 02361 void* pLineWidth = NULL; 02362 pAttribMap->Lookup( CC_RUNTIME_CLASS(AttrLineWidth), pLineWidth ); 02363 ENSURE(pLineWidth,"AttrEndArrow::GetAttrBoundingRect can't find LineWidth"); 02364 02365 if (pLineWidth) 02366 { 02367 LineWidth = ((AttrLineWidth*)pLineWidth)->Value.LineWidth; 02368 } 02369 02370 return Value.EndArrow.GetArrowBoundingRect(&((NodePath*)pParent)->InkPath, LineWidth, FALSE); 02371 }
|
|
Reimplemented from NodeAttribute. Definition at line 513 of file lineattr.h. 00513 { return ATTR_ENDARROW; }
|
|
Reimplemented from NodeAttribute. Definition at line 512 of file lineattr.h. 00512 { return CC_RUNTIME_CLASS(AttrEndArrow); }
|
|
Reimplemented from NodeAttribute. Definition at line 511 of file lineattr.h. 00511 { return &Value; }
|
|
Returns back a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 2445 of file lineattr.cpp. 02446 { 02447 return (_R(IDS_END_ARROW)); 02448 }
|
|
For obtaining debug information about the Node.
Reimplemented from NodeRenderable. Definition at line 2520 of file lineattr.cpp. 02521 { 02522 #ifdef _DEBUG 02523 NodeAttribute::GetDebugDetails( Str ); 02524 02525 String_256 TempStr; 02526 //TempStr._MakeMsg( TEXT(!!!"\r\nLine width=#1%ld\r\n"), Value.LineWidth ); 02527 (*Str) += TempStr; 02528 #endif 02529 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 2546 of file lineattr.cpp. 02547 { 02548 return (sizeof(AttrEndArrow)); 02549 }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from NodeAttribute. Definition at line 2420 of file lineattr.cpp. 02421 { 02422 ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrEndArrow)), 02423 "Trying to compare two objects with different types"); 02424 02425 AttrEndArrow* Attr = (AttrEndArrow*) &Attrib; 02426 return (Attr->Value.EndArrow == Value.EndArrow); 02427 }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from NodeRenderable. Definition at line 2490 of file lineattr.cpp. 02491 { 02492 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 02493 ENSURE(IS_A(pNodeCopy, AttrEndArrow), "PolyCopyNodeContents given wrong dest node type"); 02494 02495 if (IS_A(pNodeCopy, AttrEndArrow)) 02496 CopyNodeContents((AttrEndArrow*)pNodeCopy); 02497 }
|
|
'Renders' a EndArrow attribute.
Reimplemented from NodeAttribute. Definition at line 2328 of file lineattr.cpp. 02329 { 02330 pRender->SetEndArrow(&Value, FALSE); 02331 }
|
|
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 NodeAttribute. Definition at line 2392 of file lineattr.cpp. 02393 { 02394 AttrEndArrow* NodeCopy = new AttrEndArrow(); 02395 ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 02396 CopyNodeContents(NodeCopy); 02397 02398 return NodeCopy; 02399 }
|
|
Reimplemented from Node. Definition at line 2612 of file lineattr.cpp. 02613 { 02614 #ifdef DO_EXPORT 02615 return WritePreChildrenWeb(pFilter); 02616 #else 02617 return FALSE; 02618 #endif 02619 }
|
|
Writes the end arrow record to the filter. > virtual BOOL AttrEndArrow::WritePreChildrenWeb(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 2566 of file lineattr.cpp. 02567 { 02568 #ifdef DO_EXPORT 02569 ERROR2IF(pFilter == NULL,FALSE,"NULL filter param"); 02570 02571 CamelotFileRecord Rec(pFilter,TAG_ARROWTAIL,TAG_ARROWTAIL_SIZE); 02572 02573 INT32 ArrowId = 0; 02574 FIXED16 ScaleWidth = Value.EndArrow.GetArrowWidth(); 02575 FIXED16 ScaleHeight = Value.EndArrow.GetArrowHeight(); 02576 ArrowRec Arrow; 02577 02578 INT32 ArrowType = Value.EndArrow.GetArrowID(); 02579 02580 // Convert the internal style into an arrow reference 02581 switch ((StockArrow)ArrowType) 02582 { 02583 case SA_NULLARROW : ArrowId = REF_ARROW_NULL; break; 02584 case SA_STRAIGHTARROW : ArrowId = REF_ARROW_STRAIGHT; break; 02585 case SA_ANGLEDARROW : ArrowId = REF_ARROW_ANGLED; break; 02586 case SA_ROUNDEDARROW : ArrowId = REF_ARROW_ROUNDED; break; 02587 case SA_SPOT : ArrowId = REF_ARROW_SPOT; break; 02588 case SA_DIAMOND : ArrowId = REF_ARROW_DIAMOND; break; 02589 case SA_ARROWFEATHER : ArrowId = REF_ARROW_FEATHER; break; 02590 case SA_ARROWFEATHER2 : ArrowId = REF_ARROW_FEATHER2; break; 02591 case SA_HOLLOWDIAMOND : ArrowId = REF_ARROW_HOLLOWDIAMOND; break; 02592 default: 02593 ERROR3("Unkown arrow head type in AttrEndArrow::WritePreChildrenWeb"); 02594 break; 02595 } 02596 02597 BOOL ok = Rec.Init(); 02598 if (ok) ok = Rec.WriteINT32(ArrowId); 02599 if (ok) ok = Rec.WriteFIXED16(ScaleWidth); 02600 if (ok) ok = Rec.WriteFIXED16(ScaleHeight); 02601 if (ok) ok = pFilter->Write(&Rec); 02602 02603 return ok; 02604 #else 02605 return FALSE; 02606 #endif // DO_EXPORT 02607 }
|
|
Definition at line 536 of file lineattr.h. |