#include <nodetext.h>
Inheritance diagram for EOLNode:
Public Member Functions | |
EOLNode () | |
Simple EOLNode constructor, it is required so that SimpleCopy will work. | |
EOLNode (Node *ContextNode, AttachNodeDirection Direction) | |
The main EOLNode constructor. | |
virtual DocRect | GetBlobBoundingRect () |
get the EOLNode's blob bounds | |
virtual void | RenderObjectBlobs (RenderRegion *pRender) |
Renders the selection blobs for an EOLNode. | |
virtual void | RenderTinyBlobs (RenderRegion *pRender) |
Renders the selection blobs for an EOLNode. | |
BOOL | GetBlobPath (Path *) |
Builds a path for rendering the blobs for an EOLNode. | |
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. | |
virtual String | Describe (BOOL Plural, BOOL Verbose) |
For obtaining a desciption about the node to use in the status line. | |
virtual BOOL | ValidateBoundingRect (FormatRegion *pFormatRegion=NULL) |
calculate the EOL bounds in the document | |
virtual DocRect | GetBoundingRect (BOOL DontUseAttrs=FALSE, BOOL HitTest=FALSE) |
Get the EOL's bounds If the cached bounds are invalid, recalculate them. | |
virtual BOOL | IsAnEOLNode () const |
BOOL | IsVirtual () const |
void | SetVirtual (BOOL Status) |
virtual void | PolyCopyNodeContents (NodeRenderable *pNodeCopy) |
Polymorphically copies the contents of this node to another. | |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *pFilter) |
Writes an end of line record to the new file format filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFIlter) |
virtual BOOL | CanWriteChildrenWeb (BaseCamelotFilter *pFilter) |
Asks if it's alright to write out the EOL's children. | |
virtual BOOL | CanWriteChildrenNative (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 (EOLNode *NodeCopy) |
This method copies the node's contents to the node pointed to by NodeCopy. | |
Private Attributes | |
BYTE | Virtual: 1 |
Definition at line 474 of file nodetext.h.
|
Simple EOLNode constructor, it is required so that SimpleCopy will work.
Definition at line 3140 of file nodetext.cpp. 03140 : AbstractTextChar() // Call the base class 03141 { 03142 Virtual = FALSE; 03143 }
|
|
The main EOLNode 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 Definition at line 3166 of file nodetext.cpp. 03167 : AbstractTextChar(ContextNode, Direction) 03168 { 03169 Virtual = FALSE; 03170 }
|
|
Reimplemented from Node. Definition at line 3512 of file nodetext.cpp. 03513 { 03514 return TRUE; 03515 }
|
|
Asks if it's alright to write out the EOL's children.
Reimplemented from Node. Definition at line 3504 of file nodetext.cpp. 03505 { 03506 return TRUE; 03507 }
|
|
This method copies the node's contents to the node pointed to by NodeCopy.
Definition at line 3229 of file nodetext.cpp. 03230 { 03231 // Ask the base class to do its bit 03232 AbstractTextChar::CopyNodeContents( NodeCopy ); 03233 03234 // Copy the rest of the data in here 03235 NodeCopy->Virtual = Virtual; 03236 }
|
|
For obtaining a desciption about the node to use in the status line.
Reimplemented from AbstractTextChar. Definition at line 3209 of file nodetext.cpp. 03210 { 03211 if (Plural) 03212 return(String(_R(IDS_EOLNODES))); 03213 else 03214 return(String(_R(IDS_EOLNODE))); 03215 }
|
|
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 3528 of file nodetext.cpp. 03529 { 03530 #if EXPORT_TEXT 03531 03532 // (ChrisG - 3/11/00) 03533 if (pRegion->IsKindOf(CC_RUNTIME_CLASS(AIEPSRenderRegion))) 03534 { 03535 // if we were exporting the overflow data (i.e. we were exporting a path), then 03536 // finish off exporting this 03537 if (((AIEPSRenderRegion *) pRegion)->ExportingOnPath ()) 03538 ((AIEPSRenderRegion *) pRegion)->OverflowTextFinish (); 03539 } 03540 03541 return pRegion->WriteNewLine (); 03542 #else 03543 return FALSE; 03544 #endif 03545 }
|
|
get the EOLNode's blob bounds
Reimplemented from AbstractTextChar. Definition at line 3360 of file nodetext.cpp. 03361 { 03362 Path RenderPath; 03363 DocRect Bounds(0,0,1,1); 03364 if (GetBlobPath(&RenderPath)) 03365 Bounds = RenderPath.GetBoundingRect(); 03366 03367 return Bounds; 03368 }
|
|
Builds a path for rendering the blobs for an EOLNode.
Definition at line 3425 of file nodetext.cpp. 03426 { 03427 #if !defined(EXCLUDE_FROM_RALPH) 03428 ERROR2IF(pPath==NULL, FALSE, "Path pointer was NULL"); 03429 TextLine* pParentLine = this->FindParentLine(); 03430 ERROR2IF(pParentLine==NULL, FALSE, "EOLNode didn't have a parent TextLine"); 03431 const MILLIPOINT LineAscent = pParentLine->GetLineAscent(); 03432 const MILLIPOINT HalfLA = LineAscent/2; 03433 const MILLIPOINT QuarterLA = LineAscent/4; 03434 BOOL ok = TRUE; 03435 if (ok) ok = pPath->Initialise(4,1); 03436 if (ok) ok = pPath->AddMoveTo(DocCoord(QuarterLA,0)); 03437 if (ok) ok = pPath->AddLineTo(DocCoord(QuarterLA, HalfLA)); 03438 if (ok) ok = pPath->AddLineTo(DocCoord(HalfLA+QuarterLA, QuarterLA)); 03439 if (ok) ok = pPath->AddLineTo(DocCoord(QuarterLA,0)); 03440 if (ok) 03441 { 03442 ok = pPath->CloseSubPath(); 03443 pPath->IsFilled = TRUE; 03444 } 03445 03446 // Transform the path 03447 if (ok) 03448 { 03449 Matrix matrix; 03450 if (ok) ok = GetStoryAndCharMatrix(&matrix); 03451 if (ok) matrix.transform((Coord*)(pPath->GetCoordArray()), pPath->GetNumCoords()); 03452 } 03453 03454 return ok; 03455 #else 03456 return FALSE; 03457 #endif 03458 }
|
|
Get the EOL's bounds If the cached bounds are invalid, recalculate them.
Reimplemented from AbstractTextChar. Definition at line 3316 of file nodetext.cpp. 03317 { 03318 if (IsBoundingRectValid==FALSE) 03319 if (ValidateBoundingRect()==FALSE) 03320 InformError(); 03321 03322 return BoundingRectangle; 03323 }
|
|
For obtaining debug information about the Node. This fn can be deleted before we ship.
Reimplemented from AbstractTextChar. Definition at line 3287 of file nodetext.cpp. 03288 { 03289 #if DEBUG_TREE 03290 AbstractTextChar::GetDebugDetails(pStr); 03291 03292 String_256 TempStr; 03293 03294 switch (IsVirtual()) 03295 { 03296 case TRUE: TempStr._MakeMsg(TEXT("\r\nIs virtual")); break; 03297 case FALSE: TempStr._MakeMsg(TEXT("\r\nIs physical")); break; 03298 } 03299 *pStr += TempStr; 03300 #endif 03301 }
|
|
For finding the size of the node.
Reimplemented from AbstractTextChar. Definition at line 3271 of file nodetext.cpp. 03272 { 03273 return (sizeof(EOLNode)); 03274 }
|
|
Reimplemented from VisibleTextNode. Definition at line 495 of file nodetext.h. 00495 {return TRUE;};
|
|
Definition at line 497 of file nodetext.h. 00497 { return Virtual; }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from AbstractTextChar. Definition at line 3251 of file nodetext.cpp. 03252 { 03253 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 03254 ENSURE(IS_A(pNodeCopy, EOLNode), "PolyCopyNodeContents given wrong dest node type"); 03255 03256 if (IS_A(pNodeCopy, EOLNode)) 03257 CopyNodeContents((EOLNode*)pNodeCopy); 03258 }
|
|
Renders the selection blobs for an EOLNode.
Reimplemented from AbstractTextChar. Definition at line 3380 of file nodetext.cpp. 03381 { 03382 #if !defined(EXCLUDE_FROM_RALPH) 03383 Path RenderPath; 03384 if (GetBlobPath(&RenderPath)) 03385 { 03386 DocColour Trans(COLOUR_TRANS); 03387 pRenderRegion->SetLineWidth(0); 03388 pRenderRegion->SetLineColour(Trans); 03389 pRenderRegion->SetFillColour(COLOUR_UNSELECTEDBLOB); 03390 pRenderRegion->DrawPath(&RenderPath); 03391 } 03392 else 03393 InformError(); 03394 #endif 03395 }
|
|
Renders the selection blobs for an EOLNode.
Reimplemented from AbstractTextChar. Definition at line 3407 of file nodetext.cpp. 03408 { 03409 #if !defined(EXCLUDE_FROM_RALPH) 03410 RenderObjectBlobs(pRenderRegion); 03411 #endif 03412 }
|
|
Definition at line 498 of file nodetext.h. 00498 { Virtual = Status; }
|
|
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 3185 of file nodetext.cpp. 03186 { 03187 // Make a new TextChar and then copy things into it 03188 EOLNode* NodeCopy = new EOLNode(); 03189 03190 if (NodeCopy) 03191 CopyNodeContents(NodeCopy); 03192 03193 return NodeCopy; 03194 03195 }
|
|
calculate the EOL bounds in the document
Reimplemented from VisibleTextNode. Definition at line 3336 of file nodetext.cpp. 03337 { 03338 Matrix matrix; 03339 if (GetStoryAndCharMatrix(&matrix)==FALSE) 03340 return FALSE; 03341 03342 // get a zero size rect at correct place in the doc for the renderable bounds of the EOL 03343 DocCoord temp(0,0); 03344 matrix.transform(&temp); 03345 BoundingRectangle = DocRect(temp,temp); 03346 IsBoundingRectValid = TRUE; 03347 return TRUE; 03348 }
|
|
Reimplemented from Node. Definition at line 3481 of file nodetext.cpp. 03482 { 03483 #ifdef DO_EXPORT 03484 return CXaraFileTxtEOL::WritePreChildrenNative(pFilter, this); 03485 #else 03486 return FALSE; 03487 #endif 03488 }
|
|
Writes an end of line record to the new file format filter.
Reimplemented from Node. Definition at line 3472 of file nodetext.cpp. 03473 { 03474 #ifdef DO_EXPORT 03475 return CXaraFileTxtEOL::WritePreChildrenWeb(pFilter, this); 03476 #else 03477 return FALSE; 03478 #endif 03479 }
|
|
Definition at line 513 of file nodetext.h. |