本文整理汇总了C++中LayoutMultiColumnFlowThread::appendNewFragmentainerGroupIfNeeded方法的典型用法代码示例。如果您正苦于以下问题:C++ LayoutMultiColumnFlowThread::appendNewFragmentainerGroupIfNeeded方法的具体用法?C++ LayoutMultiColumnFlowThread::appendNewFragmentainerGroupIfNeeded怎么用?C++ LayoutMultiColumnFlowThread::appendNewFragmentainerGroupIfNeeded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayoutMultiColumnFlowThread
的用法示例。
在下文中一共展示了LayoutMultiColumnFlowThread::appendNewFragmentainerGroupIfNeeded方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: recordSpaceShortage
void LayoutMultiColumnSet::recordSpaceShortage(LayoutUnit offsetInFlowThread, LayoutUnit spaceShortage)
{
MultiColumnFragmentainerGroup& row = fragmentainerGroupAtFlowThreadOffset(offsetInFlowThread);
row.recordSpaceShortage(spaceShortage);
// Since we're at a potential break here, take the opportunity to check if we need another
// fragmentainer group. If we've run out of columns in the last fragmentainer group (column
// row), we need to insert another fragmentainer group to hold more columns.
if (!row.isLastGroup())
return;
LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread();
if (!flowThread->multiColumnBlockFlow()->isInsideFlowThread())
return; // Early bail. We're not nested, so waste no more time on this.
if (!flowThread->isInInitialLayoutPass())
return;
// Move the offset to where the next column starts, if we're not there already.
offsetInFlowThread += flowThread->pageRemainingLogicalHeightForOffset(offsetInFlowThread, AssociateWithFormerPage);
flowThread->appendNewFragmentainerGroupIfNeeded(offsetInFlowThread);
}