本文整理汇总了C++中TableAccessible::AsAccessible方法的典型用法代码示例。如果您正苦于以下问题:C++ TableAccessible::AsAccessible方法的具体用法?C++ TableAccessible::AsAccessible怎么用?C++ TableAccessible::AsAccessible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TableAccessible
的用法示例。
在下文中一共展示了TableAccessible::AsAccessible方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Table
void
XULListCellAccessible::ColHeaderCells(nsTArray<Accessible*>* aCells)
{
TableAccessible* table = Table();
NS_ASSERTION(table, "cell not in a table!");
if (!table)
return;
// Get column header cell from XUL listhead.
Accessible* list = nullptr;
Accessible* tableAcc = table->AsAccessible();
uint32_t tableChildCount = tableAcc->ChildCount();
for (uint32_t childIdx = 0; childIdx < tableChildCount; childIdx++) {
Accessible* child = tableAcc->GetChildAt(childIdx);
if (child->Role() == roles::LIST) {
list = child;
break;
}
}
if (list) {
Accessible* headerCell = list->GetChildAt(ColIdx());
if (headerCell) {
aCells->AppendElement(headerCell);
return;
}
}
// No column header cell from XUL markup, try to get it from ARIA markup.
TableCellAccessible::ColHeaderCells(aCells);
}
示例2: GroupPosition
GroupPos ARIAGridCellAccessible::GroupPosition() {
int32_t count = 0, index = 0;
TableAccessible* table = Table();
if (table &&
nsCoreUtils::GetUIntAttr(table->AsAccessible()->GetContent(),
nsGkAtoms::aria_colcount, &count) &&
nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_colindex, &index)) {
return GroupPos(0, index, count);
}
return GroupPos();
}
示例3: Intl
NS_IMETHODIMP
xpcAccessibleTableCell::GetTable(nsIAccessibleTable** aTable)
{
NS_ENSURE_ARG_POINTER(aTable);
*aTable = nullptr;
if (!Intl())
return NS_ERROR_FAILURE;
TableAccessible* table = Intl()->Table();
if (!table)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIAccessibleTable> xpcTable =
do_QueryInterface(static_cast<nsIAccessible*>(ToXPC(table->AsAccessible())));
xpcTable.forget(aTable);
return NS_OK;
}