本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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;
}