HorizontalTab Class Reference

A horizontal tab character. More...

#include <nodetext.h>

Inheritance diagram for HorizontalTab:

AbstractTextChar VisibleTextNode BaseTextClass NodeRenderableInk NodeRenderableBounded NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 HorizontalTab ()
 HorizontalTab (Node *ContextNode, AttachNodeDirection Direction)
 The main HorizontalTab 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 See also: KernCode::ExportRender, on which this routine is based.
virtual UINT32 GetNodeSize () const
 For finding the size of the node.
void PolyCopyNodeContents (NodeRenderable *pNodeCopy)
 Polymorphically copies the contents of this node to another.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes a tab record to the new file format filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFIlter)

Protected Member Functions

virtual NodeSimpleCopy ()
 Because this is an abstract class, the SimpleCopy method simply causes an ERROR3 to go off.

Detailed Description

A horizontal tab character.

Author:
Martin Wuerthner (xara@mw-software.com)
Date:
07/06/06

Definition at line 387 of file nodetext.h.


Constructor & Destructor Documentation

HorizontalTab::HorizontalTab  )  [inline]
 

Definition at line 392 of file nodetext.h.

00392 {}

HorizontalTab::HorizontalTab Node ContextNode,
AttachNodeDirection  Direction
 

The main HorizontalTab constructor.

Author:
Martin Wuerthner (xara@mw-software.com)
Date:
07/05/06
Parameters:
ContextNode,: Pointer to a node which this node is to be attached to. [INPUTS]
Direction:

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

Definition at line 3800 of file nodetext.cpp.

03801     :AbstractTextChar(ContextNode, Direction)
03802 {
03803 }


Member Function Documentation

BOOL HorizontalTab::ExportRender RenderRegion pRegion  )  [virtual]
 

This function is called when the render function passes through this node It outputs the Text Object start and end tokens See also: KernCode::ExportRender, on which this routine is based.

Author:
Martin Wuerthner <xara@mw-software.com>
Date:
18/07/06
Parameters:
pRegion - points to the export render region [INPUTS]
Returns:
TRUE if rendered OK (FALSE=>use normal rendering)

Reimplemented from NodeRenderableInk.

Definition at line 3882 of file nodetext.cpp.

03883 {
03884     // a tab is exported as a horizontal kern code
03885 #if EXPORT_TEXT
03886     if (pRegion->IsKindOf(CC_RUNTIME_CLASS(EPSRenderRegion)))
03887     {
03888         // Output any valid text attributes necessary
03889         ((EPSRenderRegion*)pRegion)->GetValidPathAttributes();
03890         ((EPSRenderRegion*)pRegion)->GetValidTextAttributes();
03891 
03892         EPSExportDC *pDC=(EPSExportDC*)pRegion->GetRenderDC();
03893 
03894         // Use illustrator 3.0 compatible token.
03895         INT32 autokern = 0;
03896         pDC->OutputValue(autokern);
03897         pDC->OutputValue(GetCharWidth());
03898         pDC->OutputToken(_T("Tk"));
03899         pDC->OutputNewLine();
03900         return TRUE;
03901     }
03902 #endif
03903     return FALSE;
03904 }

UINT32 HorizontalTab::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

Author:
Martin Wuerthner <xara@mw-software.com>
Date:
29/06/06
Returns:
The size of the node in bytes

Reimplemented from AbstractTextChar.

Definition at line 3845 of file nodetext.cpp.

03846 {
03847     return (sizeof(HorizontalTab)); 
03848 }

void HorizontalTab::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 AbstractTextChar.

Definition at line 3850 of file nodetext.cpp.

03851 {
03852     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
03853     ENSURE(IS_A(pNodeCopy, HorizontalTab), "PolyCopyNodeContents given wrong dest node type");
03854 
03855     if (IS_A(pNodeCopy, HorizontalTab))
03856         CopyNodeContents((HorizontalTab*)pNodeCopy);
03857 }

Node * HorizontalTab::SimpleCopy void   )  [protected, virtual]
 

Because this is an abstract class, the SimpleCopy method simply causes an ERROR3 to go off.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/12/94
Returns:

Reimplemented from AbstractTextChar.

Definition at line 3859 of file nodetext.cpp.

03860 {
03861     // Make a new HorizontalTab and then copy things into it
03862     HorizontalTab* NodeCopy = new HorizontalTab();
03863 
03864     ERROR1IF(NodeCopy == NULL, NULL, _R(IDE_NOMORE_MEMORY)); 
03865 
03866     if (NodeCopy) CopyNodeContents( NodeCopy );
03867     
03868     return NodeCopy;
03869 }

BOOL HorizontalTab::WritePreChildrenNative BaseCamelotFilter pFIlter  )  [virtual]
 

Reimplemented from Node.

Definition at line 3827 of file nodetext.cpp.

03828 {
03829 #ifdef DO_EXPORT
03830     return CXaraFileTxtTab::WritePreChildrenNative(pFilter, this);
03831 #else
03832     return FALSE;
03833 #endif
03834 }

BOOL HorizontalTab::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes a tab record to the new file format filter.

Author:
Martin Wuerthner <xara@mw-software.com>
Date:
29/06/06
Parameters:
pFilter - new file format filter to write record to [INPUTS]
Returns:
TRUE if successful, FALSE otherwise

Reimplemented from Node.

Definition at line 3818 of file nodetext.cpp.

03819 {
03820 #ifdef DO_EXPORT
03821     return CXaraFileTxtTab::WritePreChildrenWeb(pFilter, this);
03822 #else
03823     return FALSE;
03824 #endif
03825 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:55:08 2007 for Camelot by  doxygen 1.4.4