#include <fp_TextRun.h>
anonymous enum [private] |
fp_TextRun::fp_TextRun | ( | fl_BlockLayout * | pBL, | |
UT_uint32 | iOffsetFirst, | |||
UT_uint32 | iLen, | |||
bool | bLookupProperties = true | |||
) |
fp_TextRun::~fp_TextRun | ( | ) | [virtual] |
References DELETEP, m_pItem, m_pRenderInfo, and xxx_UT_DEBUGMSG.
bool fp_TextRun::_addupCharWidths | ( | void | ) | [private] |
References fp_Run::_getFont(), fp_Run::_setWidth(), fp_Run::getGraphics(), fp_Run::getLength(), GR_Graphics::getTextWidth(), fp_Run::getWidth(), GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, GR_RenderInfo::m_pFont, m_pRenderInfo, and xxx_UT_DEBUGMSG.
Referenced by _recalcWidth(), and measureCharWidths().
bool fp_TextRun::_canContainPoint | ( | void | ) | const [protected, virtual] |
Reimplemented from fp_Run.
References fp_Run::getField().
void fp_TextRun::_clearScreen | ( | bool | bFullLineHeightRect = true |
) | [protected, virtual] |
Implements fp_Run.
References fp_Run::_getColorPG(), fp_Run::_getFont(), fp_Run::_getView(), GR_Graphics::DGP_SCREEN, fp_Run::Fill(), GR_Graphics::getClipRect(), FV_View::getColorFieldOffset(), fp_Run::getDescent(), fp_Run::getField(), fp_Run::getGraphics(), fp_Run::getHeight(), fp_Run::getLength(), fp_Run::getLine(), fp_Line::getMaxWidth(), fp_Run::getNextRun(), fp_Run::getPrevRun(), fp_Line::getScreenOffsets(), fp_Run::getTmpWidth(), fp_Run::getWidth(), fp_Run::getX(), iExtra, fp_Run::isSelectionDraw(), fp_Run::markAsDirty(), GR_Graphics::setClipRect(), GR_Graphics::setColor(), GR_Graphics::setFont(), GR_Graphics::tlu(), UT_ASSERT, UT_Rect::width, and xxx_UT_DEBUGMSG.
void fp_TextRun::_draw | ( | dg_DrawArgs * | pDA | ) | [protected, virtual] |
Implements fp_Run.
References _drawFirstChar(), _drawInvisibles(), _drawLastChar(), _fillRect(), fp_Run::_getColorHL(), fp_Run::_getDirection(), fp_Run::_getFont(), fp_Run::_getView(), _refreshDrawBuffer(), GR_Graphics::DGP_OPAQUEOVERLAY, GR_Graphics::DGP_SCREEN, fp_Run::drawDecors(), GR_Painter::drawLine(), fp_Run::Fill(), fl_BLOCK_STRUX_OFFSET, fp_Run::getAscent(), fp_Run::getBlock(), fp_Run::getBlockOffset(), FV_View::getColorFieldOffset(), FV_View::getColorSelBackground(), fl_ContainerLayout::getContainerType(), fp_Run::getDescent(), fl_BlockLayout::getDocLayout(), fp_Run::getFGColor(), fp_Run::getField(), GR_Graphics::getFontAscent(), GR_Graphics::getFontDescent(), GR_Graphics::getFontHeight(), fp_Run::getHeight(), fp_Run::getLength(), fp_Run::getLine(), fp_Run::getNextVisual(), FV_View::getPoint(), PD_StruxIterator::getPosition(), fl_BlockLayout::getPosition(), fp_Run::getPrevVisual(), fp_Line::getScreenRect(), FV_View::getSelectionAnchor(), FV_View::getSelectionMode(), FV_View::getShowPara(), fp_Run::getType(), GR_RenderInfo::getType(), FL_DocLayout::getView(), fp_Run::getVisDirection(), fp_Run::getWidth(), fp_Run::getY(), GR_Font::hashKey(), fl_CellLayout::isCellSelected(), fl_BlockLayout::isContainedByTOC(), fp_Run::isInSelectedTOC(), fp_Run::isSelectionDraw(), UT_Rect::left, m_bGrammarSquiggled, m_bIsOverhanging, m_bKeepWidths, m_bSpellSquiggled, m_fPosition, GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, GR_XPRenderInfo::m_iSegmentCount, fp_Run::m_iVisDirection, GR_RenderInfo::m_pFont, GR_RenderInfo::m_pGraphics, m_pRenderInfo, GR_XPRenderInfo::m_pSegmentOffset, GR_RenderInfo::m_pText, GR_RenderInfo::m_xoff, GR_RenderInfo::m_yoff, fl_ContainerLayout::myContainingLayout(), dg_DrawArgs::pG, GR_Graphics::prepareToRenderChars(), GR_Graphics::queryProperties(), GR_Painter::renderChars(), GR_Graphics::setColor(), GR_Graphics::setFont(), PD_StruxIterator::setPosition(), text, TEXT_POSITION_SUBSCRIPT, TEXT_POSITION_SUPERSCRIPT, GR_Graphics::tlu(), UT_ASSERT, UT_BIDI_LTR, UT_BIDI_RTL, UT_DEBUGMSG, UT_MAX, UT_MIN, UT_return_if_fail, UT_Rect::width, dg_DrawArgs::xoff, xxx_UT_DEBUGMSG, and dg_DrawArgs::yoff.
void fp_TextRun::_drawFirstChar | ( | bool | bSelection | ) | [protected] |
References fp_Run::_getFont(), fp_Run::_getView(), GR_Graphics::DGP_SCREEN, fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getFGColor(), fp_Run::getGraphics(), fp_Run::getLength(), fp_Run::getVisDirection(), m_bGrammarSquiggled, m_bSpellSquiggled, GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, GR_RenderInfo::m_pFont, m_pRenderInfo, GR_RenderInfo::m_pText, GR_Graphics::prepareToRenderChars(), GR_Graphics::queryProperties(), GR_Painter::renderChars(), s_bBidiOS, GR_Graphics::setColor(), GR_Graphics::setFont(), PD_StruxIterator::setPosition(), text, UT_BIDI_LTR, and UT_return_if_fail.
Referenced by _draw().
References _drawInvisibleSpaces(), GR_Graphics::DGP_SCREEN, and fp_Run::getGraphics().
Referenced by _draw().
References GR_Painter::fillRect(), fl_BLOCK_STRUX_OFFSET, fp_Run::getAscent(), fp_Run::getBlock(), fp_Run::getBlockOffset(), PD_StruxIterator::getChar(), FV_View::getColorShowPara(), fl_BlockLayout::getDocLayout(), fp_Run::getGraphics(), fp_Run::getLength(), PD_StruxIterator::getStatus(), GR_Graphics::getTextWidth(), FL_DocLayout::getView(), fp_Run::getVisDirection(), fp_Run::getWidth(), GR_OC_MAX_WIDTH, GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, m_pRenderInfo, text, UT_MAX, and UT_return_if_fail.
Referenced by _drawInvisibles().
void fp_TextRun::_drawLastChar | ( | bool | bSelection | ) | [protected] |
References fp_Run::_getFont(), fp_Run::_getView(), fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), FV_View::getColorSelForeground(), fp_Run::getFGColor(), fp_Run::getGraphics(), fp_Run::getLength(), GR_Graphics::getTextWidth(), fp_Run::getVisDirection(), GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, GR_RenderInfo::m_pFont, m_pRenderInfo, GR_RenderInfo::m_pText, GR_RenderInfo::m_xoff, GR_Graphics::prepareToRenderChars(), GR_Painter::renderChars(), GR_Graphics::setColor(), GR_Graphics::setFont(), PD_StruxIterator::setPosition(), text, UT_BIDI_LTR, and UT_return_if_fail.
Referenced by _draw().
void fp_TextRun::_fillRect | ( | UT_RGBColor & | clr, | |
UT_sint32 | xoff, | |||
UT_sint32 | yoff, | |||
UT_uint32 | iStart, | |||
UT_uint32 | iLen, | |||
UT_Rect & | rect, | |||
GR_Graphics * | pG | |||
) | [protected] |
References _getPartRect(), GR_Graphics::DGP_SCREEN, GR_Painter::fillRect(), fp_Line::getAscent(), fp_Run::getAscent(), fp_Run::getGraphics(), fp_Line::getHeight(), fp_Run::getLine(), UT_Rect::height, UT_Rect::left, UT_RGBColor::m_blu, UT_RGBColor::m_grn, UT_RGBColor::m_red, UT_Rect::top, UT_Rect::width, and xxx_UT_DEBUGMSG.
Referenced by _draw().
void fp_TextRun::_getPartRect | ( | UT_Rect * | pRect, | |
UT_sint32 | xoff, | |||
UT_sint32 | yoff, | |||
UT_uint32 | iStart, | |||
UT_uint32 | iLen | |||
) | [protected] |
References fp_Run::_getRefreshDrawBuffer(), _refreshDrawBuffer(), FP_CONTAINER_CELL, FP_CONTAINER_FRAME, fp_Run::getBlockOffset(), fp_ContainerObject::getContainerType(), fp_Run::getGraphics(), fp_Run::getHeight(), fp_Run::getLength(), fp_Run::getLine(), fp_Line::getScreenRect(), GR_Graphics::getTextWidth(), fp_Run::getVisDirection(), fp_Run::getWidth(), GRSR_Unknown, UT_Rect::height, UT_Rect::left, GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, m_pRenderInfo, UT_Rect::top, UT_ASSERT, UT_BIDI_LTR, UT_BIDI_RTL, UT_return_if_fail, UT_Rect::width, and xxx_UT_DEBUGMSG.
Referenced by _fillRect().
void fp_TextRun::_lookupProperties | ( | const PP_AttrProp * | pSpanAP, | |
const PP_AttrProp * | pBlockAP, | |||
const PP_AttrProp * | pSectionAP, | |||
GR_Graphics * | pG | |||
) | [private, virtual] |
Implements fp_Run.
References fp_Run::_getDecorations(), fp_Run::_getFont(), fp_Run::_orDecorations(), fp_Run::_setAscent(), fp_Run::_setColorFG(), fp_Run::_setDecorations(), fp_Run::_setDescent(), fp_Run::_setField(), fp_Run::_setFont(), fp_Run::_setHeight(), fp_Run::_setLineWidth(), FL_DocLayout::bgcrGrammar, FL_DocLayout::bgcrSpelling, breakMeAtDirBoundaries(), breakNeighborsAtDirBoundaries(), GR_ShapingInfo::CAPITALIZE, fp_Run::clearScreen(), fd, FL_DocLayout::findFont(), gchar, PP_AttrProp::getAttribute(), fp_Run::getBlock(), fp_Run::getBlockOffset(), UT_Language::getCodeFromCode(), PP_PropertyTypeColor::getColor(), fl_BlockLayout::getDocLayout(), fl_Layout::getDocument(), fp_Run::getField(), GR_Graphics::getFontAscent(), GR_Graphics::getFontDescent(), GR_Graphics::getFontHeight(), fp_Run::getGraphics(), getLanguage(), PD_Document::getStyle(), getTextTransform(), fp_Run::isPrinting(), GR_ShapingInfo::LOWERCASE, m_bIsOverhanging, m_bKeepWidths, GR_RenderInfo::m_eShapingResult, m_fPosition, m_iDirOverride, m_pLanguage, m_pRenderInfo, fp_Run::markDrawBufferDirty(), fp_Run::markWidthDirty(), PP_evalProperty(), PP_evalPropertyType(), Property_type_color, PT_STYLE_ATTRIBUTE_NAME, setDirection(), GR_Graphics::setFont(), setTextTransform(), fp_Run::TEXT_DECOR_BOTTOMLINE, fp_Run::TEXT_DECOR_LINETHROUGH, fp_Run::TEXT_DECOR_OVERLINE, fp_Run::TEXT_DECOR_TOPLINE, fp_Run::TEXT_DECOR_UNDERLINE, GR_ShapingInfo::UPPERCASE, PD_Style::used(), UT_ASSERT, UT_BIDI_UNSET, UT_convertToLogicalUnits(), and xxx_UT_DEBUGMSG.
bool fp_TextRun::_recalcWidth | ( | void | ) | [protected, virtual] |
Recalculates the width of our run, updating the block's width cache as required.
Reimplemented from fp_Run.
References _addupCharWidths(), fp_Run::_getRecalcWidth(), _refreshDrawBuffer(), and fp_Run::getWidth().
bool fp_TextRun::_refreshDrawBuffer | ( | ) | [private] |
Determines if the draw buffer (the run's cache of the text it draws on screen) is uptodate or not and recalculates it as required. If the contents of the buffer change, the block's width cache is updated and overall width recalculated.
References fp_Run::_getDirection(), fp_Run::_getFont(), fp_Run::_getRefreshDrawBuffer(), fp_Run::_setRefreshDrawBuffer(), appendTextToBuf(), GR_ShapingInfo::CAPITALIZE, fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getGraphics(), UT_GrowBuf::getLength(), fp_Run::getLength(), UT_GrowBuf::getPointer(), getPreviousInterestingRunForCapitalization(), fp_Run::getPrevRun(), getTextTransform(), GR_RenderInfo::getType(), fp_Run::getType(), fp_Run::getVisDirection(), GRSR_BufferClean, GRSR_Error, GRSR_Unknown, GR_RenderInfo::m_eShapingResult, m_iDirOverride, GR_XPRenderInfo::m_pChars, m_pItem, m_pLanguage, m_pRenderInfo, measureCharWidths(), s_bBidiOS, GR_Graphics::shape(), text, UT_ASSERT, UT_BIDI_LTR, UT_BIDI_RTL, UT_return_val_if_fail, and UT_UCS4_strnrev().
Referenced by _draw(), _getPartRect(), _recalcWidth(), adjustCaretPosition(), findPointCoords(), mapXYToPosition(), resetJustification(), and simpleRecalcWidth().
Reimplemented from fp_Run.
References _refreshDrawBuffer(), GR_Graphics::adjustCaretPosition(), DELETEP, fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getGraphics(), fp_Run::getLength(), PD_StruxIterator::getPosition(), fl_BlockLayout::getPosition(), PD_StruxIterator::getStatus(), PD_StruxIterator::getUpperLimit(), GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, m_pRenderInfo, GR_RenderInfo::m_pText, PD_StruxIterator::setUpperLimit(), text, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
Referenced by mapXYToPosition().
Reimplemented from fp_Run.
References GR_Graphics::adjustDeletePosition(), DELETEP, fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getGraphics(), fp_Run::getLength(), PD_StruxIterator::getPosition(), fl_BlockLayout::getPosition(), PD_StruxIterator::getStatus(), PD_StruxIterator::getUpperLimit(), GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, m_pRenderInfo, GR_RenderInfo::m_pText, PD_StruxIterator::setUpperLimit(), text, UT_return_if_fail, and xxx_UT_DEBUGMSG.
bool fp_TextRun::alwaysFits | ( | void | ) | const [virtual] |
Reimplemented from fp_Run.
References fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), PD_StruxIterator::getChar(), fp_Run::getLength(), PD_StruxIterator::getStatus(), and text.
void fp_TextRun::appendTextToBuf | ( | UT_GrowBuf & | buf | ) | const |
This method append the text in this run to the growbuf supplied in the parameter.
References UT_GrowBuf::append(), fp_Run::getBlock(), fl_BlockLayout::getBlockBuf(), fp_Run::getBlockOffset(), fp_Run::getLength(), and UT_GrowBuf::getPointer().
Referenced by _refreshDrawBuffer(), fl_BlockLayout::appendTextToBuf(), and Abi_GrammarCheck::GetEnglishText().
void fp_TextRun::breakMeAtDirBoundaries | ( | UT_BidiCharType | iNewOverride | ) |
References fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getLength(), fp_Run::getNextRun(), PD_StruxIterator::getStatus(), fp_Run::getType(), setDirection(), split(), text, UT_ASSERT, UT_BIDI_IGNORE, UT_bidiGetCharType(), and UT_return_if_fail.
Referenced by fl_BlockLayout::_delete(), _lookupProperties(), and fl_BlockLayout::_lookupProperties().
void fp_TextRun::breakNeighborsAtDirBoundaries | ( | ) |
A word of explanaiton of the break*AtDirBoundaries() functions. In order to reduce our memory use, we merge runs that resolve to the same embeding level. For example, if we have the sequence 'RTL white_space RTL', we will merge it into one run that gets treated as RTL. However, if we insert a new character into this combined run, or on its left or right, this might result in the embeding level of the white_space segment changing. In order to handle this, we have to break the present run into segments that contain characters of the same type, do the bidi processing, and then we can again merge anything that is on the same embeding level. The two functions below are responsible for the breaking, and are invoked from inside the fl_BlockLayout class.
References fl_BLOCK_STRUX_OFFSET, FPRUN_TEXT, fp_Run::getBlock(), fp_Run::getBlockOffset(), getDirection(), getDirOverride(), fp_Run::getLength(), fp_Run::getNextRun(), fp_Run::getPrevRun(), PD_StruxIterator::getStatus(), fp_Run::getType(), fp_Run::getVisDirection(), setDirection(), split(), text, UT_ASSERT, UT_BIDI_IS_STRONG, UT_bidiGetCharType(), and UT_return_if_fail.
Referenced by _lookupProperties().
bool fp_TextRun::canBreakAfter | ( | void | ) | const [virtual] |
Implements fp_Run.
References fp_Run::canBreakBefore(), fl_BLOCK_STRUX_OFFSET, FPRUN_TEXT, fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getGraphics(), fp_Run::getLength(), fp_Run::getNextRun(), PD_StruxIterator::getPosition(), PD_StruxIterator::getStatus(), fp_Run::getType(), GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, m_pRenderInfo, GR_RenderInfo::m_pText, PD_StruxIterator::setUpperLimit(), text, and UT_return_val_if_fail.
bool fp_TextRun::canBreakBefore | ( | void | ) | const [virtual] |
Implements fp_Run.
References fp_Run::canBreakBefore(), fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getGraphics(), fp_Run::getLength(), fp_Run::getNextRun(), PD_StruxIterator::getPosition(), PD_StruxIterator::getStatus(), GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, m_pRenderInfo, GR_RenderInfo::m_pText, PD_StruxIterator::setUpperLimit(), text, and UT_return_val_if_fail.
bool fp_TextRun::canMergeWithNext | ( | void | ) |
References fp_Run::_getColorFG(), fp_Run::_getColorHL(), fp_Run::_getDecorations(), fp_Run::_getFont(), GR_RenderInfo::canAppend(), fl_BLOCK_STRUX_OFFSET, FPRUN_FMTMARK, FPRUN_TEXT, fp_Run::getAuthorNum(), fp_Run::getBlock(), fp_Run::getBlockOffset(), PD_StruxIterator::getChar(), fp_Run::getField(), fp_Run::getHeight(), fp_Run::getLength(), fp_Run::getLine(), fp_Run::getNextRun(), fp_Run::getRevisions(), fp_Run::getType(), fp_Run::getVisDirection(), fp_Run::getVisibility(), isOneItem(), UT_RGBColor::isTransparent(), m_fPosition, m_iDirOverride, m_pLanguage, m_pRenderInfo, PD_StruxIterator::setPosition(), text, UT_DEBUGMSG, UT_UCS4_isspace(), and xxx_UT_DEBUGMSG.
Referenced by fp_Line::coalesceRuns(), and FV_View::toggleCase().
UT_sint32 fp_TextRun::countJustificationPoints | ( | bool | bLast | ) | const |
References GR_Graphics::countJustificationPoints(), fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getGraphics(), fp_Run::getLength(), PD_StruxIterator::getPosition(), GR_RenderInfo::m_bLastOnLine, GR_RenderInfo::m_iLength, m_pRenderInfo, GR_RenderInfo::m_pText, PD_StruxIterator::setUpperLimit(), text, and UT_return_val_if_fail.
Referenced by fp_Line::countJustificationPoints(), and fp_Line::justify().
bool fp_TextRun::doesContainNonBlankData | ( | void | ) | const [virtual] |
Reimplemented from fp_Run.
References fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), PD_StruxIterator::getChar(), fp_Run::getLength(), PD_StruxIterator::getStatus(), and text.
UT_sint32 fp_TextRun::findCharacter | ( | UT_uint32 | startPosition, | |
UT_UCSChar | Character | |||
) | const |
References fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), PD_StruxIterator::getChar(), fp_Run::getLength(), PD_StruxIterator::getStatus(), and text.
Referenced by fp_Line::_splitRunsAtSpaces().
bool fp_TextRun::findFirstNonBlankSplitPoint | ( | fp_RunSplitInfo & | splitInfo | ) | [virtual] |
Reimplemented from fp_Run.
References XAP_EncodingManager::get_instance(), fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getLength(), UT_GrowBuf::getPointer(), fp_Run::getWidth(), UT_ASSERT, and UT_SHOULD_NOT_HAPPEN.
bool fp_TextRun::findMaxLeftFitSplitPoint | ( | UT_sint32 | iMaxLeftWidth, | |
fp_RunSplitInfo & | si, | |||
bool | bForce = false | |||
) | [virtual] |
Reimplemented from fp_Run.
References GR_Graphics::canBreak(), fl_BLOCK_STRUX_OFFSET, FPRUN_TEXT, fp_Run::getBlock(), fp_Run::getBlockOffset(), PD_StruxIterator::getChar(), fp_Run::getGraphics(), fp_Run::getLength(), fp_Run::getNextRun(), PD_StruxIterator::getPosition(), PD_StruxIterator::getStatus(), GR_Graphics::getTextWidth(), fp_Run::getType(), fp_Run::getWidth(), fp_RunSplitInfo::iLeftWidth, fp_RunSplitInfo::iOffset, fp_RunSplitInfo::iRightWidth, GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, m_pRenderInfo, GR_RenderInfo::m_pText, PD_StruxIterator::setPosition(), PD_StruxIterator::setUpperLimit(), text, UCS_SPACE, UT_return_val_if_fail, UTIter_OK, and xxx_UT_DEBUGMSG.
void fp_TextRun::findPointCoords | ( | UT_uint32 | iOffset, | |
UT_sint32 & | x, | |||
UT_sint32 & | y, | |||
UT_sint32 & | x2, | |||
UT_sint32 & | y2, | |||
UT_sint32 & | height, | |||
bool & | bDirection | |||
) | [virtual] |
Implements fp_Run.
References fp_Run::_getRefreshDrawBuffer(), _refreshDrawBuffer(), fl_BLOCK_STRUX_OFFSET, fp_Run::getAscent(), fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getDescent(), fp_Run::getGraphics(), fp_Run::getHeight(), fp_Line::getHeight(), fp_Run::getLength(), fp_Run::getLine(), fp_Run::getNextRun(), fp_Line::getOffsets(), fp_Container::getPrev(), fp_Run::getPrev(), PD_StruxIterator::getStatus(), fp_Run::getType(), GR_RenderInfo::getType(), fp_Run::getVisDirection(), fp_Run::getWidth(), fp_ContainerObject::getY(), fp_Run::getY(), GRSR_Unknown, INITIAL_OFFSET, m_fPosition, GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, m_pRenderInfo, GR_RenderInfo::m_pText, GR_XPRenderInfo::m_pWidths, GR_Graphics::positionToXY(), text, TEXT_POSITION_SUBSCRIPT, TEXT_POSITION_SUPERSCRIPT, UT_BIDI_LTR, UT_BIDI_RTL, UT_DEBUGMSG, UT_MIN, UT_return_if_fail, and xxx_UT_DEBUGMSG.
UT_sint32 fp_TextRun::findTrailingSpaceDistance | ( | void | ) | const [virtual] |
Reimplemented from fp_Run.
References fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), PD_StruxIterator::getChar(), fp_Run::getGraphics(), fp_Run::getLength(), PD_StruxIterator::getStatus(), GR_Graphics::getTextWidth(), GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, m_pRenderInfo, text, UCS_SPACE, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
bool fp_TextRun::getCharacter | ( | UT_uint32 | run_offset, | |
UT_UCSChar & | Character | |||
) | const |
References fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), PD_StruxIterator::getChar(), fp_Run::getLength(), PD_StruxIterator::getStatus(), text, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
Referenced by isFirstCharacter(), and isLastCharacter().
UT_BidiCharType fp_TextRun::getDirection | ( | void | ) | const [virtual] |
Reimplemented from fp_Run.
References fp_Run::_getDirection(), and m_iDirOverride.
Referenced by breakNeighborsAtDirBoundaries().
UT_BidiCharType fp_TextRun::getDirOverride | ( | ) | const [inline] |
Referenced by breakNeighborsAtDirBoundaries().
const GR_Font* fp_TextRun::getFont | ( | void | ) | const [inline] |
const GR_Item* fp_TextRun::getItem | ( | ) | const [inline] |
const gchar * fp_TextRun::getLanguage | ( | void | ) | const |
References m_pLanguage.
Referenced by _lookupProperties(), and Abi_GrammarCheck::GetEnglishText().
UT_sint32 fp_TextRun::getStr | ( | UT_UCSChar * | str, | |
UT_uint32 & | iMax | |||
) |
GR_ShapingInfo::TextTransform fp_TextRun::getTextTransform | ( | ) | const [inline] |
Referenced by _lookupProperties(), _refreshDrawBuffer(), and split().
bool fp_TextRun::hasLayoutProperties | ( | void | ) | const [virtual] |
Reimplemented from fp_Run.
bool fp_TextRun::isFirstCharacter | ( | UT_UCSChar | Character | ) | const |
References getCharacter().
bool fp_TextRun::isLastCharacter | ( | UT_UCSChar | Character | ) | const |
References getCharacter(), and fp_Run::getLength().
Referenced by fp_Line::isLastCharacter().
bool fp_TextRun::isOneItem | ( | fp_Run * | pNext | ) |
Returns true if this run plus the next can be combined to make one contiguous item
References fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), PD_StruxIterator::getChar(), GR_Itemization::getItemCount(), fp_Run::getLength(), PD_StruxIterator::getPosition(), PD_StruxIterator::getStatus(), fl_BlockLayout::itemizeSpan(), PD_StruxIterator::setUpperLimit(), text, UT_ASSERT_HARMLESS, UT_isSmartQuotedCharacter(), and UT_return_val_if_fail.
Referenced by canMergeWithNext().
bool fp_TextRun::isSubscript | ( | void | ) | const [inline, virtual] |
Reimplemented from fp_Run.
References m_fPosition, and TEXT_POSITION_SUBSCRIPT.
bool fp_TextRun::isSuperscript | ( | void | ) | const [inline, virtual] |
Reimplemented from fp_Run.
References m_fPosition, and TEXT_POSITION_SUPERSCRIPT.
void fp_TextRun::itemize | ( | void | ) |
References fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getLength(), GR_Itemization::getNthItem(), fl_BlockLayout::itemizeSpan(), GR_Item::makeCopy(), setItem(), and UT_return_if_fail.
Referenced by mergeWithNext(), and split().
This metod distributes an extra width needed to make the line justified betten the spaces in this run
UT_sint32 | iAmount : the extra width to distribute | |
UT_uint32 | iSpacesInRun : the number of spaces in this run |
References fp_Run::_setWidth(), fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getGraphics(), fp_Run::getLength(), PD_StruxIterator::getPosition(), fp_Run::getWidth(), GR_Graphics::justify(), GR_RenderInfo::m_iJustificationAmount, GR_RenderInfo::m_iJustificationPoints, GR_RenderInfo::m_iLength, m_pRenderInfo, GR_RenderInfo::m_pText, PD_StruxIterator::setUpperLimit(), text, UT_ASSERT, and UT_return_if_fail.
Referenced by fp_Line::justify().
void fp_TextRun::mapXYToPosition | ( | UT_sint32 | xPos, | |
UT_sint32 | yPos, | |||
PT_DocPosition & | pos, | |||
bool & | bBOL, | |||
bool & | bEOL, | |||
bool & | isTOC | |||
) | [virtual] |
Implements fp_Run.
References fp_Run::_getRefreshDrawBuffer(), _refreshDrawBuffer(), adjustCaretPosition(), fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), fl_BlockLayout::getDominantDirection(), fp_Run::getGraphics(), fp_Run::getLength(), fp_Run::getOffsetFirstVis(), fl_BlockLayout::getPosition(), PD_StruxIterator::getStatus(), GR_RenderInfo::getType(), fp_Run::getVisDirection(), fp_Run::getWidth(), GRSR_Unknown, GR_RenderInfo::m_iLength, m_pRenderInfo, GR_RenderInfo::m_pText, GR_XPRenderInfo::m_pWidths, text, UT_ASSERT, UT_BIDI_RTL, UT_return_if_fail, UT_SHOULD_NOT_HAPPEN, xxx_UT_DEBUGMSG, and GR_Graphics::XYToPosition().
void fp_TextRun::measureCharWidths | ( | ) |
measures widths of individual characters in our draw buffer, stores them in the block's width cache and recalculates overall width.
References _addupCharWidths(), fp_Run::_getFont(), fp_Run::_setRecalcWidth(), fp_Run::_setWidth(), fp_Run::getBlockOffset(), fp_Run::getGraphics(), fp_Run::getLength(), fp_Run::getVisDirection(), GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, GR_RenderInfo::m_iVisDir, GR_RenderInfo::m_pFont, m_pRenderInfo, GR_Graphics::measureRenderedCharWidths(), GR_Graphics::setFont(), and UT_return_if_fail.
Referenced by _refreshDrawBuffer(), and FV_View::remeasureCharsWithoutRebuild().
void fp_TextRun::mergeWithNext | ( | void | ) |
References fp_Run::_getDecorations(), fp_Run::_getFont(), fp_Run::_getLineWidth(), fp_Run::_setDirty(), fp_Run::_setField(), fp_Run::_setLength(), fp_Run::_setWidth(), fp_Run::_setX(), DELETEP, FPRUN_TEXT, fp_Run::getAscent(), fp_Run::getBlockOffset(), fp_Run::getDescent(), fp_Run::getField(), fp_Run::getHeight(), fp_Run::getLength(), fp_Run::getLine(), fp_Run::getNextRun(), fp_Run::getType(), fp_Run::getWidth(), fp_Run::getX(), fp_Run::isDirty(), itemize(), fp_Run::lookupProperties(), m_fPosition, m_iDirOverride, m_pLanguage, m_pRenderInfo, fp_Run::markDrawBufferDirty(), fp_Line::removeRun(), fp_Run::setMustClearScreen(), fp_Run::setNextRun(), fp_Run::setPrevRun(), UT_ASSERT, and xxx_UT_DEBUGMSG.
Referenced by fl_BlockLayout::_mergeRuns(), and fp_Line::coalesceRuns().
void fp_TextRun::orShapingRequired | ( | GRShapingResult | eR | ) | [inline] |
void fp_TextRun::resetJustification | ( | bool | bPermanent | ) |
References fp_Run::_getRefreshDrawBuffer(), _refreshDrawBuffer(), fp_Run::_setRecalcWidth(), fp_Run::_setWidth(), GR_Graphics::DGP_SCREEN, fp_Run::getGraphics(), fp_Run::getLength(), fp_Run::getWidth(), GRSR_Unknown, GR_RenderInfo::m_iLength, m_pRenderInfo, GR_Graphics::resetJustification(), UT_return_if_fail, and xxx_UT_DEBUGMSG.
Referenced by fp_Line::resetJustification().
void fp_TextRun::setDirection | ( | UT_BidiCharType | dir, | |
UT_BidiCharType | override | |||
) |
References fp_Run::_getDirection(), fp_Run::_setDirection(), fp_Line::changeDirectionUsed(), fp_Run::clearScreen(), fl_BLOCK_STRUX_OFFSET, fp_Run::getBlock(), fp_Run::getBlockOffset(), PD_StruxIterator::getChar(), fp_Run::getLength(), fp_Run::getLine(), PD_StruxIterator::getPosition(), PD_StruxIterator::getStatus(), m_iDirOverride, fp_Run::markDrawBufferDirty(), fp_Line::setMapOfRunsDirty(), PD_StruxIterator::setUpperLimit(), fp_Run::setVisDirection(), text, UT_ASSERT, UT_ASSERT_HARMLESS, UT_BIDI_IGNORE, UT_BIDI_IS_STRONG, UT_BIDI_UNSET, and UT_bidiGetCharType().
Referenced by _lookupProperties(), breakMeAtDirBoundaries(), and breakNeighborsAtDirBoundaries().
void fp_TextRun::setDirOverride | ( | UT_BidiCharType | dir | ) |
References PD_Document::changeSpanFmt(), fp_Run::getBlock(), fp_Run::getBlockOffset(), fl_Layout::getDocument(), fp_Run::getLength(), fl_BlockLayout::getPosition(), m_iDirOverride, PTC_AddFmt, UT_ASSERT, UT_BIDI_LTR, UT_BIDI_RTL, UT_BIDI_UNSET, UT_DEBUGMSG, and UT_SHOULD_NOT_HAPPEN.
Referenced by fl_BlockLayout::_doInsertTextSpan().
void fp_TextRun::setItem | ( | GR_Item * | i | ) |
References DELETEP, GR_RenderInfo::m_pItem, m_pItem, and m_pRenderInfo.
Referenced by fl_BlockLayout::_doInsertTextSpan(), and itemize().
void fp_TextRun::setShapingRequired | ( | GRShapingResult | eR | ) | [inline] |
void fp_TextRun::setTextTransform | ( | GR_ShapingInfo::TextTransform | transform | ) | [inline] |
Referenced by _lookupProperties(), and split().
References fp_Run::_getColorFG(), fp_Run::_getColorHL(), fp_Run::_getDecorations(), fp_Run::_getDirection(), fp_Run::_getFont(), fp_Run::_getLineWidth(), fp_Run::_setAscent(), fp_Run::_setColorFG(), fp_Run::_setColorHL(), fp_Run::_setDecorations(), fp_Run::_setDescent(), fp_Run::_setDirection(), fp_Run::_setDirty(), fp_Run::_setField(), fp_Run::_setFont(), fp_Run::_setHeight(), fp_Run::_setHyperlink(), fp_Run::_setLineWidth(), fp_Run::_setRevisions(), fp_Run::_setX(), fp_Run::_setY(), DELETEP, fp_TextRun(), fp_Run::getAscent(), fp_Run::getAuthorNum(), fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getDescent(), fp_Run::getField(), fp_Run::getHeight(), fp_Run::getHyperlink(), fp_Run::getLength(), fp_Run::getLine(), fp_Run::getNextRun(), fp_Run::getRevisions(), getTextTransform(), fp_Run::getVisDirection(), fp_Run::getVisibility(), fp_Run::getWidth(), fp_Run::getX(), fp_Run::getY(), fp_Line::insertRunAfter(), itemize(), fp_Run::lookupProperties(), m_fPosition, m_iDirOverride, m_pLanguage, m_pRenderInfo, fp_Run::markAsDirty(), fp_Run::recalcWidth(), fp_Run::setAuthorNum(), fp_Run::setLength(), fp_Run::setNextRun(), fp_Run::setPrevRun(), setTextTransform(), fp_Run::setVisDirection(), fp_Run::setVisibility(), UT_ASSERT, UT_BIDI_LTR, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
Referenced by fp_Line::_splitRunsAtSpaces(), breakMeAtDirBoundaries(), breakNeighborsAtDirBoundaries(), and fl_BlockLayout::doclistener_changeSpan().
The following function allows us to respond to deletion of part of the text represented by this run in a smart way (smart here means avoiding recalculating the draw buffer when we do not have to)
offset,: | run offset at which deletion starts | |
iLen,: | length of the deleted section, can reach past the end of the run |
Reimplemented from fp_Run.
References fp_Run::_getRefreshDrawBuffer(), GR_RenderInfo::cut(), fl_BLOCK_STRUX_OFFSET, FPRUN_FMTMARK, FPRUN_HYPERLINK, fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getLength(), fp_Run::getNextRun(), fp_Run::getPrevRun(), fp_Run::getType(), fp_Run::getVisDirection(), GRSR_ContextSensitive, GRSR_Unknown, GR_RenderInfo::m_eShapingResult, GR_RenderInfo::m_eState, GR_RenderInfo::m_iLength, GR_RenderInfo::m_iVisDir, m_pRenderInfo, GR_RenderInfo::m_pText, fp_Run::markWidthDirty(), fp_Run::orDrawBufferDirty(), fp_Run::setLength(), text, UT_MIN, UT_return_if_fail, and xxx_UT_DEBUGMSG.
bool fp_TextRun::m_bGrammarSquiggled [private] |
Referenced by _draw(), and _drawFirstChar().
bool fp_TextRun::m_bIsOverhanging [private] |
Referenced by _draw(), and _lookupProperties().
bool fp_TextRun::m_bKeepWidths [private] |
Referenced by _draw(), and _lookupProperties().
bool fp_TextRun::m_bSpellSquiggled [private] |
Referenced by _draw(), and _drawFirstChar().
UT_Byte fp_TextRun::m_fPosition [private] |
Referenced by _draw(), _lookupProperties(), canMergeWithNext(), findPointCoords(), isSubscript(), isSuperscript(), mergeWithNext(), and split().
Referenced by _lookupProperties(), _refreshDrawBuffer(), canMergeWithNext(), fp_TextRun(), getDirection(), mergeWithNext(), setDirection(), setDirOverride(), and split().
const GR_Item* fp_TextRun::m_pItem [private] |
Referenced by _refreshDrawBuffer(), setItem(), and ~fp_TextRun().
const gchar* fp_TextRun::m_pLanguage [private] |
Referenced by _lookupProperties(), _refreshDrawBuffer(), canMergeWithNext(), getLanguage(), mergeWithNext(), and split().
GR_RenderInfo* fp_TextRun::m_pRenderInfo [private] |
Referenced by _addupCharWidths(), _draw(), _drawFirstChar(), _drawInvisibleSpaces(), _drawLastChar(), _getPartRect(), _lookupProperties(), _refreshDrawBuffer(), adjustCaretPosition(), adjustDeletePosition(), canBreakAfter(), canBreakBefore(), canMergeWithNext(), countJustificationPoints(), findMaxLeftFitSplitPoint(), findPointCoords(), findTrailingSpaceDistance(), justify(), mapXYToPosition(), measureCharWidths(), mergeWithNext(), resetJustification(), setItem(), simpleRecalcWidth(), split(), updateOnDelete(), and ~fp_TextRun().
bool fp_TextRun::s_bBidiOS = false [static] |
Referenced by _drawFirstChar(), _refreshDrawBuffer(), and fp_TextRun().
UT_uint32 fp_TextRun::s_iClassInstanceCount = 0 [static] |
Referenced by fp_TextRun().