Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsXFormsChoicesElement.cpp File Reference
#include "nsIXFormsSelectChild.h"
#include "nsXFormsStubElement.h"
#include "nsIDOMHTMLOptGroupElement.h"
#include "nsString.h"
#include "nsCOMPtr.h"
#include "nsIXTFBindableElementWrapper.h"
#include "nsIDOMDocument.h"
#include "nsIDOMNodeList.h"
#include "nsIXFormsControl.h"
#include "nsXFormsUtils.h"

Go to the source code of this file.

Classes

class  nsXFormsChoicesElement

Functions

 NS_IMPL_ISUPPORTS_INHERITED1 (nsXFormsChoicesElement, nsXFormsBindableStub, nsIXFormsSelectChild) NS_IMETHODIMP nsXFormsChoicesElement
 NS_NewXFormsChoicesElement (nsIXTFElement **aResult)

Function Documentation

Definition at line 79 of file nsXFormsChoicesElement.cpp.

{
  nsresult rv = nsXFormsBindableStub::OnCreated(aWrapper);
  NS_ENSURE_SUCCESS(rv, rv);

  aWrapper->SetNotificationMask(nsIXTFElement::NOTIFY_PARENT_CHANGED |
                                nsIXTFElement::NOTIFY_CHILD_INSERTED |
                                nsIXTFElement::NOTIFY_CHILD_APPENDED |
                                nsIXTFElement::NOTIFY_CHILD_REMOVED |
                                nsIXTFElement::NOTIFY_BEGIN_ADDING_CHILDREN);

  nsCOMPtr<nsIDOMElement> node;
  aWrapper->GetElementNode(getter_AddRefs(node));

  // It's ok to keep a pointer to mElement.  mElement will have an
  // owning reference to this object, so as long as we null out mElement in
  // OnDestroyed, it will always be valid.

  mElement = node;
  NS_ASSERTION(mElement, "Wrapper is not an nsIDOMElement, we'll crash soon");

  return NS_OK;
}

Here is the call graph for this function:

Definition at line 274 of file nsXFormsChoicesElement.cpp.

{
  *aResult = new nsXFormsChoicesElement();
  if (!*aResult)
    return NS_ERROR_OUT_OF_MEMORY;

  NS_ADDREF(*aResult);
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function: