本文整理汇总了C++中accessibilityobject::AccessibilityChildrenVector::at方法的典型用法代码示例。如果您正苦于以下问题:C++ AccessibilityChildrenVector::at方法的具体用法?C++ AccessibilityChildrenVector::at怎么用?C++ AccessibilityChildrenVector::at使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类accessibilityobject::AccessibilityChildrenVector
的用法示例。
在下文中一共展示了AccessibilityChildrenVector::at方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getInterfaceMaskFromObject
static guint16 getInterfaceMaskFromObject(AccessibilityObject* coreObject)
{
guint16 interfaceMask = 0;
// Component interface is always supported
interfaceMask |= 1 << WAI_COMPONENT;
AccessibilityRole role = coreObject->roleValue();
// Action
// As the implementation of the AtkAction interface is a very
// basic one (just relays in executing the default action for each
// object, and only supports having one action per object), it is
// better just to implement this interface for every instance of
// the WebKitAccessible class and let WebCore decide what to do.
interfaceMask |= 1 << WAI_ACTION;
// Selection
if (coreObject->isListBox() || coreObject->isMenuList())
interfaceMask |= 1 << WAI_SELECTION;
// Get renderer if available.
RenderObject* renderer = 0;
if (coreObject->isAccessibilityRenderObject())
renderer = coreObject->renderer();
// Hyperlink (links and embedded objects).
if (coreObject->isLink() || (renderer && renderer->isReplaced()))
interfaceMask |= 1 << WAI_HYPERLINK;
// Text & Editable Text
if (role == StaticTextRole || coreObject->isMenuListOption())
interfaceMask |= 1 << WAI_TEXT;
else {
if (coreObject->isTextControl()) {
interfaceMask |= 1 << WAI_TEXT;
if (!coreObject->isReadOnly())
interfaceMask |= 1 << WAI_EDITABLE_TEXT;
} else {
if (role != TableRole) {
interfaceMask |= 1 << WAI_HYPERTEXT;
if ((renderer && renderer->childrenInline()) || roleIsTextType(role))
interfaceMask |= 1 << WAI_TEXT;
}
// Add the TEXT interface for list items whose
// first accessible child has a text renderer
if (role == ListItemRole) {
AccessibilityObject::AccessibilityChildrenVector children = coreObject->children();
if (children.size()) {
AccessibilityObject* axRenderChild = children.at(0).get();
interfaceMask |= getInterfaceMaskFromObject(axRenderChild);
}
}
}
}
// Image
if (coreObject->isImage())
interfaceMask |= 1 << WAI_IMAGE;
// Table
if (role == TableRole)
interfaceMask |= 1 << WAI_TABLE;
// Document
if (role == WebAreaRole)
interfaceMask |= 1 << WAI_DOCUMENT;
// Value
if (role == SliderRole || role == SpinButtonRole || role == ScrollBarRole)
interfaceMask |= 1 << WAI_VALUE;
return interfaceMask;
}