Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QTextEngine Class Reference

#include <qtextengine_p.h>

+ Inheritance diagram for QTextEngine:
+ Collaboration diagram for QTextEngine:

Classes

struct  ItemDecoration
 
struct  LayoutData
 

Public Types

enum  LayoutState { LayoutEmpty , InLayout , LayoutFailed }
 
enum  Mode { WidthOnly = 0x07 }
 
typedef QList< ItemDecorationItemDecorationList
 

Public Member Functions

 QTextEngine ()
 
 QTextEngine (const QString &str, const QFont &f)
 
 ~QTextEngine ()
 
void invalidate ()
 
void clearLineData ()
 
void validate () const
 
void itemize () const
 
bool isRightToLeft () const
 
const QCharAttributesattributes () const
 
void shape (int item) const
 
void justify (const QScriptLine &si)
 
QFixed alignLine (const QScriptLine &line)
 
QFixed width (int charFrom, int numChars) const
 
glyph_metrics_t boundingBox (int from, int len) const
 
glyph_metrics_t tightBoundingBox (int from, int len) const
 
int length (int item) const
 
int length (const QScriptItem *si) const
 
QFontEnginefontEngine (const QScriptItem &si, QFixed *ascent=nullptr, QFixed *descent=nullptr, QFixed *leading=nullptr) const
 
QFont font (const QScriptItem &si) const
 
QFont font () const
 
unsigned short * logClusters (const QScriptItem *si) const
 
QGlyphLayout availableGlyphs (const QScriptItem *si) const
 
QGlyphLayout shapedGlyphs (const QScriptItem *si) const
 
bool ensureSpace (int nGlyphs) const
 
void freeMemory ()
 
int findItem (int strPos, int firstItem=0) const
 
QTextFormatCollectionformatCollection () const
 
QTextCharFormat format (const QScriptItem *si) const
 
QAbstractTextDocumentLayoutdocLayout () const
 
int formatIndex (const QScriptItem *si) const
 
QFixed calculateTabWidth (int index, QFixed x) const
 returns the width of tab at index (in the tabs array) with the tab-start at position x
 
bool visualCursorMovement () const
 
int preeditAreaPosition () const
 
QString preeditAreaText () const
 
void setPreeditArea (int position, const QString &text)
 
bool hasFormats () const
 
QList< QTextLayout::FormatRangeformats () const
 
void setFormats (const QList< QTextLayout::FormatRange > &formats)
 
bool atWordSeparator (int position) const
 
QString elidedText (Qt::TextElideMode mode, QFixed width, int flags=0, int from=0, int count=-1) const
 
void shapeLine (const QScriptLine &line)
 
QFixed leadingSpaceWidth (const QScriptLine &line)
 
QFixed offsetInLigature (const QScriptItem *si, int pos, int max, int glyph_pos)
 
int positionInLigature (const QScriptItem *si, int end, QFixed x, QFixed edge, int glyph_pos, bool cursorOnCharacter)
 
int previousLogicalPosition (int oldPos) const
 
int nextLogicalPosition (int oldPos) const
 
int lineNumberForTextPosition (int pos)
 
int positionAfterVisualMovement (int oldPos, QTextCursor::MoveOperation op)
 
std::vector< int > insertionPointsForLine (int lineNum)
 
void resetFontEngineCache ()
 
void enableDelayDecorations (bool enable=true)
 
void addUnderline (QPainter *painter, const QLineF &line)
 
void addStrikeOut (QPainter *painter, const QLineF &line)
 
void addOverline (QPainter *painter, const QLineF &line)
 
void drawDecorations (QPainter *painter)
 
void clearDecorations ()
 
void adjustUnderlines ()
 

Static Public Member Functions

static void bidiReorder (int numRuns, const quint8 *levels, int *visualOrder)
 

Public Attributes

QScriptLineArray lines
 
QString text
 
QFont fnt
 
QRawFont rawFont
 
QTextBlock block
 
QTextOption option
 
QFixed minWidth
 
QFixed maxWidth
 
QPointF position
 
uint ignoreBidi: 1
 
uint cacheGlyphs: 1
 
uint stackEngine: 1
 
uint forceJustification: 1
 
uint visualMovement: 1
 
uint delayDecorations: 1
 
uint useRawFont: 1
 
LayoutDatalayoutData
 
ItemDecorationList underlineList
 
ItemDecorationList strikeOutList
 
ItemDecorationList overlineList
 

Detailed Description

Definition at line 366 of file qtextengine_p.h.

Member Typedef Documentation

◆ ItemDecorationList

Member Enumeration Documentation

◆ LayoutState

Enumerator
LayoutEmpty 
InLayout 
LayoutFailed 

Definition at line 368 of file qtextengine_p.h.

◆ Mode

Enumerator
WidthOnly 

Definition at line 410 of file qtextengine_p.h.

Constructor & Destructor Documentation

◆ QTextEngine() [1/2]

QTextEngine::QTextEngine ( )

Definition at line 1795 of file qtextengine.cpp.

◆ QTextEngine() [2/2]

QTextEngine::QTextEngine ( const QString & str,
const QFont & f )

Definition at line 1800 of file qtextengine.cpp.

◆ ~QTextEngine()

QTextEngine::~QTextEngine ( )

Definition at line 1807 of file qtextengine.cpp.

References layoutData, resetFontEngineCache(), and stackEngine.

+ Here is the call graph for this function:

Member Function Documentation

◆ addOverline()

void QTextEngine::addOverline ( QPainter * painter,
const QLineF & line )

Definition at line 3664 of file qtextengine.cpp.

References line, overlineList, and painter.

◆ addStrikeOut()

void QTextEngine::addStrikeOut ( QPainter * painter,
const QLineF & line )

Definition at line 3659 of file qtextengine.cpp.

References line, painter, and strikeOutList.

◆ addUnderline()

void QTextEngine::addUnderline ( QPainter * painter,
const QLineF & line )

Definition at line 3653 of file qtextengine.cpp.

References line, painter, and underlineList.

◆ adjustUnderlines()

void QTextEngine::adjustUnderlines ( )

Definition at line 3702 of file qtextengine.cpp.

References adjustUnderlines(), QList< T >::begin(), QList< T >::end(), QList< T >::isEmpty(), it, qFuzzyCompare(), qMax(), and underlineList.

Referenced by adjustUnderlines(), and drawDecorations().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ alignLine()

QFixed QTextEngine::alignLine ( const QScriptLine & line)

Definition at line 3395 of file qtextengine.cpp.

References Qt::AlignHCenter, Qt::AlignJustify, Qt::AlignRight, isRightToLeft(), justify(), line, and QFIXED_MAX.

Referenced by QTextLineItemIterator::QTextLineItemIterator(), and QTextLine::naturalTextRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ attributes()

◆ atWordSeparator()

bool QTextEngine::atWordSeparator ( int position) const

Definition at line 2844 of file qtextengine.cpp.

References QString::at(), layoutData, position, and QTextEngine::LayoutData::string.

Referenced by QTextLayout::nextCursorPosition(), and QTextLayout::previousCursorPosition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ availableGlyphs()

QGlyphLayout QTextEngine::availableGlyphs ( const QScriptItem * si) const
inline

Returns an array of QGlyphLayout items, offset at the script item. Each item in the array matches one glyph in the text, storing the advance, position etc. The returned item's length equals to the number of available glyphs. This may be more than what was actually shaped.

See also
logClusters()

Definition at line 470 of file qtextengine_p.h.

References QScriptItem::glyph_data_offset, and QGlyphLayout::mid().

+ Here is the call graph for this function:

◆ bidiReorder()

void QTextEngine::bidiReorder ( int numRuns,
const quint8 * levels,
int * visualOrder )
static

Definition at line 1134 of file qtextengine.cpp.

References BIDI_DEBUG, i, and j.

Referenced by QTextLineItemIterator::QTextLineItemIterator(), QPainterPath::addText(), QTextLine::cursorToX(), QPainter::drawText(), and QTextLine::xToCursor().

+ Here is the caller graph for this function:

◆ boundingBox()

glyph_metrics_t QTextEngine::boundingBox ( int from,
int len ) const

Definition at line 2187 of file qtextengine.cpp.

References itemize().

+ Here is the call graph for this function:

◆ calculateTabWidth()

QFixed QTextEngine::calculateTabWidth ( int index,
QFixed x ) const

returns the width of tab at index (in the tabs array) with the tab-start at position x

Definition at line 3199 of file qtextengine.cpp.

References QGlyphLayout::advances, QList< T >::at(), QGlyphLayout::attributes, block, QTextOption::CenterTab, QTextOption::DelimiterTab, QGlyphAttributes::dontPrint, QFontPrivate::dpi, QGraphicsItem::flags(), fnt, QFixed::fromReal(), QTextDocumentPrivate::get(), i, QString::indexOf(), isRightToLeft(), item, QTextEngine::LayoutData::items, iter, layout, layoutData, QTextOption::LeftTab, QPaintDevice::logicalDpiY(), QScriptAnalysis::Object, QScriptItem::position, Q_FALLTHROUGH, qMax(), qMin(), qt_defaultDpiY(), QTextOption::RightTab, shape(), shapedGlyphs(), QString::size(), QList< T >::size(), QTextEngine::LayoutData::string, QScriptAnalysis::TabOrObject, QTextOption::Tab::type, and QGraphicsItem::type().

Referenced by shapeLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearDecorations()

void QTextEngine::clearDecorations ( )

Definition at line 3695 of file qtextengine.cpp.

References QList< T >::clear(), overlineList, strikeOutList, and underlineList.

Referenced by drawDecorations().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearLineData()

void QTextEngine::clearLineData ( )

Definition at line 1896 of file qtextengine.cpp.

References QList< T >::clear(), and lines.

Referenced by QTextLayout::beginLayout(), QTextLayout::clearLayout(), setFormats(), setPreeditArea(), and QTextLayout::setText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ docLayout()

QAbstractTextDocumentLayout * QTextEngine::docLayout ( ) const
inline

Definition at line 498 of file qtextengine_p.h.

References QTextDocumentPrivate::get(), and Q_ASSERT.

Referenced by shape().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawDecorations()

void QTextEngine::drawDecorations ( QPainter * painter)

Definition at line 3681 of file qtextengine.cpp.

References adjustUnderlines(), clearDecorations(), overlineList, painter, QPainter::pen(), QPainter::setPen(), strikeOutList, and underlineList.

+ Here is the call graph for this function:

◆ elidedText()

◆ enableDelayDecorations()

void QTextEngine::enableDelayDecorations ( bool enable = true)
inline

Definition at line 604 of file qtextengine_p.h.

◆ ensureSpace()

bool QTextEngine::ensureSpace ( int nGlyphs) const
inline

Definition at line 483 of file qtextengine_p.h.

Referenced by attributes(), shape(), and shapeLine().

+ Here is the caller graph for this function:

◆ findItem()

int QTextEngine::findItem ( int strPos,
int firstItem = 0 ) const

Definition at line 2096 of file qtextengine.cpp.

References QList< T >::at(), itemize(), QTextEngine::LayoutData::items, items, layoutData, QScriptItem::position, QString::size(), QList< T >::size(), and QTextEngine::LayoutData::string.

Referenced by QTextLayout::drawCursor(), justify(), and shapeLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ font() [1/2]

QFont QTextEngine::font ( ) const
inline

Definition at line 451 of file qtextengine_p.h.

Referenced by font(), and fontEngine().

+ Here is the caller graph for this function:

◆ font() [2/2]

QFont QTextEngine::font ( const QScriptItem & si) const

Definition at line 2232 of file qtextengine.cpp.

References QTextCharFormat::AlignSubScript, QTextCharFormat::AlignSuperScript, QScriptItem::analysis, block, QScriptAnalysis::flags, fnt, font(), QTextDocumentPrivate::get(), hasFormats(), QFont::pixelSize(), QFont::pointSize(), QFont::resolve(), QFont::setPixelSize(), QFont::setPointSize(), QScriptAnalysis::SmallCaps, and QFontPrivate::smallCapsFont().

Referenced by QTextLayout::font().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fontEngine()

◆ format()

QTextCharFormat QTextEngine::format ( const QScriptItem * si) const

Definition at line 2825 of file qtextengine.cpp.

References formatCollection(), and formatIndex().

Referenced by QTextInlineObject::format().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ formatCollection()

QTextFormatCollection * QTextEngine::formatCollection ( ) const
inline

Definition at line 492 of file qtextengine_p.h.

References QTextDocumentPrivate::get().

Referenced by format(), formatIndex(), and itemize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ formatIndex()

int QTextEngine::formatIndex ( const QScriptItem * si) const

Definition at line 2802 of file qtextengine.cpp.

References QList< T >::at(), block, QSet< T >::find(), formatCollection(), QTextDocumentPrivate::get(), QList< T >::isEmpty(), it, QTextEngine::LayoutData::items, layoutData, QTextBlock::length(), pos, QScriptItem::position, QTextBlock::position(), Q_ASSERT, qMax(), qMin(), and QString::size().

Referenced by format(), and QTextInlineObject::formatIndex().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ formats()

QList< QTextLayout::FormatRange > QTextEngine::formats ( ) const
inline

Definition at line 565 of file qtextengine_p.h.

Referenced by QTextLayout::formats(), and setFormats().

+ Here is the caller graph for this function:

◆ freeMemory()

void QTextEngine::freeMemory ( )

Definition at line 2781 of file qtextengine.cpp.

References QList< T >::clear(), QTextEngine::LayoutData::currentMaxWidth, QTextEngine::LayoutData::hasBidi, QTextEngine::LayoutData::haveCharAttributes, i, QTextEngine::LayoutData::items, layoutData, LayoutEmpty, QTextEngine::LayoutData::layoutState, lines, QList< T >::size(), stackEngine, and QTextEngine::LayoutData::used.

Referenced by QTextLayout::draw(), QTextLayout::endLayout(), and invalidate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasFormats()

bool QTextEngine::hasFormats ( ) const
inline

Definition at line 563 of file qtextengine_p.h.

References QTextDocumentPrivate::get().

Referenced by font(), and fontEngine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertionPointsForLine()

std::vector< int > QTextEngine::insertionPointsForLine ( int lineNum)

Definition at line 3563 of file qtextengine.cpp.

References QScriptItem::analysis, QScriptAnalysis::bidiLevel, i, lines, and QList< T >::size().

Referenced by positionAfterVisualMovement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ invalidate()

void QTextEngine::invalidate ( )

Definition at line 1887 of file qtextengine.cpp.

References freeMemory(), maxWidth, minWidth, and resetFontEngineCache().

Referenced by QTextLayout::beginLayout(), QTextBlockData::invalidate(), setFormats(), setPreeditArea(), and QTextLayout::setText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRightToLeft()

bool QTextEngine::isRightToLeft ( ) const

Definition at line 2077 of file qtextengine.cpp.

References QGuiApplication::inputMethod(), QString::isEmpty(), QString::isRightToLeft(), itemize(), layoutData, Qt::LeftToRight, Qt::RightToLeft, and QTextEngine::LayoutData::string.

Referenced by alignLine(), calculateTabWidth(), QTextLayout::draw(), QTextLayout::drawCursor(), itemize(), leadingSpaceWidth(), and positionAfterVisualMovement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ itemize()

void QTextEngine::itemize ( ) const

Definition at line 1922 of file qtextengine.cpp.

References QList< T >::at(), QScriptAnalysis::bidiLevel, block, QFontPrivate::capital, QFont::capitalization(), QTextFormatCollection::charFormat(), QString::constData(), QString::data(), QTextFormatCollection::defaultFont(), QString::detach(), QSet< T >::find(), QScriptAnalysis::flags, fnt, QTextFormat::FontCapitalization, QTextCharFormat::fontCapitalization(), formatCollection(), QTextDocumentPrivate::get(), QAbstractTextDocumentLayoutPrivate::get(), QTextEngine::LayoutData::hasBidi, QTextFormat::hasProperty(), i, QUnicodeTools::initScripts(), isRightToLeft(), it, item, QTextEngine::LayoutData::items, j, layoutData, QTextBlock::length(), QScriptAnalysis::LineOrParagraphSeparator, QFont::MixedCase, QScriptAnalysis::Nbsp, QScriptAnalysis::None, QScriptAnalysis::Object, position, QTextBlock::position(), Q_ASSERT, Q_FALLTHROUGH, QTextOption::ShowLineAndParagraphSeparators, QTextOption::ShowTabsAndSpaces, QString::size(), QList< T >::size(), QScriptAnalysis::Space, QTextEngine::LayoutData::string, QScriptAnalysis::Tab, QString::unicode(), useRawFont, and validate().

Referenced by attributes(), QTextLayout::beginLayout(), boundingBox(), QTextLayout::draw(), QTextLayout::drawCursor(), elidedText(), findItem(), isRightToLeft(), justify(), lineNumberForTextPosition(), positionAfterVisualMovement(), tightBoundingBox(), and width().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ justify()

◆ leadingSpaceWidth()

QFixed QTextEngine::leadingSpaceWidth ( const QScriptLine & line)

Definition at line 3385 of file qtextengine.cpp.

References QString::from, QTextOption::IncludeTrailingSpaces, isRightToLeft(), QString::length(), and line.

Referenced by QTextLayout::draw(), and justify().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ length() [1/2]

int QTextEngine::length ( const QScriptItem * si) const
inline

Definition at line 440 of file qtextengine_p.h.

References QScriptItem::position, and position().

+ Here is the call graph for this function:

◆ length() [2/2]

int QTextEngine::length ( int item) const
inline

Definition at line 434 of file qtextengine_p.h.

References item, items, QScriptItem::position, and QList< T >::size().

Referenced by QTextLineItemIterator::next().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lineNumberForTextPosition()

int QTextEngine::lineNumberForTextPosition ( int pos)

Definition at line 3549 of file qtextengine.cpp.

References QString::from, i, itemize(), layoutData, QString::length(), line, lines, pos, QString::size(), QList< T >::size(), and QTextEngine::LayoutData::string.

Referenced by QTextLayout::drawCursor(), QTextLayout::lineForTextPosition(), and positionAfterVisualMovement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logClusters()

unsigned short * QTextEngine::logClusters ( const QScriptItem * si) const
inline

Returns a pointer to an array of log clusters, offset at the script item. Each item in the array is a unsigned short. For each character in the original string there is an entry in the table so there is a one to one correlation in indexes between the original text and the index in the logcluster. The value of each item is the position in the glyphs array. Multiple similar pointers in the logclusters array imply that one glyph is used for more than one character.

See also
glyphs()

Definition at line 461 of file qtextengine_p.h.

References QScriptItem::position.

Referenced by elidedText(), QTextLineItemIterator::getSelectionBounds(), justify(), QTextLineItemIterator::next(), offsetInLigature(), positionInLigature(), and shape().

+ Here is the caller graph for this function:

◆ nextLogicalPosition()

int QTextEngine::nextLogicalPosition ( int oldPos) const

Definition at line 3534 of file qtextengine.cpp.

References attributes(), attrs, block, QTextBlock::isValid(), layoutData, QTextBlock::length(), Q_ASSERT, QString::size(), and QTextEngine::LayoutData::string.

Referenced by positionAfterVisualMovement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ offsetInLigature()

QFixed QTextEngine::offsetInLigature ( const QScriptItem * si,
int pos,
int max,
int glyph_pos )

Definition at line 3412 of file qtextengine.cpp.

References QGlyphLayout::advances, i, logClusters(), pos, and shapedGlyphs().

Referenced by QTextLineItemIterator::getSelectionBounds().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ positionAfterVisualMovement()

int QTextEngine::positionAfterVisualMovement ( int oldPos,
QTextCursor::MoveOperation op )

Definition at line 3605 of file qtextengine.cpp.

References QTextEngine::LayoutData::hasBidi, i, insertionPointsForLine(), isRightToLeft(), itemize(), layoutData, lineNumberForTextPosition(), lines, nextLogicalPosition(), pos, previousLogicalPosition(), QTextCursor::Right, and QList< T >::size().

Referenced by QTextLayout::leftCursorPosition(), and QTextLayout::rightCursorPosition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ positionInLigature()

int QTextEngine::positionInLigature ( const QScriptItem * si,
int end,
QFixed x,
QFixed edge,
int glyph_pos,
bool cursorOnCharacter )

Definition at line 3460 of file qtextengine.cpp.

References QScriptItem::analysis, attributes(), attrs, dist(), QGlyphLayout::effectiveAdvance(), QFixed::floor(), i, logClusters(), pos, QScriptItem::position, QScriptAnalysis::script, and shapedGlyphs().

+ Here is the call graph for this function:

◆ preeditAreaPosition()

int QTextEngine::preeditAreaPosition ( ) const
inline

Definition at line 559 of file qtextengine_p.h.

Referenced by QTextLayout::preeditAreaPosition(), and QTextLayout::setPreeditArea().

+ Here is the caller graph for this function:

◆ preeditAreaText()

QString QTextEngine::preeditAreaText ( ) const
inline

Definition at line 560 of file qtextengine_p.h.

Referenced by QTextLayout::preeditAreaText(), and QTextLayout::setPreeditArea().

+ Here is the caller graph for this function:

◆ previousLogicalPosition()

int QTextEngine::previousLogicalPosition ( int oldPos) const

Definition at line 3519 of file qtextengine.cpp.

References attributes(), attrs, block, QTextBlock::isValid(), layoutData, QTextBlock::length(), Q_ASSERT, QString::size(), and QTextEngine::LayoutData::string.

Referenced by positionAfterVisualMovement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetFontEngineCache()

void QTextEngine::resetFontEngineCache ( )

Definition at line 1880 of file qtextengine.cpp.

References releaseCachedFontEngine().

Referenced by ~QTextEngine(), invalidate(), QQuickText::invalidateFontCaches(), QTextLayout::setFont(), and QTextLayout::setRawFont().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFormats()

void QTextEngine::setFormats ( const QList< QTextLayout::FormatRange > & formats)

Definition at line 2908 of file qtextengine.cpp.

References QList< T >::clear(), clearLineData(), formats(), invalidate(), and QString::isEmpty().

Referenced by QTextLayout::setFormats().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPreeditArea()

void QTextEngine::setPreeditArea ( int position,
const QString & text )

Definition at line 2886 of file qtextengine.cpp.

References clearLineData(), invalidate(), QString::isEmpty(), QList< T >::isEmpty(), and position.

Referenced by QTextLayout::setPreeditArea().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shape()

void QTextEngine::shape ( int item) const

Definition at line 1845 of file qtextengine.cpp.

References block, docLayout(), ensureSpace(), fontEngine(), QTextDocumentPrivate::get(), item, QTextEngine::LayoutData::items, layoutData, logClusters(), QTextEngine::LayoutData::logClustersPtr, QScriptAnalysis::Object, QTextBlock::position(), QAbstractTextDocumentLayout::resizeInlineObject(), and QScriptAnalysis::Tab.

Referenced by calculateTabWidth(), elidedText(), justify(), QTextLineItemIterator::next(), and shapeLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shapedGlyphs()

QGlyphLayout QTextEngine::shapedGlyphs ( const QScriptItem * si) const
inline

Returns an array of QGlyphLayout items, offset at the script item. Each item in the array matches one glyph in the text, storing the advance, position etc. The returned item's length equals to the number of shaped glyphs.

See also
logClusters()

Definition at line 479 of file qtextengine_p.h.

References QScriptItem::glyph_data_offset, QGlyphLayout::mid(), and QScriptItem::num_glyphs.

Referenced by QPainterPath::addText(), calculateTabWidth(), elidedText(), QTextLineItemIterator::getSelectionBounds(), justify(), QTextLineItemIterator::next(), offsetInLigature(), positionInLigature(), shapeLine(), and width().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shapeLine()

void QTextEngine::shapeLine ( const QScriptLine & line)

Definition at line 1287 of file qtextengine.cpp.

References QScriptItem::analysis, calculateTabWidth(), QGlyphLayout::effectiveAdvance(), ensureSpace(), findItem(), QScriptAnalysis::flags, QString::from, i, item, QTextEngine::LayoutData::items, layoutData, QString::length(), line, QScriptItem::position, Q_ASSERT, shape(), shapedGlyphs(), QScriptAnalysis::Tab, and QScriptItem::width.

Referenced by QTextLineItemIterator::QTextLineItemIterator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tightBoundingBox()

glyph_metrics_t QTextEngine::tightBoundingBox ( int from,
int len ) const

Definition at line 2210 of file qtextengine.cpp.

References itemize().

+ Here is the call graph for this function:

◆ validate()

void QTextEngine::validate ( ) const

Definition at line 1901 of file qtextengine.cpp.

References block, QTextDocumentPrivate::get(), QString::insert(), QTextBlock::isValid(), layoutData, QTextBlock::next(), QTextOption::ShowDocumentTerminator, QTextOption::ShowLineAndParagraphSeparators, QTextEngine::LayoutData::string, text, and QTextBlock::text().

Referenced by elidedText(), and itemize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visualCursorMovement()

bool QTextEngine::visualCursorMovement ( ) const
inline

Definition at line 556 of file qtextengine_p.h.

References QTextDocumentPrivate::get(), and Qt::VisualMoveStyle.

Referenced by QTextLayout::drawCursor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ width()

QFixed QTextEngine::width ( int charFrom,
int numChars ) const

Definition at line 2172 of file qtextengine.cpp.

References QGlyphLayout::advances, QGlyphLayout::attributes, QGlyphAttributes::dontPrint, itemize(), j, and shapedGlyphs().

+ Here is the call graph for this function:

Member Data Documentation

◆ block

◆ cacheGlyphs

uint QTextEngine::cacheGlyphs

◆ delayDecorations

uint QTextEngine::delayDecorations

Definition at line 545 of file qtextengine_p.h.

◆ fnt

◆ forceJustification

uint QTextEngine::forceJustification

Definition at line 543 of file qtextengine_p.h.

Referenced by justify(), and QTextLayout::setFlags().

◆ ignoreBidi

uint QTextEngine::ignoreBidi

Definition at line 540 of file qtextengine_p.h.

Referenced by QTextLayout::setFlags().

◆ layoutData

◆ lines

◆ maxWidth

QFixed QTextEngine::maxWidth

Definition at line 538 of file qtextengine_p.h.

Referenced by QTextLayout::createLine(), invalidate(), and QTextLayout::maximumWidth().

◆ minWidth

QFixed QTextEngine::minWidth

Definition at line 537 of file qtextengine_p.h.

Referenced by invalidate(), and QTextLayout::minimumWidth().

◆ option

◆ overlineList

ItemDecorationList QTextEngine::overlineList

Definition at line 554 of file qtextengine_p.h.

Referenced by addOverline(), clearDecorations(), and drawDecorations().

◆ position

◆ rawFont

QRawFont QTextEngine::rawFont

Definition at line 531 of file qtextengine_p.h.

Referenced by fontEngine(), and QTextLayout::setRawFont().

◆ stackEngine

uint QTextEngine::stackEngine

◆ strikeOutList

ItemDecorationList QTextEngine::strikeOutList

Definition at line 553 of file qtextengine_p.h.

Referenced by addStrikeOut(), clearDecorations(), and drawDecorations().

◆ text

QString QTextEngine::text

◆ underlineList

ItemDecorationList QTextEngine::underlineList

Definition at line 552 of file qtextengine_p.h.

Referenced by addUnderline(), adjustUnderlines(), clearDecorations(), and drawDecorations().

◆ useRawFont

uint QTextEngine::useRawFont

◆ visualMovement

uint QTextEngine::visualMovement

The documentation for this class was generated from the following files: