Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes
nsHTMLSelectableAccessible::iterator Class Reference

#include <nsHTMLSelectAccessible.h>

Collaboration diagram for nsHTMLSelectableAccessible::iterator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void Shutdown ()
 iterator (nsHTMLSelectableAccessible *aParent, nsIWeakReference *aWeakShell)
 Selects, Listboxes and Comboboxes, are made up of a number of different widgets, some of which are shared between the two.
void CalcSelectionCount (PRInt32 *aSelectionCount)
void Select (PRBool aSelect)
void AddAccessibleIfSelected (nsIAccessibilityService *aAccService, nsIMutableArray *aSelectedAccessibles, nsPresContext *aContext)
PRBool GetAccessibleIfSelected (PRInt32 aIndex, nsIAccessibilityService *aAccService, nsPresContext *aContext, nsIAccessible **_retval)
PRBool Advance ()

Protected Attributes

PRUint32 mLength
PRUint32 mIndex
PRInt32 mSelCount
nsCOMPtr
< nsIDOMHTMLOptionsCollection
mOptions
nsCOMPtr< nsIDOMHTMLOptionElementmOption
nsCOMPtr< nsIWeakReferencemWeakShell
nsHTMLSelectableAccessiblemParentSelect

Detailed Description

Definition at line 90 of file nsHTMLSelectAccessible.h.


Constructor & Destructor Documentation

Selects, Listboxes and Comboboxes, are made up of a number of different widgets, some of which are shared between the two.

This file contains all of the widgets for both of the Selects, for HTML only.

Listbox:

Comboboxes:

Definition at line 76 of file nsHTMLSelectAccessible.cpp.

                                                                                                             : 
  mWeakShell(aWeakShell), mParentSelect(aParent)
{
  mLength = mIndex = 0;
  mSelCount = 0;

  nsCOMPtr<nsIDOMHTMLSelectElement> htmlSelect(do_QueryInterface(mParentSelect->mDOMNode));
  if (htmlSelect) {
    htmlSelect->GetOptions(getter_AddRefs(mOptions));
    if (mOptions)
      mOptions->GetLength(&mLength);
  }
}

Here is the call graph for this function:


Member Function Documentation

Definition at line 115 of file nsHTMLSelectAccessible.cpp.

{
  PRBool isSelected = PR_FALSE;
  nsCOMPtr<nsIAccessible> tempAccess;

  if (mOption) {
    mOption->GetSelected(&isSelected);
    if (isSelected) {
      nsCOMPtr<nsIDOMNode> optionNode(do_QueryInterface(mOption));
      aAccService->GetAccessibleInWeakShell(optionNode, mWeakShell, getter_AddRefs(tempAccess));
    }
  }

  if (tempAccess)
    aSelectedAccessibles->AppendElement(NS_STATIC_CAST(nsISupports*, tempAccess), PR_FALSE);
}

Here is the call graph for this function:

Definition at line 90 of file nsHTMLSelectAccessible.cpp.

{
  if (mIndex < mLength) {
    nsCOMPtr<nsIDOMNode> tempNode;
    if (mOptions) {
      mOptions->Item(mIndex, getter_AddRefs(tempNode));
      mOption = do_QueryInterface(tempNode);
    }
    mIndex++;
    return PR_TRUE;
  }
  return PR_FALSE;
}

Here is the call graph for this function:

Definition at line 104 of file nsHTMLSelectAccessible.cpp.

{
  PRBool isSelected = PR_FALSE;

  if (mOption)
    mOption->GetSelected(&isSelected);

  if (isSelected)
    (*aSelectionCount)++;
}

Definition at line 134 of file nsHTMLSelectAccessible.cpp.

{
  PRBool isSelected = PR_FALSE;

  *aAccessible = nsnull;

  if (mOption) {
    mOption->GetSelected(&isSelected);
    if (isSelected) {
      if (mSelCount == aIndex) {
        nsCOMPtr<nsIDOMNode> optionNode(do_QueryInterface(mOption));
        aAccService->GetAccessibleInWeakShell(optionNode, mWeakShell, aAccessible);
        return PR_TRUE;
      }
      mSelCount++;
    }
  }

  return PR_FALSE;
}

Here is the call graph for this function:

Definition at line 158 of file nsHTMLSelectAccessible.cpp.

{
  if (mOption)
    mOption->SetSelected(aSelect);
}

Member Data Documentation

Definition at line 94 of file nsHTMLSelectAccessible.h.

Definition at line 93 of file nsHTMLSelectAccessible.h.

Definition at line 97 of file nsHTMLSelectAccessible.h.

Definition at line 96 of file nsHTMLSelectAccessible.h.

Definition at line 99 of file nsHTMLSelectAccessible.h.

Definition at line 95 of file nsHTMLSelectAccessible.h.

Definition at line 98 of file nsHTMLSelectAccessible.h.


The documentation for this class was generated from the following files: