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


C++ AXObject::children方法代码示例

本文整理汇总了C++中AXObject::children方法的典型用法代码示例。如果您正苦于以下问题:C++ AXObject::children方法的具体用法?C++ AXObject::children怎么用?C++ AXObject::children使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AXObject的用法示例。


在下文中一共展示了AXObject::children方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: handleScrollPositionChanged

void AXObjectCacheImpl::handleScrollPositionChanged(FrameView* frameView)
{
    // Prefer to fire the scroll position changed event on the frame view's child web area, if possible.
    AXObject* targetAXObject = getOrCreate(frameView);
    if (targetAXObject && !targetAXObject->children().isEmpty())
        targetAXObject = targetAXObject->children()[0].get();
    postPlatformNotification(targetAXObject, AXScrollPositionChanged);
}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:8,代码来源:AXObjectCacheImpl.cpp

示例2: rowIndexRange

void AXARIAGridCell::rowIndexRange(pair<unsigned, unsigned>& rowRange)
{
    AXObject* parent = parentObjectUnignored();
    if (!parent)
        return;

    if (parent->isTableRow()) {
        // We already got a table row, use its API.
        rowRange.first = toAXTableRow(parent)->rowIndex();
    } else if (parent->isAXTable()) {
        // We reached the parent table, so we need to inspect its
        // children to determine the row index for the cell in it.
        unsigned columnCount = toAXTable(parent)->columnCount();
        if (!columnCount)
            return;

        AccessibilityChildrenVector siblings = parent->children();
        unsigned childrenSize = siblings.size();
        for (unsigned k = 0; k < childrenSize; ++k) {
            if (siblings[k].get() == this) {
                rowRange.first = k / columnCount;
                break;
            }
        }
    }

    // as far as I can tell, grid cells cannot span rows
    rowRange.second = 1;
}
开发者ID:kjthegod,项目名称:WebKit,代码行数:29,代码来源:AXARIAGridCell.cpp

示例3: focusedImageMapUIElement

AXObject* AXObjectCache::focusedImageMapUIElement(HTMLAreaElement* areaElement)
{
    // Find the corresponding accessibility object for the HTMLAreaElement. This should be
    // in the list of children for its corresponding image.
    if (!areaElement)
        return 0;

    HTMLImageElement* imageElement = areaElement->imageElement();
    if (!imageElement)
        return 0;

    AXObject* axRenderImage = areaElement->document().axObjectCache()->getOrCreate(imageElement);
    if (!axRenderImage)
        return 0;

    AXObject::AccessibilityChildrenVector imageChildren = axRenderImage->children();
    unsigned count = imageChildren.size();
    for (unsigned k = 0; k < count; ++k) {
        AXObject* child = imageChildren[k].get();
        if (!child->isImageMapLink())
            continue;

        if (toAXImageMapLink(child)->areaElement() == areaElement)
            return child;
    }

    return 0;
}
开发者ID:kublaj,项目名称:blink,代码行数:28,代码来源:AXObjectCache.cpp

示例4: columnIndexRange

void AXARIAGridCell::columnIndexRange(pair<unsigned, unsigned>& columnRange)
{
    AXObject* parent = parentObjectUnignored();
    if (!parent)
        return;

    if (!parent->isTableRow() && !parent->isAXTable())
        return;

    AccessibilityChildrenVector siblings = parent->children();
    unsigned childrenSize = siblings.size();
    for (unsigned k = 0; k < childrenSize; ++k) {
        if (siblings[k].get() == this) {
            columnRange.first = k;
            break;
        }
    }

    // as far as I can tell, grid cells cannot span columns
    columnRange.second = 1;
}
开发者ID:kjthegod,项目名称:WebKit,代码行数:21,代码来源:AXARIAGridCell.cpp


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