fp_Line Class Reference

#include <fp_Line.h>

Inheritance diagram for fp_Line:

fp_Container fp_ContainerObject

List of all members.

Public Member Functions

 fp_Line (fl_SectionLayout *pSectionLayout)
 ~fp_Line ()
fl_BlockLayoutgetBlock (void) const
virtual UT_sint32 getHeight (void) const
 Return height of line as it will appear on screen.
virtual UT_sint32 getX (void) const
virtual UT_sint32 getY (void) const
UT_sint32 getMaxWidth (void) const
UT_sint32 getAscent (void) const
UT_sint32 getDescent (void) const
UT_sint32 getNumRunsInLine (void) const
UT_sint32 getColumnGap (void)
void setAssignedScreenHeight (UT_sint32)
bool assertLineListIntegrity (void)
void setMaxWidth (UT_sint32)
virtual void setX (UT_sint32 i, bool bDontClearIfNeeded=false)
virtual void setY (UT_sint32)
virtual void setContainer (fp_Container *)
void setBlock (fl_BlockLayout *pBlock)
fp_ContainergetColumn (void)
fp_PagegetPage (void)
virtual void setWidth (UT_sint32)
virtual void setHeight (UT_sint32 i)
virtual UT_sint32 getWidth (void) const
virtual UT_sint32 getDrawingWidth (void) const
UT_sint32 getWidthToRun (fp_Run *pLastRun)
UT_sint32 getFilledWidth (void)
virtual bool isVBreakable (void)
virtual bool isHBreakable (void)
virtual UT_sint32 wantVBreakAt (UT_sint32)
virtual UT_sint32 wantHBreakAt (UT_sint32)
virtual fp_ContainerObjectVBreakAt (UT_sint32)
virtual fp_ContainerObjectHBreakAt (UT_sint32)
virtual UT_uint32 distanceFromPoint (UT_sint32, UT_sint32)
virtual fp_ContainergetNextContainerInSection (void) const
virtual fp_ContainergetPrevContainerInSection (void) const
fp_RungetRunFromIndex (UT_uint32 runIndex)
bool containsForcedColumnBreak (void) const
bool containsForcedPageBreak (void) const
bool containsFootnoteReference (void)
bool getFootnoteContainers (UT_GenericVector< fp_FootnoteContainer * > *pvecFoots)
bool containsAnnotations (void)
bool getAnnotationContainers (UT_GenericVector< fp_AnnotationContainer * > *pvecAnnotations)
void addRun (fp_Run *)
void insertRunAfter (fp_Run *pRun1, fp_Run *pRun2)
void insertRunBefore (fp_Run *pNewRun, fp_Run *pBefore)
void insertRun (fp_Run *)
bool removeRun (fp_Run *, bool bTellTheRunAboutIt=true)
bool isEmpty (void) const
int countRuns (void) const
fp_RungetFirstRun (void) const
fp_RungetLastRun (void) const
fp_RungetLastTextRun (void) const
fp_RuncalculateWidthOfRun (UT_sint32 &iX, UT_uint32 iIndxVisual, FL_WORKING_DIRECTION eWorkingDirection, FL_WHICH_TABSTOP eUseTabStop)
void getWorkingDirectionAndTabstops (FL_WORKING_DIRECTION &eWorkingDirection, FL_WHICH_TABSTOP &eUseTabStop) const
bool isFirstLineInBlock (void) const
bool isLastLineInBlock (void) const
virtual UT_RectgetScreenRect ()
virtual void markDirtyOverlappingRuns (UT_Rect &recScreen)
void remove (void)
UT_sint32 getMarginBefore (void) const
UT_sint32 getMarginAfter (void) const
virtual void mapXYToPosition (UT_sint32 xPos, UT_sint32 yPos, PT_DocPosition &pos, bool &bBOL, bool &bEOL, bool &isTOC)
void getOffsets (fp_Run *pRun, UT_sint32 &xoff, UT_sint32 &yoff)
void getScreenOffsets (fp_Run *pRun, UT_sint32 &xoff, UT_sint32 &yoff)
virtual void clearScreen (void)
void clearScreenFromRunToEnd (UT_uint32 runIndex)
void clearScreenFromRunToEnd (fp_Run *pRun)
bool containsOffset (PT_DocPosition blockOffset)
void setScreenCleared (bool bisCleared)
bool isScreenCleared (void) const
void setAdditionalMargin (UT_sint32 iAccum)
virtual void draw (dg_DrawArgs *)
virtual void draw (GR_Graphics *)
void align (void)
void layout (void)
bool recalculateFields (UT_uint32 iUpdateCount)
void recalcHeight (fp_Run *pLast=NULL)
void recalcMaxWidth (bool bDontClearIfNeeded=false)
void setReformat (void)
void coalesceRuns (void)
UT_sint32 calculateWidthOfLine (void)
UT_sint32 calculateWidthOfTrailingSpaces (void)
void resetJustification (bool bPermanent)
void justify (UT_sint32 iAmount)
UT_uint32 countJustificationPoints (void)
bool isLastCharacter (UT_UCSChar Character) const
bool findNextTabStop (UT_sint32 iStartX, UT_sint32 &iPosition, eTabType &iType, eTabLeader &iLeader)
bool findPrevTabStop (UT_sint32 iStartX, UT_sint32 &iPosition, eTabType &iType, eTabLeader &iLeader)
void setNeedsRedraw (void)
bool needsRedraw (void)
bool redrawUpdate (void)
fp_RungetLastVisRun ()
fp_RungetFirstVisRun ()
UT_uint32 getVisIndx (fp_Run *pRun)
fp_RungetRunAtVisPos (UT_uint32 i)
void setMapOfRunsDirty ()
void addDirectionUsed (UT_BidiCharType dir, bool bRefreshMap=true)
void removeDirectionUsed (UT_BidiCharType dir, bool bRefreshMap=true)
void changeDirectionUsed (UT_BidiCharType oldDir, UT_BidiCharType newDir, bool bRefreshMap=true)
UT_sint32 getBreakTick (void) const
void setBreakTick (UT_sint32 iTick)
void setWrapped (bool bWrapped)
bool isWrapped (void) const
void setSameYAsPrevious (bool bSameAsPrevious)
bool isSameYAsPrevious (void) const
void genOverlapRects (UT_Rect &recLeft, UT_Rect &recRight)
bool canContainPoint () const

Protected Member Functions

void _calculateWidthOfRun (UT_sint32 &iX, fp_Run *pRun, UT_uint32 iIndx, UT_uint32 iCountRuns, FL_WORKING_DIRECTION eWorkingDirection, FL_WHICH_TABSTOP eUseTabStop, UT_BidiCharType iDomDirection)

Private Member Functions

void _splitRunsAtSpaces (void)
void _doClearScreenFromRunToEnd (UT_sint32 runIndex)
void setAscent (UT_sint32 i)
void setDescent (UT_sint32 i)
void setScreenHeight (UT_sint32 i)
UT_uint32 _getRunVisIndx (UT_uint32 indx)
UT_uint32 _getRunLogIndx (UT_uint32 indx)
UT_sint32 _createMapOfRuns ()
void _updateContainsFootnoteRef (void)

Private Attributes

fl_BlockLayoutm_pBlock
fp_Containerm_pContainer
UT_sint32 m_iWidth
UT_sint32 m_iMaxWidth
UT_sint32 m_iClearToPos
UT_sint32 m_iClearLeftOffset
UT_sint32 m_iHeight
UT_sint32 m_iScreenHeight
 Height assigned on screen -1 if undefined.
UT_sint32 m_iAscent
UT_sint32 m_iDescent
UT_sint32 m_iX
UT_sint32 m_iY
UT_GenericVector< fp_Run * > m_vecRuns
bool m_bNeedsRedraw
bool m_bMapDirty
UT_uint32 m_iRunsRTLcount
UT_uint32 m_iRunsLTRcount
UT_sint32 m_iMaxDirLevel
bool m_bIsCleared
bool m_bContainsFootnoteRef
UT_sint32 m_iBreakTick
bool m_bIsWrapped
bool m_bIsSameYAsPrevious
UT_sint32 m_iAdditionalMarginAfter

Static Private Attributes

static UT_sint32s_pOldXs = NULL
static UT_uint32 s_iOldXsSize = 0
static UT_uint32 s_iClassInstanceCounter = 0
static UT_Bytes_pEmbeddingLevels = 0
static UT_uint32s_pMapOfRunsL2V = 0
static UT_uint32s_pMapOfRunsV2L = 0
static UT_UCS4Chars_pPseudoString = 0
static UT_uint32 s_iMapOfRunsSize = 0
static fp_Lines_pMapOwner = 0

Friends

class fp_Run


Constructor & Destructor Documentation

fp_Line::fp_Line ( fl_SectionLayout pSectionLayout  ) 

fp_Line::~fp_Line (  ) 


Member Function Documentation

fl_BlockLayout* fp_Line::getBlock ( void   )  const [inline]

virtual UT_sint32 fp_Line::getHeight ( void   )  const [inline, virtual]

virtual UT_sint32 fp_Line::getX ( void   )  const [inline, virtual]

virtual UT_sint32 fp_Line::getY ( void   )  const [inline, virtual]

UT_sint32 fp_Line::getMaxWidth ( void   )  const [inline]

UT_sint32 fp_Line::getAscent ( void   )  const [inline]

UT_sint32 fp_Line::getDescent ( void   )  const [inline]

References fp_Run::m_iDescent.

Referenced by recalcHeight().

UT_sint32 fp_Line::getNumRunsInLine ( void   )  const [inline]

UT_sint32 fp_Line::getColumnGap ( void   ) 

Return the gap between columns.

References getColumn().

void fp_Line::setAssignedScreenHeight ( UT_sint32  iHeight  )  [virtual]

Set height assigned to line on screen

Parameters:
iHeight Height in screen units
While recalcHeight computes the height of the line as it will render on the screen, the fp_Column does the actual line layout and does so with greater accuracy. In particular, the line may be assigned a different height on the screen than what it asked for.

This function allows the line representation to reflect the actual screen layout size, which improves the precision of XY/position conversion functions.

Note:
This function is quite intentionally not called setHeight. It should only be called from fp_Column::layout.
See also:
fp_Column::layout Note by Sevior: This method is causing pixel dirt by making lines smaller than their calculated heights!

Implements fp_Container.

References m_iScreenHeight.

Referenced by fp_Column::layout().

bool fp_Line::assertLineListIntegrity ( void   ) 

void fp_Line::setMaxWidth ( UT_sint32  iMaxWidth  ) 

void fp_Line::setX ( UT_sint32  i,
bool  bDontClearIfNeeded = false 
) [virtual]

void fp_Line::setY ( UT_sint32  iY  )  [virtual]

Implements fp_ContainerObject.

References clearScreen(), and m_iY.

Referenced by fp_Column::layout(), and remove().

void fp_Line::setContainer ( fp_Container pContainer  )  [virtual]

void fp_Line::setBlock ( fl_BlockLayout pBlock  ) 

fp_Container * fp_Line::getColumn ( void   ) 

fp_Page * fp_Line::getPage ( void   ) 

virtual void fp_Line::setWidth ( UT_sint32   )  [inline, virtual]

Implements fp_ContainerObject.

virtual void fp_Line::setHeight ( UT_sint32  i  )  [inline, virtual]

virtual UT_sint32 fp_Line::getWidth ( void   )  const [inline, virtual]

UT_sint32 fp_Line::getDrawingWidth ( void   )  const [virtual]

UT_sint32 fp_Line::getWidthToRun ( fp_Run pLastRun  ) 

UT_sint32 fp_Line::getFilledWidth ( void   ) 

virtual bool fp_Line::isVBreakable ( void   )  [inline, virtual]

Implements fp_ContainerObject.

virtual bool fp_Line::isHBreakable ( void   )  [inline, virtual]

Implements fp_ContainerObject.

virtual UT_sint32 fp_Line::wantVBreakAt ( UT_sint32   )  [inline, virtual]

Implements fp_ContainerObject.

virtual UT_sint32 fp_Line::wantHBreakAt ( UT_sint32   )  [inline, virtual]

Implements fp_ContainerObject.

virtual fp_ContainerObject* fp_Line::VBreakAt ( UT_sint32   )  [inline, virtual]

Implements fp_ContainerObject.

virtual fp_ContainerObject* fp_Line::HBreakAt ( UT_sint32   )  [inline, virtual]

Implements fp_ContainerObject.

virtual UT_uint32 fp_Line::distanceFromPoint ( UT_sint32  ,
UT_sint32   
) [inline, virtual]

Implements fp_Container.

fp_Container * fp_Line::getNextContainerInSection ( void   )  const [virtual]

fp_Container * fp_Line::getPrevContainerInSection ( void   )  const [virtual]

fp_Run * fp_Line::getRunFromIndex ( UT_uint32  runIndex  ) 

Return a pointer to the run given by runIndex in the line

Parameters:
runIndex the nth run in the line
Returns:
fp_Run * pRun the pointer to the nth run

References UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), and m_vecRuns.

Referenced by containsAnnotations(), containsFootnoteReference(), getAnnotationContainers(), and getFootnoteContainers().

bool fp_Line::containsForcedColumnBreak ( void   )  const

bool fp_Line::containsForcedPageBreak ( void   )  const

bool fp_Line::containsFootnoteReference ( void   ) 

bool fp_Line::getFootnoteContainers ( UT_GenericVector< fp_FootnoteContainer * > *  pvecFoots  ) 

bool fp_Line::containsAnnotations ( void   ) 

bool fp_Line::getAnnotationContainers ( UT_GenericVector< fp_AnnotationContainer * > *  pvecAnnotations  ) 

void fp_Line::addRun ( fp_Run pNewRun  ) 

void fp_Line::insertRunAfter ( fp_Run pRun1,
fp_Run pRun2 
)

void fp_Line::insertRunBefore ( fp_Run pNewRun,
fp_Run pBefore 
)

void fp_Line::insertRun ( fp_Run pNewRun  ) 

bool fp_Line::removeRun ( fp_Run pRun,
bool  bTellTheRunAboutIt = true 
)

bool fp_Line::isEmpty ( void   )  const [inline]

Reimplemented from fp_Container.

Referenced by