#include <lineattr.h>
Inheritance diagram for AttrStartArrow:
Public Member Functions | |
AttrStartArrow () | |
Default constructor for Start Arrow Attribute class. | |
AttrStartArrow (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
Creates a StartArrow Attribute. | |
void | Render (RenderRegion *pRender) |
'Renders' a StartArrow 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 start arrow record to the filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
Public Attributes | |
StartArrowAttribute | Value |
Private Member Functions | |
void | CopyNodeContents (AttrStartArrow *NodeCopy) |
This method copies the node's contents to the node pointed to by NodeCopy. |
Definition at line 434 of file lineattr.h.
|
Default constructor for Start Arrow Attribute class.
Definition at line 1946 of file lineattr.cpp. 01946 : NodeAttribute() 01947 { 01948 }
|
|
Creates a StartArrow Attribute.
Definition at line 1921 of file lineattr.cpp. 01927 : NodeAttribute(ContextNode, Direction, Locked, Mangled, Marked, Selected) 01928 { 01929 }
|
|
This method copies the node's contents to the node pointed to by NodeCopy.
Definition at line 2105 of file lineattr.cpp. 02106 { 02107 NodeAttribute::CopyNodeContents( NodeCopy ); 02108 02109 //Copy contents specific to derived class here 02110 NodeCopy->Value.StartArrow = Value.StartArrow; 02111 }
|
|
Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads.
Reimplemented from NodeAttribute. Definition at line 1970 of file lineattr.cpp. 01971 { 01972 return !Value.StartArrow.IsNullArrow(); 01973 }
|
|
Finds the bounding rect of the arrowhead.
Reimplemented from NodeAttribute. Definition at line 1986 of file lineattr.cpp. 01987 { 01988 if (!pParent->IsNodePath()) 01989 { 01990 // ERROR3("Arrow is not applied to a Path !!"); 01991 return DocRect(0, 0, 0, 0); 01992 } 01993 01994 INT32 LineWidth = 0; 01995 01996 // Now extract the info we need from the applied attributes 01997 void* pLineWidth = NULL; 01998 pAttribMap->Lookup( CC_RUNTIME_CLASS(AttrLineWidth), pLineWidth ); 01999 ENSURE(pLineWidth,"AttrStartArrow::GetAttrBoundingRect can't find LineWidth"); 02000 02001 if (pLineWidth) 02002 { 02003 LineWidth = ((AttrLineWidth*)pLineWidth)->Value.LineWidth; 02004 } 02005 02006 return Value.StartArrow.GetArrowBoundingRect(&((NodePath*)pParent)->InkPath, LineWidth, TRUE); 02007 }
|
|
Reimplemented from NodeAttribute. Definition at line 455 of file lineattr.h. 00455 { return ATTR_STARTARROW; }
|
|
Reimplemented from NodeAttribute. Definition at line 454 of file lineattr.h. 00454 { return CC_RUNTIME_CLASS(AttrStartArrow); }
|
|
Reimplemented from NodeAttribute. Definition at line 453 of file lineattr.h. 00453 { return &Value; }
|
|
Returns back a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 2082 of file lineattr.cpp. 02083 { 02084 return (_R(IDS_START_ARROW)); 02085 }
|
|
For obtaining debug information about the Node.
Reimplemented from NodeRenderable. Definition at line 2157 of file lineattr.cpp. 02158 { 02159 #ifdef _DEBUG 02160 NodeAttribute::GetDebugDetails( Str ); 02161 02162 String_256 TempStr; 02163 //TempStr._MakeMsg( TEXT(!!!"\r\nLine width=#1%ld\r\n"), Value.LineWidth ); 02164 (*Str) += TempStr; 02165 #endif 02166 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 2183 of file lineattr.cpp. 02184 { 02185 return (sizeof(AttrStartArrow)); 02186 }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from NodeAttribute. Definition at line 2057 of file lineattr.cpp. 02058 { 02059 ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrStartArrow)), 02060 "Trying to compare two objects with different types"); 02061 02062 AttrStartArrow* Attr = (AttrStartArrow*) &Attrib; 02063 return (Attr->Value.StartArrow == Value.StartArrow); 02064 }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from NodeRenderable. Definition at line 2127 of file lineattr.cpp. 02128 { 02129 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 02130 ENSURE(IS_A(pNodeCopy, AttrStartArrow), "PolyCopyNodeContents given wrong dest node type"); 02131 02132 if (IS_A(pNodeCopy, AttrStartArrow)) 02133 CopyNodeContents((AttrStartArrow*)pNodeCopy); 02134 }
|
|
'Renders' a StartArrow attribute.
Reimplemented from NodeAttribute. Definition at line 1965 of file lineattr.cpp. 01966 { 01967 pRender->SetStartArrow(&Value, FALSE); 01968 }
|
|
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 2030 of file lineattr.cpp. 02031 { 02032 AttrStartArrow* NodeCopy = new AttrStartArrow(); 02033 ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 02034 CopyNodeContents(NodeCopy); 02035 return NodeCopy; 02036 }
|
|
Reimplemented from Node. Definition at line 2249 of file lineattr.cpp. 02250 { 02251 #ifdef DO_EXPORT 02252 return WritePreChildrenWeb(pFilter); 02253 #else 02254 return FALSE; 02255 #endif 02256 }
|
|
Writes the start arrow record to the filter. > virtual BOOL AttrStartArrow::WritePreChildrenWeb(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 2203 of file lineattr.cpp. 02204 { 02205 #ifdef DO_EXPORT 02206 ERROR2IF(pFilter == NULL,FALSE,"NULL filter param"); 02207 02208 CamelotFileRecord Rec(pFilter,TAG_ARROWHEAD,TAG_ARROWHEAD_SIZE); 02209 02210 INT32 ArrowId = 0; 02211 FIXED16 ScaleWidth = Value.StartArrow.GetArrowWidth(); 02212 FIXED16 ScaleHeight = Value.StartArrow.GetArrowHeight(); 02213 ArrowRec Arrow; 02214 02215 INT32 ArrowType = Value.StartArrow.GetArrowID(); 02216 02217 // Convert the internal style into an arrow reference 02218 switch ((StockArrow)ArrowType) 02219 { 02220 case SA_NULLARROW : ArrowId = REF_ARROW_NULL; break; 02221 case SA_STRAIGHTARROW : ArrowId = REF_ARROW_STRAIGHT; break; 02222 case SA_ANGLEDARROW : ArrowId = REF_ARROW_ANGLED; break; 02223 case SA_ROUNDEDARROW : ArrowId = REF_ARROW_ROUNDED; break; 02224 case SA_SPOT : ArrowId = REF_ARROW_SPOT; break; 02225 case SA_DIAMOND : ArrowId = REF_ARROW_DIAMOND; break; 02226 case SA_ARROWFEATHER : ArrowId = REF_ARROW_FEATHER; break; 02227 case SA_ARROWFEATHER2 : ArrowId = REF_ARROW_FEATHER2; break; 02228 case SA_HOLLOWDIAMOND : ArrowId = REF_ARROW_HOLLOWDIAMOND; break; 02229 default: 02230 ERROR3("Unkown arrow head type in AttrStartArrow::WritePreChildrenWeb"); 02231 break; 02232 } 02233 02234 BOOL ok = Rec.Init(); 02235 if (ok) ok = Rec.WriteINT32(ArrowId); 02236 if (ok) ok = Rec.WriteFIXED16(ScaleWidth); 02237 if (ok) ok = Rec.WriteFIXED16(ScaleHeight); 02238 if (ok) ok = pFilter->Write(&Rec); 02239 02240 return ok; 02241 #else 02242 return FALSE; 02243 #endif // DO_EXPORT 02244 }
|
|
Definition at line 479 of file lineattr.h. |