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

NS_IMETHODIMP nsXULComboboxAccessible::GetActionName ( PRUint8  aIndex,
nsAString aName 
)

Our action name is the reverse of our state: if we are closed -> open is our name. if we are open -> closed is our name. Uses the frame to get the state, updated on every click

Definition at line 1175 of file nsXULSelectAccessible.cpp.

{
  if (aIndex != nsXULComboboxAccessible::eAction_Click) {
    return NS_ERROR_INVALID_ARG;
  }

  nsCOMPtr<nsIDOMXULMenuListElement> menuList(do_QueryInterface(mDOMNode));
  if (!menuList) {
    return NS_ERROR_FAILURE;
  }
  PRBool isDroppedDown;
  menuList->GetOpen(&isDroppedDown);
  if (isDroppedDown)
    aName.AssignLiteral("close"); 
  else
    aName.AssignLiteral("open"); 

  return NS_OK;
}


Generated by  Doxygen 1.6.0   Back to index