当前位置: 首页>>代码示例>>C++>>正文


C++ LayoutMultiColumnFlowThread::appendNewFragmentainerGroupIfNeeded方法代码示例

本文整理汇总了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);
}
开发者ID:dstockwell,项目名称:blink,代码行数:20,代码来源:LayoutMultiColumnSet.cpp


注:本文中的LayoutMultiColumnFlowThread::appendNewFragmentainerGroupIfNeeded方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。