MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / reflow

Method reflow

Engine/source/gui/controls/guiMLTextCtrl.cpp:1620–2140  ·  view source on GitHub ↗

--------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1618
1619//--------------------------------------------------------------------------
1620void GuiMLTextCtrl::reflow()
1621{
1622 AssertFatal(mAwake, "Can't reflow a sleeping control.");
1623 freeLineBuffers();
1624 mDirty = false;
1625 mScanPos = 0;
1626
1627 mLineList = NULL;
1628 mLineInsert = &mLineList;
1629
1630 mCurStyle = allocStyle(NULL);
1631 mCurStyle->font = allocFont((char *) mProfile->mFontType, dStrlen(mProfile->mFontType), mProfile->mFontSize);
1632 if(!mCurStyle->font)
1633 return;
1634 mCurStyle->color = mProfile->mFontColor;
1635 mCurStyle->shadowColor = mProfile->mFontColor;
1636 mCurStyle->shadowOffset.set(0,0);
1637 mCurStyle->linkColor = mProfile->mFontColors[GuiControlProfile::ColorUser0];
1638 mCurStyle->linkColorHL = mProfile->mFontColors[GuiControlProfile::ColorUser1];
1639
1640 U32 width = getWidth();
1641
1642 mCurLMargin = 0;
1643 mCurRMargin = width;
1644 mCurJustify = LeftJustify;
1645 mCurDiv = 0;
1646 mCurY = 0;
1647 mCurX = 0;
1648 mCurClipX = 0;
1649 mLineAtoms = NULL;
1650 mLineAtomPtr = &mLineAtoms;
1651
1652 mSentinel.point.x = width;
1653 mSentinel.point.y = 0;
1654 mSentinel.extent.x = 0;
1655 mSentinel.extent.y = 0x7FFFFF;
1656 mSentinel.nextBlocker = NULL;
1657 mLineStart = 0;
1658 mEmitAtoms = 0;
1659 mMaxY = 0;
1660 mEmitAtomPtr = &mEmitAtoms;
1661
1662 mBlockList = &mSentinel;
1663
1664 Font *nextFont;
1665 LineTag *nextTag;
1666 mTabStops = 0;
1667 mCurTabStop = 0;
1668 mTabStopCount = 0;
1669 mCurURL = 0;
1670 Style *newStyle;
1671
1672 U32 textStart;
1673 U32 len;
1674 U32 idx;
1675 U32 sizidx;
1676
1677 for(;;)

Callers 1

guiMLTextCtrl.cppFile · 0.80

Calls 13

getWidthFunction · 0.85
getNthCodepointFunction · 0.85
dStrnicmpFunction · 0.85
scanforcharFunction · 0.85
scanforURLFunction · 0.85
setHeightFunction · 0.85
getCharMethod · 0.80
getPtr8Method · 0.80
getHexValFunction · 0.70
dStrlenFunction · 0.50
dAtoiFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected