本文整理汇总了C++中Accessible::IsWidget方法的典型用法代码示例。如果您正苦于以下问题:C++ Accessible::IsWidget方法的具体用法?C++ Accessible::IsWidget怎么用?C++ Accessible::IsWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Accessible
的用法示例。
在下文中一共展示了Accessible::IsWidget方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AccStateChangeEvent
//.........这里部分代码省略.........
// If multiselect tree, we should fire selectionadd or selection removed
if (FocusMgr()->HasDOMFocus(targetNode)) {
nsCOMPtr<nsIDOMXULMultiSelectControlElement> multiSel =
do_QueryInterface(targetNode);
nsAutoString selType;
multiSel->GetSelType(selType);
if (selType.IsEmpty() || !selType.EqualsLiteral("single")) {
// XXX: We need to fire EVENT_SELECTION_ADD and EVENT_SELECTION_REMOVE
// for each tree item. Perhaps each tree item will need to cache its
// selection state and fire an event after a DOM "select" event when
// that state changes. XULTreeAccessible::UpdateTreeSelection();
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_SELECTION_WITHIN,
accessible);
return;
}
nsRefPtr<AccSelChangeEvent> selChangeEvent =
new AccSelChangeEvent(treeAcc, treeItemAcc,
AccSelChangeEvent::eSelectionAdd);
nsEventShell::FireEvent(selChangeEvent);
return;
}
}
else
#endif
if (eventType.EqualsLiteral("AlertActive")) {
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_ALERT, accessible);
}
else if (eventType.EqualsLiteral("popupshown")) {
HandlePopupShownEvent(accessible);
}
else if (eventType.EqualsLiteral("DOMMenuInactive")) {
if (accessible->Role() == roles::MENUPOPUP) {
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END,
accessible);
}
}
else if (eventType.EqualsLiteral("DOMMenuItemActive")) {
FocusMgr()->ActiveItemChanged(accessible);
#ifdef A11Y_LOG
if (logging::IsEnabled(logging::eFocus))
logging::ActiveItemChangeCausedBy("DOMMenuItemActive", accessible);
#endif
}
else if (eventType.EqualsLiteral("DOMMenuItemInactive")) {
// Process DOMMenuItemInactive event for autocomplete only because this is
// unique widget that may acquire focus from autocomplete popup while popup
// stays open and has no active item. In case of XUL tree autocomplete
// popup this event is fired for tree accessible.
Accessible* widget =
accessible->IsWidget() ? accessible : accessible->ContainerWidget();
if (widget && widget->IsAutoCompletePopup()) {
FocusMgr()->ActiveItemChanged(nullptr);
#ifdef A11Y_LOG
if (logging::IsEnabled(logging::eFocus))
logging::ActiveItemChangeCausedBy("DOMMenuItemInactive", accessible);
#endif
}
}
else if (eventType.EqualsLiteral("DOMMenuBarActive")) { // Always from user input
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENU_START,
accessible, eFromUserInput);
// Notify of active item change when menubar gets active and if it has
// current item. This is a case of mouseover (set current menuitem) and
// mouse click (activate the menubar). If menubar doesn't have current item
// (can be a case of menubar activation from keyboard) then ignore this
// notification because later we'll receive DOMMenuItemActive event after
// current menuitem is set.
Accessible* activeItem = accessible->CurrentItem();
if (activeItem) {
FocusMgr()->ActiveItemChanged(activeItem);
#ifdef A11Y_LOG
if (logging::IsEnabled(logging::eFocus))
logging::ActiveItemChangeCausedBy("DOMMenuBarActive", accessible);
#endif
}
}
else if (eventType.EqualsLiteral("DOMMenuBarInactive")) { // Always from user input
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENU_END,
accessible, eFromUserInput);
FocusMgr()->ActiveItemChanged(nullptr);
#ifdef A11Y_LOG
if (logging::IsEnabled(logging::eFocus))
logging::ActiveItemChangeCausedBy("DOMMenuBarInactive", accessible);
#endif
}
else if (accessible->NeedsDOMUIEvent() &&
eventType.EqualsLiteral("ValueChange")) {
targetDocument->FireDelayedEvent(nsIAccessibleEvent::EVENT_VALUE_CHANGE,
accessible);
}
#ifdef DEBUG_DRAGDROPSTART
else if (eventType.EqualsLiteral("mouseover")) {
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_DRAGDROP_START,
accessible);
}
#endif
}