#include <lineattr.h>
Inheritance diagram for AttrStartCap:
Public Member Functions | |
AttrStartCap () | |
Default constructor for Start Cap Attribute class. | |
AttrStartCap (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
Creates a StartCap Attribute. | |
void | Render (RenderRegion *pRender) |
'Renders' a StartCap attribute. | |
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. | |
virtual AttributeValue * | GetAttributeValue () |
virtual CCRuntimeClass * | GetAttributeType () |
virtual AttrIndex | GetAttributeIndex () |
virtual UINT32 | GetNodeSize () const |
For finding the size of the node. | |
virtual BOOL | EffectsParentBounds () |
Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads. | |
void | GetDebugDetails (StringBase *Str) |
For obtaining debug information about the Node. | |
virtual void | PolyCopyNodeContents (NodeRenderable *pNodeCopy) |
Polymorphically copies the contents of this node to another. | |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *pFilter) |
Writes the start cap record to the filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
Public Attributes | |
StartCapAttribute | Value |
Private Member Functions | |
void | CopyNodeContents (AttrStartCap *NodeCopy) |
This method copies the node's contents to the node pointed to by NodeCopy. |
Definition at line 550 of file lineattr.h.
|
Default constructor for Start Cap Attribute class.
Definition at line 1633 of file lineattr.cpp. 01633 : NodeAttribute() 01634 { 01635 }
|
|
Creates a StartCap Attribute.
Definition at line 1608 of file lineattr.cpp. 01614 : NodeAttribute(ContextNode, Direction, Locked, Mangled, Marked, Selected) 01615 { 01616 }
|
|
This method copies the node's contents to the node pointed to by NodeCopy.
Definition at line 1751 of file lineattr.cpp. 01752 { 01753 NodeAttribute::CopyNodeContents( NodeCopy ); 01754 NodeCopy->Value.StartCap = Value.StartCap; 01755 }
|
|
Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads.
Reimplemented from NodeAttribute. Definition at line 575 of file lineattr.h. 00575 { return TRUE; }
|
|
Reimplemented from NodeAttribute. Definition at line 571 of file lineattr.h. 00571 { return ATTR_STARTCAP; }
|
|
Reimplemented from NodeAttribute. Definition at line 570 of file lineattr.h. 00570 { return CC_RUNTIME_CLASS(AttrStartCap); }
|
|
Reimplemented from NodeAttribute. Definition at line 569 of file lineattr.h. 00569 { return &Value; }
|
|
Returns back a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 1728 of file lineattr.cpp. 01729 { 01730 return (_R(IDS_START_CAP)); 01731 }
|
|
For obtaining debug information about the Node.
Reimplemented from NodeRenderable. Definition at line 1801 of file lineattr.cpp. 01802 { 01803 #ifdef _DEBUG 01804 NodeAttribute::GetDebugDetails( Str ); 01805 01806 String_256 TempStr; 01807 char *p; 01808 switch (Value.StartCap) 01809 { 01810 case LineCapButt: p = "Butt"; break; 01811 case LineCapRound: p = "Round"; break; 01812 case LineCapSquare: p = "Square"; break; 01813 default: p = "??"; break; 01814 } 01815 TempStr._MakeMsg( TEXT("\r\nStartCap=#1%s\r\n"), p ); 01816 (*Str) += TempStr; 01817 #endif 01818 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 1836 of file lineattr.cpp. 01837 { 01838 return (sizeof(AttrStartCap)); 01839 }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from NodeAttribute. Definition at line 1704 of file lineattr.cpp. 01705 { 01706 ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrStartCap)), 01707 "Trying to compare two objects with different types"); 01708 AttrStartCap* Attr = (AttrStartCap*) &Attrib; 01709 return (Attr->Value.StartCap == Value.StartCap); 01710 }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from NodeRenderable. Definition at line 1771 of file lineattr.cpp. 01772 { 01773 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 01774 ENSURE(IS_A(pNodeCopy, AttrStartCap), "PolyCopyNodeContents given wrong dest node type"); 01775 01776 if (IS_A(pNodeCopy, AttrStartCap)) 01777 CopyNodeContents((AttrStartCap*)pNodeCopy); 01778 }
|
|
'Renders' a StartCap attribute.
Reimplemented from NodeAttribute. Definition at line 1653 of file lineattr.cpp. 01654 { 01655 pRender->SetStartCap(&Value, FALSE); 01656 }
|
|
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 1677 of file lineattr.cpp. 01678 { 01679 AttrStartCap* NodeCopy = new AttrStartCap(); 01680 ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 01681 CopyNodeContents(NodeCopy); 01682 return NodeCopy; 01683 }
|
|
Reimplemented from Node. Definition at line 1887 of file lineattr.cpp. 01888 { 01889 #ifdef DO_EXPORT 01890 return WritePreChildrenWeb(pFilter); 01891 #else 01892 return FALSE; 01893 #endif 01894 }
|
|
Writes the start cap record to the filter. > virtual BOOL AttrStartCap::WritePreChildrenWeb(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 1856 of file lineattr.cpp. 01857 { 01858 #ifdef DO_EXPORT 01859 ERROR2IF(pFilter == NULL,FALSE,"NULL filter param"); 01860 01861 CamelotFileRecord Rec(pFilter,TAG_STARTCAP,TAG_STARTCAP_SIZE); 01862 01863 BOOL ok = Rec.Init(); 01864 if (ok) ok = Rec.WriteBYTE(BYTE(Value.StartCap)); 01865 if (ok) ok = pFilter->Write(&Rec); 01866 01867 // Camelot uses the start cap attr to define both the start and end caps for the effected shapes. 01868 // However, the file format supports separate records for the two states. 01869 // Both the start & end cap records are saved with the same value, just in case another 01870 // program wishes to load the file. 01871 01872 CamelotFileRecord Rec2(pFilter,TAG_ENDCAP,TAG_ENDCAP_SIZE); 01873 01874 if (ok) ok = Rec2.Init(); 01875 if (ok) ok = Rec2.WriteBYTE(BYTE(Value.StartCap)); 01876 if (ok) ok = pFilter->Write(&Rec2); 01877 01878 return ok; 01879 #else 01880 return FALSE; 01881 #endif 01882 }
|
|
Definition at line 592 of file lineattr.h. |