VisibleTextNode Class Reference

The VisibleTextNode is an abstract base class. All visible objects which appear on text lines such as characters, kerns, carets, etc. will be instances of derived classes of VisibleTextNode. More...

#include <nodetext.h>

Inheritance diagram for VisibleTextNode:

BaseTextClass NodeRenderableInk NodeRenderableBounded NodeRenderable Node CCObject SimpleCCObject AbstractTextChar CaretNode EOLNode HorizontalTab KernCode TextChar List of all members.

Public Member Functions

 VisibleTextNode ()
 Simple VisibleTextNode constructor, it is required so that SimpleCopy will work.
 VisibleTextNode (Node *ContextNode, AttachNodeDirection Direction)
 The main VisibleTextNode constructor.
VisibleTextNodeFindNextVTNInStory ()
 Finds the next VisibleTextNode in the TextStory. The routine searches across TextLines.
VisibleTextNodeFindPrevVTNInStory ()
 Finds the previous VisibleTextNode in the TextStory. The routine searches across TextLines.
AbstractTextCharFindNextAbstractTextCharInStory ()
AbstractTextCharFindPrevAbstractTextCharInStory ()
TextCharFindNextTextCharInStory ()
TextCharFindPrevTextCharInStory ()
VisibleTextNodeFindNextVTNInLine ()
VisibleTextNodeFindPrevVTNInLine ()
AbstractTextCharFindNextAbstractTextCharInLine ()
AbstractTextCharFindPrevAbstractTextCharInLine ()
TextLineFindParentLine ()
virtual CopyType GetCopyType ()
 This function returns a type describing how this object is to be copied. The fuction is called from the low level copy operation CopyObjects. There are two options at present, these being SIMPLECOPY and COMPLEXCOPY. SIMPLECOPY indicates that the node can be copied by a call to its virtual function SimpleCopy(). COMPLEXCOPY however indicates that the node needs to do its own thing when copying and must be called via the ComplexCopy() virtual function. This virtual will likely return a tree of copied objects rather than just a copy of itself.
virtual INT32 ComplexCopy (CopyStage Stage, Range &RangeToCopy, Node **pOutput)
 Create a complex copy of this node. This node has overridden GetCopyType() to return COMPLEXCOPY which means, when copying to the clipboard it must make a copy of itself and whatever else it needs. The resulting tree will be attached as the last child of the clipboard root. The routine will be called twice during a copy. Once when Stage==COPYOBJECT and once when Stage==COPYFINISHED. It is only necessary to return a copy during COPYOBJECT. COPYFINISHED can be used to tidy up and flags the node may set during COPYOBJECT.
virtual INT32 ComplexHide (UndoableOperation *pOp, Node *pNextNode)
 Override the node level virtual function ComplexHide. This gives us a chance to get in and hide the various selected members of a text story sensibly. We hide all necessary nodes when the last member of the text story is called to complex hide itself, otherwise we may corrupt the range being scanned.
BOOL RenderChildAttrs (RenderRegion *pRenderRegion)
 Render any first level children attributes into the region.
virtual BOOL CanAttrBeAppliedToMe (CCRuntimeClass *AttrType)
 This fn is not to be confused with RequiresAttrib, it determines if an attribute of type AttrType can be directly applied to this object. The object is assumed to Require the attribute.
virtual UINT32 GetNodeSize () const
 For finding the size of the VisibleTextNode.
virtual void GetDebugDetails (StringBase *Str)
 For obtaining debug information about the Node. This fn can be deleted before we ship.
virtual BOOL OnNodePopUp (Spread *pSpread, DocCoord PointerPos, ContextMenu *pMenu)
 Allows the VisibleTextNode to respond to pop up menu clicks on itself.
void ScrollToShow ()
 If this VTN is not fully on the screen then the screen is scrolled so the VTN is more visible.
BOOL GetStoryAndCharMatrix (Matrix *pMatrix)
 set the given matrix to be the concatenation of the TextStory and VTN matrices
virtual BOOL ValidateBoundingRect (FormatRegion *pFormatRegion=NULL)
MILLIPOINT CalcCharDistAlongLine (BOOL IncludeThisChar)
 Finds the distance along the text line of this character. You can optionally include the width of this character in the sum.
BOOL WrapRestOfLineForward (UndoableOperation *pUndoOp)
 Wrap all nodes from this VTN (inc) to last VTN forward to start of next line If the line containing this VTN is hard (ends in an EOL) create a new line to wrap the text onto.
BOOL WrapFromStartOfLineBack (UndoableOperation *pUndoOp)
 Wrap all chars upto this VTN (inc) back to the end of the previous line If this line is then empty, hide it.
BOOL DoMoveNodes (UndoableOperation *pUndoOp, VisibleTextNode *pLastNode, Node *pDestNode, AttachNodeDirection Direction)
 Move ALL nodes from this VTN to LastVTN to pDestNode in the specified direction Assumes: First and last VTNs are on the same line Note: only VTN in range are moved so hidden nodes don't cause undo bloat!
BOOL DoMoveNode (UndoableOperation *pUndoOp, Node *pDestNode, AttachNodeDirection Direction)
 Move this VTN to the specified location, flagging it 'Affected' in the old and new position.
virtual BOOL IsAVisibleTextNode () const
virtual BOOL IsACaret () const
virtual BOOL IsAnEOLNode () const
virtual BOOL IsASpace ()
virtual BOOL IsAVisibleSpace ()
virtual BOOL IsAHyphen ()
virtual BOOL IsADecimalPoint ()
virtual MILLIPOINT GetCharAdvance ()
virtual MILLIPOINT GetCharWidth ()
virtual MILLIPOINT GetBaseLineShift ()
virtual MILLIPOINT GetAutoKernSize (FormatRegion *)
MILLIPOINT GetPosInLine ()
void SetPosInLine (MILLIPOINT x)
void SetMatrix (const Matrix &matrix)
Matrix GetMatrix ()
MatrixGetpMatrix ()

Protected Member Functions

void Init ()
 Initialise the members of a VisibleTextNode. Called by all constructors.
void CopyNodeContents (VisibleTextNode *NodeCopy)
 This method copies the node's contents to the node pointed to by NodeCopy.
virtual NodeSimpleCopy ()
 It is illegal to copy a VisibleTextNode (it's abstract), therefore this function will generate an error if called.

Private Attributes

Matrix CharMatrix
MILLIPOINT PosInLine

Detailed Description

The VisibleTextNode is an abstract base class. All visible objects which appear on text lines such as characters, kerns, carets, etc. will be instances of derived classes of VisibleTextNode.

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

Definition at line 126 of file nodetext.h.


Constructor & Destructor Documentation

VisibleTextNode::VisibleTextNode  ) 
 

Simple VisibleTextNode constructor, it is required so that SimpleCopy will work.

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

Definition at line 167 of file nodetext.cpp.

00167                                 : BaseTextClass() // Call the base class
00168 {
00169     Init();
00170 }

VisibleTextNode::VisibleTextNode Node ContextNode,
AttachNodeDirection  Direction
 

The main VisibleTextNode constructor.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/02/95
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 193 of file nodetext.cpp.

00194                                                                : BaseTextClass(ContextNode, Direction)
00195 {
00196     Init();
00197 }


Member Function Documentation

MILLIPOINT VisibleTextNode::CalcCharDistAlongLine BOOL  IncludeThisChar  ) 
 

Finds the distance along the text line of this character. You can optionally include the width of this character in the sum.

Author:
Ed_Cornes (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/5/95
Parameters:
IncludeThisChar - TRUE to include this character in the distance, [INPUTS] FALSE to leave it out
Returns:
The distance along the TextLine that this character is at

Definition at line 777 of file nodetext.cpp.

00778 {
00779     if (IncludeThisChar)
00780         return GetPosInLine()+GetCharAdvance();
00781     else
00782         return GetPosInLine();
00783 }

BOOL VisibleTextNode::CanAttrBeAppliedToMe CCRuntimeClass AttrType  )  [virtual]
 

This fn is not to be confused with RequiresAttrib, it determines if an attribute of type AttrType can be directly applied to this object. The object is assumed to Require the attribute.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/6/95
Parameters:
AttrType,: The type of the attribute. It is a type, rather than an [INPUTS] instance because this function needs to be called from the Localise/Factor out routines which operate on attribute types.
Returns:
TRUE if an attribute of AttrType can be applied to this object, FALSE otherwise.
This function is called by the GetObjectToApplyTo virtual function.

The function returns FALSE if we are trying to apply a line level attribute to a VisibleTextNode. As a result attributes will get applied to the parent TextLine object.

Reimplemented from NodeRenderableInk.

Definition at line 1145 of file nodetext.cpp.

01146 {
01147     return !TextLine::IsAttrTypeLineLevel(AttrType);
01148 }

INT32 VisibleTextNode::ComplexCopy CopyStage  Stage,
Range RangeToCopy,
Node **  pOutput
[virtual]
 

Create a complex copy of this node. This node has overridden GetCopyType() to return COMPLEXCOPY which means, when copying to the clipboard it must make a copy of itself and whatever else it needs. The resulting tree will be attached as the last child of the clipboard root. The routine will be called twice during a copy. Once when Stage==COPYOBJECT and once when Stage==COPYFINISHED. It is only necessary to return a copy during COPYOBJECT. COPYFINISHED can be used to tidy up and flags the node may set during COPYOBJECT.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/5/95
Parameters:
Stage - either COPYOBJECT [INPUTS] COPYFINISHED RangeToCopy - Describes the range which is currently being copied. pOutput - Depends on the Stage parameter if Stage= COPYOBJECT Then the node pointer pOutput points at NULL. It should be set on exit to point at the copied object or tree of objects COPYFINISHED Then the node pointer pOutput points at the resulting copy from COPYOBJECT inserted into the destination tree.
pOutput [OUTPUTS]
Returns:
-1 = The routine failed to make a copy. 0 = No copy has been made. +1 = pOutput points to the copy.
Note: Nodes may well require the use of flags to create a sensible complex copy. Every selected node will be called to copy itself during a CopyToClipboard whether they are SIMPLECOPY or COMPLEXCOPY types. Hence if the first call to a node creates a complete tree of objects including nodes which will likely be called by the clipboard copy routine further into its range ie they are selected as well, the node should keep a flag indicating it has already copied them and return 0 from the routine on subsequent calls. A concrete example of this is the text object. Any number of characters can be selected and copied to the clipboard. A character class specifies it is a COMPLEXCOPY node. Each selected character will then get called to make a complex copy of itself. To make a copy the character will ask the parent text story to make a copy of all selected nodes, including itself and lines. It needs to flag itself at this point as further chars in the text story will be asked to do the same. This will prevent multiple text stories from being created, one for every selected character.

Reimplemented from Node.

Definition at line 590 of file nodetext.cpp.

00591 {
00592     TextStory* pTextStory = FindParentStory();
00593     ERROR2IF(pTextStory==NULL,FALSE,"VisibleTextNode::ComplexCopy() - pTextStory==NULL");
00594     return pTextStory->BaseComplexCopy(Stage, RangeToCopy, pOutput);
00595 }

INT32 VisibleTextNode::ComplexHide UndoableOperation pOp,
Node pNextNode
[virtual]
 

Override the node level virtual function ComplexHide. This gives us a chance to get in and hide the various selected members of a text story sensibly. We hide all necessary nodes when the last member of the text story is called to complex hide itself, otherwise we may corrupt the range being scanned.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/5/95
Parameters:
pOp - a pointer to an undoable operation [INPUTS] pNextNode - a pointer to the next node in range.
Returns:
-1 = The routine failed to hide this node. 0 = Ignored, this object does not support complex hide operations, so carry on and hide the node as normal. +1 = The node and possibly various others have been hidden correctly.

Reimplemented from Node.

Definition at line 636 of file nodetext.cpp.

00637 {
00638     // if there is no next node in the range then we need to hide all nodes
00639     BOOL CallComplexHide = TRUE;
00640     TextStory* pThisStory = this->FindParentStory();
00641     ERROR2IF(pThisStory==NULL,FALSE,"VisibleTextNode::ComplexHide() - pThisStory==NULL");
00642 
00643     if (pNextNode)
00644     {
00645         if ( pNextNode->IsAVisibleTextNode() || IS_A(pNextNode,TextLine) )
00646         {
00647             TextStory* pTextStory = (TextStory*)(pNextNode->FindParent(CC_RUNTIME_CLASS(TextStory)));
00648             ERROR2IF(pTextStory==NULL,FALSE,"VisibleTextNode::ComplexHide() - pTextStory==NULL");
00649             if (pThisStory==pTextStory)
00650                 CallComplexHide=FALSE;
00651         }
00652     }
00653 
00654     if (CallComplexHide)
00655         return pThisStory->BaseComplexHide(pOp);
00656     else
00657         return 1;
00658 }

void VisibleTextNode::CopyNodeContents VisibleTextNode NodeCopy  )  [protected]
 

This method copies the node's contents to the node pointed to by NodeCopy.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/4/93
Parameters:
A copy of this node [OUTPUTS]
Returns:
Errors: An ERROR3 will occur if NodeCopy is NULL

Definition at line 608 of file nodetext.cpp.

00609 {
00610     // Ask the base class to do its bit
00611     Node::CopyNodeContents(NodeCopy);
00612 
00613     // copy specifics
00614     NodeCopy->CharMatrix = CharMatrix;
00615     NodeCopy->PosInLine  = PosInLine;
00616 }

BOOL VisibleTextNode::DoMoveNode UndoableOperation pUndoOp,
Node pDestNode,
AttachNodeDirection  Direction
 

Move this VTN to the specified location, flagging it 'Affected' in the old and new position.

Author:
Ed_Cornes (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/2/96
Parameters:
pUndoOp - pointer to undoable operation (NULL if not undoable) [INPUTS] pDestNode - pointer to node to attach to Direction - direction to attach in
Returns:
FALSE if fails

Definition at line 955 of file nodetext.cpp.

00958 {
00959     ERROR2IF(pDestNode==NULL,FALSE,"VisibleTextNode::DoMoveNode() - pDestNode==NULL");
00960     TextStory* pTextStory = this->FindParentStory();
00961     ERROR2IF(pTextStory==NULL,FALSE,"VisibleTextNode::DoMoveNode() - caret has no parent story!");
00962 
00963     // flag node affected in old position (and parents)
00964     FlagNodeAndDescendantsAffectedAndParentsHaveDescendantAffected();
00965     
00966     // if selected, deselect to maintain 'parent of selected' flag
00967     BOOL selected = IsSelected();
00968     if (selected)
00969         SetSelected(FALSE);
00970 
00971     // if the caret (remember its position if undoable) always move it non-undoably
00972     // else just move the char, non-undoably if required
00973     // Note:must remember caret's old pos as if it is moved onto a new line,
00974     //      when it is undone, the caret will be a child of the hidden line
00975     //      and PrePostTextAction cannot cope with restoring the caret once hidden
00976     if (this->IsACaret())
00977     {
00978 #if !defined(EXCLUDE_FROM_RALPH)
00979         if (pUndoOp!=NULL)
00980             if (!PositionCaretAction::DoStoreCaretPosition(pUndoOp,pTextStory))
00981                 return FALSE;
00982 #endif
00983         MoveNode(pDestNode,Direction);
00984     }
00985     else
00986     {
00987         if (pUndoOp==NULL)
00988             MoveNode(pDestNode,Direction);
00989         else
00990             if (pUndoOp->DoMoveNode(this, pDestNode, Direction)==FALSE)
00991                 return FALSE;
00992     }
00993 
00994     // if was selected, reselect to maintain 'parent of selected' flag
00995     if (selected)
00996         SetSelected(TRUE);
00997 
00998     // flag node affected in new position (so parents flagged correctly)
00999     FlagNodeAndDescendantsAffectedAndParentsHaveDescendantAffected();
01000 
01001     return TRUE;
01002 }

BOOL VisibleTextNode::DoMoveNodes UndoableOperation pUndoOp,
VisibleTextNode pLastVTN,
Node pDestNode,
AttachNodeDirection  Direction
 

Move ALL nodes from this VTN to LastVTN to pDestNode in the specified direction Assumes: First and last VTNs are on the same line Note: only VTN in range are moved so hidden nodes don't cause undo bloat!

Author:
Ed_Cornes (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/2/96
Parameters:
pUndoOp - pointer to undoable operation (NULL if not undoable) [INPUTS] pLastVTN - pointer to VTN after last node to move (must be on the same line as this) pDestNode - pointer to node to attach to Direction - direction to attach in
Returns:
FALSE if fails

Definition at line 913 of file nodetext.cpp.

00917 {
00918     ERROR2IF( pLastVTN==NULL,FALSE,"VisibleTextNode::DoMoveNodes() - pLastVTN==NULL");
00919     ERROR2IF(pDestNode==NULL,FALSE,"VisibleTextNode::DoMoveNodes() - pDestNode==NULL");
00920 
00921     // move all VTN in the range to the specified location
00922     // however, can only move the caret once there are are some cahrs on the new line
00923     Node*            pPrevDestNode = pDestNode;
00924     VisibleTextNode* pSrcVTN       = this;
00925     while (pPrevDestNode!=pLastVTN)
00926     {
00927         ERROR2IF(pSrcVTN==NULL,FALSE,"VisibleTextNode::DoMoveNodes() - did not find pLastVTN");
00928         VisibleTextNode* pNextSrcVTN = pSrcVTN->FindNextVTNInLine();
00929         if (pSrcVTN->DoMoveNode(pUndoOp, pPrevDestNode, Direction)==FALSE)
00930             return FALSE;
00931         Direction     = NEXT;       // all subsequent VTN moved after previous
00932         pPrevDestNode = pSrcVTN;
00933         pSrcVTN = pNextSrcVTN;
00934     }
00935 
00936     return TRUE;
00937 }

AbstractTextChar * VisibleTextNode::FindNextAbstractTextCharInLine  ) 
 

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/3/97
Returns:
A pointer to the next AbstractTextChar in the line

Definition at line 443 of file nodetext.cpp.

00444 {
00445     Node* pNode = FindNext();
00446     while (pNode!=NULL && pNode->IsAnAbstractTextChar()==FALSE)
00447         pNode = pNode->FindNext();
00448 
00449     return (AbstractTextChar*)pNode;
00450 } 

AbstractTextChar * VisibleTextNode::FindNextAbstractTextCharInStory  ) 
 

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/3/95
Returns:
A pointer to the next AbstractTextChar in the TextStory

Definition at line 354 of file nodetext.cpp.

00355 {
00356     VisibleTextNode* pChar = FindNextVTNInStory();
00357     while (pChar!=NULL && !pChar->IsAnAbstractTextChar())
00358         pChar = pChar->FindNextVTNInStory();
00359 
00360     return (AbstractTextChar*)pChar;
00361 } 

TextChar * VisibleTextNode::FindNextTextCharInStory  ) 
 

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/3/95
Returns:
A pointer to the next TextChar in the TextStory

Definition at line 390 of file nodetext.cpp.

00391 {
00392     VisibleTextNode* pChar = FindNextVTNInStory();
00393     while (pChar!=NULL && !IS_A(pChar,TextChar))
00394         pChar = pChar->FindNextVTNInStory();
00395 
00396     return (TextChar*)pChar;
00397 } 

VisibleTextNode * VisibleTextNode::FindNextVTNInLine  ) 
 

Author:
Ed_Cornes (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/1/96
Returns:
A pointer to the next VTN in the line

Definition at line 426 of file nodetext.cpp.

00427 {
00428     Node* pNode = FindNext();
00429     while (pNode!=NULL && pNode->IsAVisibleTextNode()==FALSE)
00430         pNode = pNode->FindNext();
00431 
00432     return (VisibleTextNode*)pNode;
00433 } 

VisibleTextNode * VisibleTextNode::FindNextVTNInStory  ) 
 

Finds the next VisibleTextNode in the TextStory. The routine searches across TextLines.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/2/95
Returns:
A pointer to the next VisibleTextNode in the TextStory

Errors: An ERROR3 will be caused if the node is not on a line which is the child of a TextStory.

Definition at line 228 of file nodetext.cpp.

00229 {
00230     Node* Line = FindParent(); 
00231 
00232     // Be cautious
00233     ERROR3IF(Line == NULL, "VisibleTextNode has no parent"); 
00234     ERROR3IF(!(IS_A(Line, TextLine)), "Parent of VisibleTextNode is not a TextLine"); 
00235 
00236     Node* Story = Line->FindParent(); 
00237 
00238     ERROR3IF(Story == NULL, "TextLine has no parent"); 
00239     ERROR3IF(!(IS_A(Story, TextStory)), "Parent of TextLine is not a TextStory"); 
00240 
00241     Node* n = this; 
00242 
00243     // Loop until we have found a next VisibleTextNode
00244     // This code is an optimised depth first routine
00245     do
00246     {
00247         if (n->FindNext())  // Has the current node got a next sibling
00248         {
00249             n = n->FindNext();  // Let's visit it 
00250 
00251             if (IS_A(n,TextLine))
00252             {
00253                 // We have skipped to the next line, let's go to its first child if
00254                 // it has one
00255                 if (n->FindFirstChild())
00256                 {
00257                     n = n->FindFirstChild(); 
00258                 }
00259             }
00260 
00261             if (n->IsAVisibleTextNode())
00262             {
00263                 // Found one !
00264                 return (VisibleTextNode*)n; 
00265             }
00266 
00267         }
00268         else
00269         {
00270             // The only way is up 
00271             n = n->FindParent(); 
00272         }   
00273         ERROR3IF(n == NULL, "We haven't found the parent TextStory"); 
00274     }
00275     while (n != Story);
00276 
00277     return NULL; // No more  
00278 } 

TextLine * VisibleTextNode::FindParentLine  ) 
 

Author:
Ed_Cornes (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/7/96
Returns:
A pointer to the parent TextLine

Definition at line 496 of file nodetext.cpp.

00497 {
00498     return (TextLine*)(this->FindParent(CC_RUNTIME_CLASS(TextLine)));
00499 } 

AbstractTextChar * VisibleTextNode::FindPrevAbstractTextCharInLine  ) 
 

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/3/97
Returns:
A pointer to the prev AbstractTextChar in the line

Definition at line 479 of file nodetext.cpp.

00480 {
00481     Node* pNode = FindPrevious();
00482     while (pNode!=NULL && pNode->IsAnAbstractTextChar()==FALSE)
00483         pNode = pNode->FindPrevious();
00484 
00485     return (AbstractTextChar*)pNode;
00486 } 

AbstractTextChar * VisibleTextNode::FindPrevAbstractTextCharInStory  ) 
 

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/3/95
Returns:
A pointer to the previous AbstractTextChar in the TextStory

Definition at line 372 of file nodetext.cpp.

00373 {
00374     VisibleTextNode* pChar = FindPrevVTNInStory();
00375     while (pChar!=NULL && !pChar->IsAnAbstractTextChar())
00376         pChar = pChar->FindPrevVTNInStory();
00377 
00378     return (AbstractTextChar*)pChar;
00379 } 

TextChar * VisibleTextNode::FindPrevTextCharInStory  ) 
 

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/3/95
Returns:
A pointer to the previous TextChar in the TextStory

Definition at line 408 of file nodetext.cpp.

00409 {
00410     VisibleTextNode* pChar = FindPrevVTNInStory();
00411     while (pChar!=NULL && !IS_A(pChar,TextChar))
00412         pChar = pChar->FindPrevVTNInStory();
00413 
00414     return (TextChar*)pChar;
00415 } 

VisibleTextNode * VisibleTextNode::FindPrevVTNInLine  ) 
 

Author:
Ed_Cornes (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/1/96
Returns:
A pointer to the previous VTN in the line

Definition at line 462 of file nodetext.cpp.

00463 {
00464     Node* pNode = FindPrevious();
00465     while (pNode!=NULL && pNode->IsAVisibleTextNode()==FALSE)
00466         pNode = pNode->FindPrevious();
00467 
00468     return (VisibleTextNode*)pNode;
00469 } 

VisibleTextNode * VisibleTextNode::FindPrevVTNInStory  ) 
 

Finds the previous VisibleTextNode in the TextStory. The routine searches across TextLines.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/2/95
Returns:
A pointer to the previous VisibleTextNode in the TextStory

Errors: An ERROR3 will be caused if the node is not on a line which is the child of a TextStory.

Definition at line 293 of file nodetext.cpp.

00294 {
00295     Node* Line = FindParent(); 
00296 
00297     // Be cautious
00298     ERROR3IF(Line == NULL, "VisibleTextNode has no parent"); 
00299     ERROR3IF(!(IS_A(Line, TextLine)), "Parent of VisibleTextNode is not a TextLine"); 
00300 
00301     Node* Story = Line->FindParent(); 
00302 
00303     ERROR3IF(Story == NULL, "TextLine has no parent"); 
00304     ERROR3IF(!(IS_A(Story, TextStory)), "Parent of TextLine is not a TextStory"); 
00305 
00306     Node* n = this; 
00307 
00308     // Loop until we have found a previous VisibleTextNode
00309     // This code is an optimised prev depth first routine
00310     do
00311     {
00312         if (n->FindPrevious())      // Has the current node got a previous sibling
00313         {
00314             n = n->FindPrevious();  // Let's visit it 
00315 
00316             if (IS_A(n, TextLine))
00317             {
00318                 // Next node to check is the last child of this TextLine
00319                 Node* LastChild = n->FindLastChild(); 
00320                 if (LastChild != NULL)
00321                 {
00322                     n = LastChild;
00323                 } 
00324             }                                 
00325 
00326             if (n->IsAVisibleTextNode())
00327             {
00328                 // Found one !
00329                 return (VisibleTextNode*)n; 
00330             }
00331 
00332         }
00333         else
00334         {
00335             // The only way is up 
00336             n = n->FindParent(); 
00337         }   
00338         ERROR3IF(n == NULL, "We haven't found the parent TextStory"); 
00339     }
00340     while (n != Story);
00341 
00342     return NULL; // No more  
00343 } 

virtual MILLIPOINT VisibleTextNode::GetAutoKernSize FormatRegion  )  [inline, virtual]
 

Reimplemented in TextChar.

Definition at line 184 of file nodetext.h.

00184 { return 0; }   // Jonathan (17/10/2000

virtual MILLIPOINT VisibleTextNode::GetBaseLineShift  )  [inline, virtual]
 

Reimplemented in AbstractTextChar.

Definition at line 183 of file nodetext.h.

00183 { return 0; }

virtual MILLIPOINT VisibleTextNode::GetCharAdvance  )  [inline, virtual]
 

Reimplemented in AbstractTextChar.

Definition at line 181 of file nodetext.h.

00181 { return 0; }

virtual MILLIPOINT VisibleTextNode::GetCharWidth  )  [inline, virtual]
 

Reimplemented in AbstractTextChar.

Definition at line 182 of file nodetext.h.

00182 { return 0; }

CopyType VisibleTextNode::GetCopyType  )  [virtual]
 

This function returns a type describing how this object is to be copied. The fuction is called from the low level copy operation CopyObjects. There are two options at present, these being SIMPLECOPY and COMPLEXCOPY. SIMPLECOPY indicates that the node can be copied by a call to its virtual function SimpleCopy(). COMPLEXCOPY however indicates that the node needs to do its own thing when copying and must be called via the ComplexCopy() virtual function. This virtual will likely return a tree of copied objects rather than just a copy of itself.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/5/95
Returns:
A copy type describing how to copy this object

Reimplemented from Node.

Definition at line 519 of file nodetext.cpp.

00520 {
00521     return COMPLEXCOPY;
00522 }

void VisibleTextNode::GetDebugDetails StringBase Str  )  [virtual]
 

For obtaining debug information about the Node. This fn can be deleted before we ship.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/2/95
Parameters:
Str,: String giving debug info about the node [OUTPUTS]

Reimplemented from NodeRenderableBounded.

Reimplemented in AbstractTextChar, TextChar, KernCode, CaretNode, and EOLNode.

Definition at line 687 of file nodetext.cpp.

00688 {
00689 #if DEBUG_TREE
00690     BaseTextClass::GetDebugDetails(Str);
00691 
00692     String_256 TempStr;
00693     String_256 TempStr2;
00694     TCHAR       floatStr[20];
00695 
00696     // dump the character matrix
00697     fixed16 abcd[4];
00698     INT32   ef[2];
00699     CharMatrix.GetComponents(abcd, ef);
00700 
00701     TempStr._MakeMsg( TEXT("\r\nMatrix\r\n"));   
00702     (*Str) += TempStr;
00703     camSnprintf( floatStr, 20, _T("%f,%f"), abcd[0].MakeDouble(), abcd[1].MakeDouble());
00704     TempStr._MakeMsg( TEXT("a, b :\t#1%s\r\n"), floatStr);
00705     (*Str) += TempStr;
00706     camSnprintf( floatStr, 20, _T("%f,%f"), abcd[2].MakeDouble(), abcd[3].MakeDouble());
00707     TempStr._MakeMsg( TEXT("c, d :\t#1%s\r\n"), floatStr);
00708     (*Str) += TempStr;
00709     TempStr._MakeMsg( TEXT("e, f :\t#1%ld,\t#2%ld\r\n"), ef[0], ef[1]);
00710     (*Str) += TempStr;
00711 #endif
00712 }

Matrix VisibleTextNode::GetMatrix  )  [inline]
 

Definition at line 191 of file nodetext.h.

00191 { return CharMatrix; }

UINT32 VisibleTextNode::GetNodeSize  )  const [virtual]
 

For finding the size of the VisibleTextNode.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/12/94
Returns:
The size of the node in bytes

Reimplemented from Node.

Reimplemented in AbstractTextChar, TextChar, KernCode, HorizontalTab, CaretNode, and EOLNode.

Definition at line 670 of file nodetext.cpp.

00671 {
00672     ERROR3("Tring to find the size of abstract VisibleTextNode"); 
00673     return (sizeof(VisibleTextNode)); 
00674 }

Matrix* VisibleTextNode::GetpMatrix  )  [inline]
 

Definition at line 192 of file nodetext.h.

00192 { return &CharMatrix; }

MILLIPOINT VisibleTextNode::GetPosInLine  )  [inline]
 

Definition at line 187 of file nodetext.h.

00187 { return PosInLine; }

BOOL VisibleTextNode::GetStoryAndCharMatrix Matrix pMatrix  ) 
 

set the given matrix to be the concatenation of the TextStory and VTN matrices

Author:
Ed_Cornes (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/3/95
Parameters:
pMatrix - output matrix [OUTPUTS] Reutrns: FALSE if fails

Definition at line 725 of file nodetext.cpp.

00726 {
00727     ERROR2IF(pMatrix==NULL,FALSE,"VisibleTextNode::GetStoryAndCharMatrix() - pMatrix==NULL");
00728 
00729     // get the VTN matrix, then concatenate the TextStory matrix
00730     *pMatrix=CharMatrix;
00731     TextStory* pTextStory = this->FindParentStory();
00732     ERROR2IF(pTextStory==NULL,FALSE,"VisibleTextNode::GetStoryAndCharMatrix() - pTextStory==NULL");
00733     *pMatrix*=*(pTextStory->GetpStoryMatrix());
00734 
00735     return TRUE;
00736  }

void VisibleTextNode::Init void   )  [protected]
 

Initialise the members of a VisibleTextNode. Called by all constructors.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/3/95

Reimplemented from BaseTextClass.

Reimplemented in AbstractTextChar.

Definition at line 208 of file nodetext.cpp.

00209 {
00210     CharMatrix          = Matrix(0,0);
00211     PosInLine           = 0;
00212     IsBoundingRectValid = FALSE;
00213 }

virtual BOOL VisibleTextNode::IsACaret  )  const [inline, virtual]
 

Reimplemented in CaretNode.

Definition at line 174 of file nodetext.h.

00174 { return FALSE; }

virtual BOOL VisibleTextNode::IsADecimalPoint  )  [inline, virtual]
 

Definition at line 179 of file nodetext.h.

00179 { return FALSE; }

virtual BOOL VisibleTextNode::IsAHyphen  )  [inline, virtual]
 

Reimplemented in TextChar.

Definition at line 178 of file nodetext.h.

00178 { return FALSE; }

virtual BOOL VisibleTextNode::IsAnEOLNode  )  const [inline, virtual]
 

Reimplemented in EOLNode.

Definition at line 175 of file nodetext.h.

00175 { return FALSE; }

virtual BOOL VisibleTextNode::IsASpace  )  [inline, virtual]
 

Reimplemented in TextChar.

Definition at line 176 of file nodetext.h.

00176 { return FALSE; }

virtual BOOL VisibleTextNode::IsAVisibleSpace  )  [inline, virtual]
 

Reimplemented in TextChar.

Definition at line 177 of file nodetext.h.

00177 { return FALSE; }

virtual BOOL VisibleTextNode::IsAVisibleTextNode  )  const [inline, virtual]
 

Reimplemented from Node.

Definition at line 173 of file nodetext.h.

00173 { return TRUE;  }

BOOL VisibleTextNode::OnNodePopUp Spread pSpread,
DocCoord  PointerPos,
ContextMenu pMenu
[virtual]
 

Allows the VisibleTextNode to respond to pop up menu clicks on itself.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
06/10/95
Parameters:
pSpread The spread in which things are happening [INPUTS] PointerPos The Location of the mouse pointer at the time of the click pMenu The menu to which items should be added
Returns:
BOOL - TRUE if the node claims the click as its own and FALSE if it is not interested in the click

Reimplemented from NodeRenderableInk.

Definition at line 1164 of file nodetext.cpp.

01165 {
01166     TextStory* pStory = this->FindParentStory();
01167 
01168     if (pStory!=NULL && pStory->IsSelected())
01169         return pStory->OnNodePopUp(pSpread, PointerPos, pMenu);
01170     else
01171         return FALSE;
01172 }

BOOL VisibleTextNode::RenderChildAttrs RenderRegion pRenderRegion  ) 
 

Render any first level children attributes into the region.

Author:
Ed_Cornes (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/4/95
Parameters:
pRenderRegion - [INPUTS]
Returns:
FALSE if fails

Definition at line 749 of file nodetext.cpp.

00750 {
00751     ERROR2IF(pRenderRegion==NULL,FALSE,"VisibleTextNode::RenderChildAttrs() - pRenderRegion==NULL");
00752 
00753     Node* pChildNode=FindFirstChild();
00754     while (pChildNode)
00755     {
00756         if (pChildNode->IsAnAttribute())
00757             pChildNode->Render(pRenderRegion);
00758         pChildNode=pChildNode->FindNext();
00759     }
00760 
00761     return TRUE;
00762 }

void VisibleTextNode::ScrollToShow  ) 
 

If this VTN is not fully on the screen then the screen is scrolled so the VTN is more visible.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/4/95

Definition at line 1014 of file nodetext.cpp.

01015 {
01016 #if !defined(EXCLUDE_FROM_RALPH)
01017     DocView* pDocView = DocView::GetSelected();
01018     Spread* pSpread = FindParentSpread();       
01019 
01020     if (pDocView!=NULL && pSpread!=NULL)
01021     {
01022         DocRect ScreenArea = GetBlobBoundingRect();
01023 
01024         // Get the extent of the current view and convert to spread coordinates.
01025         DocRect WorkArea = pDocView->GetDocViewRect(pSpread);
01026         pSpread->DocCoordToSpreadCoord(&WorkArea);
01027 
01028         BOOL Scroll = FALSE;
01029         DocCoord WindowTopLeft;
01030         DocCoord Offset(0,0);       // Amount to offset current TopLeft by
01031     
01032         if (!WorkArea.ContainsRect(ScreenArea))
01033         {
01034             if (WorkArea.Height() > ScreenArea.Height() && WorkArea.Width() > ScreenArea.Width())
01035             {
01036                 const double Shift = 0.05;
01037 
01038                 if (ScreenArea.hi.y > WorkArea.hi.y)
01039                     Offset.y = ScreenArea.hi.y-WorkArea.hi.y + (INT32)(WorkArea.Height()*Shift);
01040 
01041                 if (ScreenArea.lo.y < WorkArea.lo.y)
01042                     Offset.y = ScreenArea.lo.y-WorkArea.lo.y - (INT32)(WorkArea.Height()*Shift);
01043 
01044                 if (ScreenArea.hi.x > WorkArea.hi.x)
01045                     Offset.x = ScreenArea.hi.x-WorkArea.hi.x + (INT32)(WorkArea.Width()*Shift);
01046 
01047                 if (ScreenArea.lo.x < WorkArea.lo.x)
01048                     Offset.x = ScreenArea.lo.x-WorkArea.lo.x - (INT32)(WorkArea.Width()*Shift);
01049 
01050                 if (Offset != DocCoord(0,0))
01051                 {
01052                     Scroll = TRUE;
01053                     WindowTopLeft = DocCoord(WorkArea.lo.x, WorkArea.hi.y) + Offset;
01054                 }
01055             }
01056             else
01057             {
01058                 // Cannot contain object on screen.  Centre it.
01059                 Scroll = TRUE;
01060                 DocCoord CentreOfObject((ScreenArea.lo.x+ScreenArea.hi.x)/2, (ScreenArea.lo.y+ScreenArea.hi.y)/2);
01061 
01062                 WindowTopLeft = DocCoord(CentreOfObject.x-WorkArea.Width()/2,CentreOfObject.y+WorkArea.Height()/2);
01063             }
01064         }
01065 
01066         // Now scroll to the new position
01067         if (Scroll)
01068         {
01069             // First, ensure that the spread's pasteboard is large enough to include this node
01070             // This is pretty quick if it is big enough.
01071             pSpread->ExpandPasteboardToInclude(GetBoundingRect());
01072 
01073             // Convert the window coordinate from Spread to Document coords...
01074             pSpread->SpreadCoordToDocCoord(&WindowTopLeft);
01075 
01076             // ...and thence to Logical coordinates
01077             WorkCoord WTL = WindowTopLeft.ToWork(pSpread, pDocView);
01078             pDocView->SetScrollOffsets(WTL, TRUE);
01079 
01080             // New stuff added by Will 29/6/95
01081             // Now we have scrolled the View, we need to invalidate the newly visible areas,
01082             // so that any blob rendering knows that the area has a pending redraw.
01083             // If we wait for the Paint message from the OS, then it will be too late.
01084 
01085             // First we get the new extent of the view we just scrolled and convert to spread coordinates.
01086             WorkArea = pDocView->GetDocViewRect(pSpread);
01087             pSpread->DocCoordToSpreadCoord(&WorkArea);
01088 
01089             DocRect Invalid;
01090 
01091             if (Offset.x != 0)
01092             {
01093                 // Get the invalid horizontal scroll rect, by subtracting the x scroll offset
01094                 // from the left or right edge of the screen (depending on which way we scrolled)
01095                 Invalid.lo.x = Offset.x > 0 ? WorkArea.hi.x - Offset.x : WorkArea.lo.x;
01096                 Invalid.lo.y = WorkArea.lo.y;
01097                 Invalid.hi.x = Offset.x > 0 ? WorkArea.hi.x : WorkArea.lo.x - Offset.x;
01098                 Invalid.hi.y = WorkArea.hi.y;
01099 
01100                 // and invalidate it
01101                 pDocView->ForceRedraw(pSpread, Invalid);
01102             }
01103 
01104             if (Offset.y != 0)
01105             {
01106                 // Get the invalid vertical scroll rect, by subtracting the y scroll offset
01107                 // from the top or bottom edge of the screen (depending on which way we scrolled)
01108                 Invalid.lo.x = WorkArea.lo.x;
01109                 Invalid.lo.y = Offset.y > 0 ? WorkArea.hi.y - Offset.y : WorkArea.lo.y;
01110                 Invalid.hi.x = WorkArea.hi.x;
01111                 Invalid.hi.y = Offset.y > 0 ? WorkArea.hi.y : WorkArea.lo.y - Offset.y;
01112 
01113                 // and invalidate it
01114                 pDocView->ForceRedraw(pSpread, Invalid);
01115             }
01116         }
01117     }
01118 #endif
01119 }

void VisibleTextNode::SetMatrix const Matrix matrix  )  [inline]
 

Definition at line 190 of file nodetext.h.

00190 { CharMatrix = matrix; }

void VisibleTextNode::SetPosInLine MILLIPOINT  x  )  [inline]
 

Definition at line 188 of file nodetext.h.

00188 { PosInLine=x; }

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

It is illegal to copy a VisibleTextNode (it's abstract), therefore this function will generate an error if called.

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

Reimplemented from BaseTextClass.

Reimplemented in AbstractTextChar, TextChar, KernCode, HorizontalTab, CaretNode, and EOLNode.

Definition at line 535 of file nodetext.cpp.

00536 {
00537     ERROR2(NULL, "Trying to copy abstract VisibleTextNode !"); 
00538 }

virtual BOOL VisibleTextNode::ValidateBoundingRect FormatRegion pFormatRegion = NULL  )  [inline, virtual]
 

Reimplemented in CaretNode, and EOLNode.

Definition at line 163 of file nodetext.h.

00164         { ERROR2(FALSE,"VisibleTextNode::ValidateBoundingRect() - should never be called!"); }

BOOL VisibleTextNode::WrapFromStartOfLineBack UndoableOperation pUndoOp  ) 
 

Wrap all chars upto this VTN (inc) back to the end of the previous line If this line is then empty, hide it.

Author:
Ed_Cornes (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/7/96
Parameters:
pUndoOp - pointer to undoable operation [INPUTS]
Returns:
FALSE if fails

Definition at line 863 of file nodetext.cpp.

00864 {
00865     // get info about this and previous line
00866     TextLine* pThisLine = this->FindParentLine();
00867     ERROR2IF(pThisLine==NULL,FALSE,"VisibleTextNode::WrapFromStartOfLineBack() - pThisLine==NULL");
00868     VisibleTextNode* pFirstVTN = pThisLine->FindFirstVTN();
00869     ERROR2IF(pFirstVTN==NULL,FALSE,"VisibleTextNode::WrapFromStartOfLineBack() - no VTN on this line!");
00870     TextLine* pPrevLine = pThisLine->FindPrevLine();
00871     ERROR2IF(pPrevLine==NULL,FALSE,"VisibleTextNode::WrapFromStartOfLineBack() - pPrevLine==NULL");
00872     ERROR2IF(pPrevLine->FindEOLNode()!=NULL,FALSE,"VisibleTextNode::WrapFromStartOfLineBack() - trying to wrap back onto a hard line!");
00873 
00874     // get a set of non line level attrs, which are to be localised to char level
00875     AttrTypeSet NonLineLevelAttrs;
00876     BOOL    ok = pThisLine->AddNonLineLevelDescendantAttrsToSet(&NonLineLevelAttrs);
00877     if (ok) ok = pPrevLine->AddNonLineLevelDescendantAttrsToSet(&NonLineLevelAttrs);
00878 
00879     // move ALL the nodes from first VTN on line to this VTN back to end of prev line
00880     // if wrapping whole line back, hide the empty line
00881     // since previous line is soft assumes this and prev lines have same line level attrs
00882     // Localise/FactorOut global as Line Level attrs on story may change change
00883     BOOL WholeLine = (this->FindNextVTNInLine()==NULL);
00884     if (ok) ok = pThisLine->DoLocaliseCommonAttributes(pUndoOp,FALSE,TRUE,&NonLineLevelAttrs);
00885     if (ok) ok = pPrevLine->DoLocaliseCommonAttributes(pUndoOp,FALSE,TRUE,&NonLineLevelAttrs);
00886     if (ok) ok = pFirstVTN->DoMoveNodes(pUndoOp, this, pPrevLine, LASTCHILD);
00887     if (ok &&  WholeLine) ok = pThisLine->DoHideNode(pUndoOp);
00888     if (ok && !WholeLine) ok = pThisLine->DoFactorOutCommonChildAttributes(pUndoOp,TRUE,&NonLineLevelAttrs);
00889     if (ok) ok = pPrevLine->DoFactorOutCommonChildAttributes(pUndoOp,TRUE,&NonLineLevelAttrs);
00890 
00891     return ok;
00892 }

BOOL VisibleTextNode::WrapRestOfLineForward UndoableOperation pUndoOp  ) 
 

Wrap all nodes from this VTN (inc) to last VTN forward to start of next line If the line containing this VTN is hard (ends in an EOL) create a new line to wrap the text onto.

Author:
Ed_Cornes (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/7/96
Parameters:
pUndoOp - pointer to undoable op [INPUTS]
Returns:
FALSE if fails

Definition at line 798 of file nodetext.cpp.

00799 {
00800     // get info about the source line
00801     TextLine* pSrcLine = this->FindParentLine();
00802     ERROR2IF(pSrcLine==NULL,FALSE,"VisibleTextNode::WrapRestOfLineForward() - pSrcLine==NULL");
00803     VisibleTextNode* pLastVTNToMove = pSrcLine->FindLastVTN();
00804     ERROR2IF(pLastVTNToMove==NULL,FALSE,"VisibleTextNode::WrapRestOfLineForward() - no VTN's on soft line");
00805 
00806     // if SrcLine soft, find next line (localising non-LLA attrs on it) else create a new line
00807     AttrTypeSet* pAttrSet = NULL;   // assume creating new line so all attrs need localising
00808     TextLine*    pDstLine = NULL;
00809     BOOL         ok       = TRUE;
00810     if (pLastVTNToMove->IsAnEOLNode())
00811     {
00812         pDstLine = new TextLine;
00813         if (pDstLine==NULL)
00814             return FALSE;
00815         pSrcLine->CopyNodeContents(pDstLine);   // copy cached line level attr info
00816         if (ok) ok = pDstLine->DoInsertNewNode(pUndoOp,pSrcLine,NEXT);
00817     }
00818     else
00819     {
00820         pDstLine = pSrcLine->FindNextLine();
00821         ERROR2IF(pDstLine==NULL,FALSE,"VisibleTextNode::WrapRestOfLineForward() - no next line after soft line");
00822 
00823         pAttrSet = new AttrTypeSet();
00824         if (ok) ok = pSrcLine->AddNonLineLevelDescendantAttrsToSet(pAttrSet);
00825         if (ok) ok = pDstLine->AddNonLineLevelDescendantAttrsToSet(pAttrSet);
00826 
00827         if (ok) ok = pDstLine->DoLocaliseCommonAttributes(pUndoOp,FALSE,FALSE,pAttrSet);
00828     }
00829 
00830     // get context node and attach direction for attaching text as first objects in dest line
00831     Node* pAttachNode = pDstLine;
00832     AttachNodeDirection AttachDir = FIRSTCHILD;
00833     pDstLine->GetAttachNodeAndDirectionToAttachFirstChildObject(&pAttachNode,&AttachDir);
00834 
00835     // localise on SrcLine, move text to DstLine, then factor out on both
00836     // Localise/FactorOut not global as attrs on story should never change
00837     if (ok) ok = pSrcLine->DoLocaliseCommonAttributes(pUndoOp,FALSE,FALSE,pAttrSet);
00838     if (ok) ok = this->DoMoveNodes(pUndoOp, pLastVTNToMove, pAttachNode, AttachDir);
00839     if (ok) ok = pSrcLine->DoFactorOutCommonChildAttributes(pUndoOp,FALSE,pAttrSet);
00840     if (ok) ok = pDstLine->DoFactorOutCommonChildAttributes(pUndoOp,FALSE,pAttrSet);
00841 
00842     if (pAttrSet!=NULL)
00843     {
00844         pAttrSet->DeleteAll();
00845         delete pAttrSet;
00846     }
00847 
00848     return ok;
00849 }


Member Data Documentation

Matrix VisibleTextNode::CharMatrix [private]
 

Definition at line 200 of file nodetext.h.

MILLIPOINT VisibleTextNode::PosInLine [private]
 

Definition at line 201 of file nodetext.h.


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