Logo Search packages:      
Sourcecode: xulrunner version File versions  Download package

nsresult nsXULComboboxAccessible::GetStateInternal ( PRUint32 *  aState,
PRUint32 *  aExtraState 
) [virtual]

As a nsComboboxAccessible we can have the following states: STATE_FOCUSED STATE_FOCUSABLE STATE_HASPOPUP STATE_EXPANDED STATE_COLLAPSED

Definition at line 1060 of file nsXULSelectAccessible.cpp.

{
  // Get focus status from base class
  nsresult rv = nsAccessible::GetStateInternal(aState, aExtraState);
  NS_ENSURE_A11Y_SUCCESS(rv, rv);

  nsCOMPtr<nsIDOMXULMenuListElement> menuList(do_QueryInterface(mDOMNode));
  if (menuList) {
    PRBool isOpen;
    menuList->GetOpen(&isOpen);
    if (isOpen) {
      *aState |= nsIAccessibleStates::STATE_EXPANDED;
    }
    else {
      *aState |= nsIAccessibleStates::STATE_COLLAPSED;
    }
  }

  *aState |= nsIAccessibleStates::STATE_HASPOPUP |
             nsIAccessibleStates::STATE_FOCUSABLE;

  return NS_OK;
}


Generated by  Doxygen 1.6.0   Back to index