本文整理汇总了C++中Accessible::IsTextLeaf方法的典型用法代码示例。如果您正苦于以下问题:C++ Accessible::IsTextLeaf方法的具体用法?C++ Accessible::IsTextLeaf怎么用?C++ Accessible::IsTextLeaf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Accessible
的用法示例。
在下文中一共展示了Accessible::IsTextLeaf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TotalItemCount
uint32_t AccGroupInfo::TotalItemCount(Accessible* aContainer,
bool* aIsHierarchical) {
uint32_t itemCount = 0;
switch (aContainer->Role()) {
case roles::TABLE:
if (nsCoreUtils::GetUIntAttr(aContainer->GetContent(),
nsGkAtoms::aria_rowcount,
(int32_t*)&itemCount)) {
break;
}
if (TableAccessible* tableAcc = aContainer->AsTable()) {
return tableAcc->RowCount();
}
break;
case roles::ROW:
if (Accessible* table = nsAccUtils::TableFor(aContainer)) {
if (nsCoreUtils::GetUIntAttr(table->GetContent(),
nsGkAtoms::aria_colcount,
(int32_t*)&itemCount)) {
break;
}
if (TableAccessible* tableAcc = table->AsTable()) {
return tableAcc->ColCount();
}
}
break;
case roles::OUTLINE:
case roles::LIST:
case roles::MENUBAR:
case roles::MENUPOPUP:
case roles::COMBOBOX:
case roles::GROUPING:
case roles::TREE_TABLE:
case roles::COMBOBOX_LIST:
case roles::LISTBOX:
case roles::DEFINITION_LIST:
case roles::EDITCOMBOBOX:
case roles::RADIO_GROUP:
case roles::PAGETABLIST: {
Accessible* childItem = AccGroupInfo::FirstItemOf(aContainer);
if (!childItem) {
childItem = aContainer->FirstChild();
if (childItem && childItem->IsTextLeaf()) {
// First child can be a text leaf, check its sibling for an item.
childItem = childItem->NextSibling();
}
}
if (childItem) {
GroupPos groupPos = childItem->GroupPosition();
itemCount = groupPos.setSize;
if (groupPos.level && aIsHierarchical) {
*aIsHierarchical = true;
}
}
break;
}
default:
break;
}
return itemCount;
}