#include <nodetext.h>
Inheritance diagram for KernCode:
Public Member Functions | |
KernCode () | |
Simple KernCode constructor, it is required so that SimpleCopy will work. You should not normally call this constructor as it does not initialise the object. | |
KernCode (DocCoord &Value) | |
KernCode constructor. | |
KernCode (Node *ContextNode, AttachNodeDirection Direction, DocCoord &Value) | |
The main KernCode constructor. | |
virtual BOOL | ExportRender (RenderRegion *pRegion) |
This function is called when the render function passes through this node It outputs the Text Object start and end tokens. | |
virtual UINT32 | GetNodeSize () const |
For finding the size of the node. | |
virtual void | GetDebugDetails (StringBase *Str) |
For obtaining debug information about the Node. This fn can be deleted before we ship. | |
void | SetValue (DocCoord &KernValue) |
DocCoord | GetValue () |
virtual void | PolyCopyNodeContents (NodeRenderable *pNodeCopy) |
Polymorphically copies the contents of this node to another. | |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *pFilter) |
Writes a kern code record to the new file format filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFIlter) |
Protected Member Functions | |
virtual 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 of Node. | |
void | CopyNodeContents (KernCode *NodeCopy) |
This method copies the node's contents to the node pointed to by NodeCopy. | |
Private Attributes | |
DocCoord | Value |
Definition at line 349 of file nodetext.h.
|
Simple KernCode constructor, it is required so that SimpleCopy will work. You should not normally call this constructor as it does not initialise the object.
Definition at line 3561 of file nodetext.cpp. 03561 : AbstractTextChar() 03562 { 03563 }
|
|
KernCode constructor.
Definition at line 3574 of file nodetext.cpp. 03574 : AbstractTextChar() 03575 { 03576 Value = KernValue; 03577 }
|
|
The main KernCode constructor.
Specifies the direction in which the node is to be attached to the ContextNode. The values this variable can take are as follows: PREV : Attach node as a previous sibling of the context node NEXT : Attach node as a next sibling of the context node FIRSTCHILD: Attach node as the first child of the context node LASTCHILD : Attach node as a last child of the context node Value: Horizontal/Vertical kern value Definition at line 3602 of file nodetext.cpp. 03603 : AbstractTextChar(ContextNode, Direction) 03604 { 03605 Value = KernValue; 03606 }
|
|
This method copies the node's contents to the node pointed to by NodeCopy.
Definition at line 3681 of file nodetext.cpp. 03682 { 03683 // Ask the base class to do its bit 03684 AbstractTextChar::CopyNodeContents( NodeCopy ); 03685 // Copy the rest of the data in here 03686 NodeCopy->Value = Value; 03687 }
|
|
This function is called when the render function passes through this node It outputs the Text Object start and end tokens.
Reimplemented from NodeRenderableInk. Definition at line 3620 of file nodetext.cpp. 03621 { 03622 #if EXPORT_TEXT 03623 if (pRegion->IsKindOf(CC_RUNTIME_CLASS(EPSRenderRegion))) 03624 { 03625 // Output any valid text attributes necessary 03626 ((EPSRenderRegion*)pRegion)->GetValidPathAttributes(); 03627 ((EPSRenderRegion*)pRegion)->GetValidTextAttributes(); 03628 03629 EPSExportDC *pDC=(EPSExportDC*)pRegion->GetRenderDC(); 03630 03631 // Use illustrator 3.0 compatible token. 03632 // Any vertical movement is done by BaselineShift 03633 INT32 autokern = 0; 03634 pDC->OutputValue(autokern); 03635 pDC->OutputValue(-(Value.x)); 03636 pDC->OutputToken(_T("Tk")); 03637 pDC->OutputNewLine(); 03638 return TRUE; 03639 } 03640 #endif 03641 return FALSE; 03642 }
|
|
For obtaining debug information about the Node. This fn can be deleted before we ship.
Reimplemented from AbstractTextChar. Definition at line 3738 of file nodetext.cpp. 03739 { 03740 #if DEBUG_TREE 03741 AbstractTextChar::GetDebugDetails(Str); 03742 String_256 TempStr; 03743 03744 TempStr._MakeMsg( TEXT( "\r\nKernValue = (#1%u, #2%u)"), Value.x, Value.y); 03745 (*Str) += TempStr; 03746 #endif 03747 }
|
|
For finding the size of the node.
Reimplemented from AbstractTextChar. Definition at line 3722 of file nodetext.cpp. 03723 { 03724 return (sizeof(KernCode)); 03725 }
|
|
Definition at line 363 of file nodetext.h. 00363 { return Value; }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from AbstractTextChar. Definition at line 3702 of file nodetext.cpp. 03703 { 03704 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 03705 ENSURE(IS_A(pNodeCopy, KernCode), "PolyCopyNodeContents given wrong dest node type"); 03706 03707 if (IS_A(pNodeCopy, KernCode)) 03708 CopyNodeContents((KernCode*)pNodeCopy); 03709 }
|
|
Definition at line 362 of file nodetext.h. 00362 { Value = KernValue; }
|
|
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 of Node.
Reimplemented from AbstractTextChar. Definition at line 3657 of file nodetext.cpp. 03658 { 03659 // Make a new BigChar and then copy things into it 03660 KernCode* NodeCopy = new KernCode(); 03661 03662 ERROR1IF(NodeCopy == NULL, NULL, _R(IDE_NOMORE_MEMORY)); 03663 03664 if (NodeCopy) 03665 CopyNodeContents(NodeCopy); 03666 03667 return NodeCopy; 03668 }
|
|
Reimplemented from Node. Definition at line 3771 of file nodetext.cpp. 03772 { 03773 #ifdef DO_EXPORT 03774 return CXaraFileTxtKern::WritePreChildrenNative(pFilter, this); 03775 #else 03776 return FALSE; 03777 #endif 03778 }
|
|
Writes a kern code record to the new file format filter.
Reimplemented from Node. Definition at line 3762 of file nodetext.cpp. 03763 { 03764 #ifdef DO_EXPORT 03765 return CXaraFileTxtKern::WritePreChildrenWeb(pFilter, this); 03766 #else 03767 return FALSE; 03768 #endif 03769 }
|
|
Definition at line 376 of file nodetext.h. |