Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Protected Attributes
nsXFormsCaseElement Class Reference

Implementation of the XForms case element. More...

Inheritance diagram for nsXFormsCaseElement:
Inheritance graph
[legend]
Collaboration diagram for nsXFormsCaseElement:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIXFORMSCASEELEMENT
NS_IMETHOD 
OnCreated (nsIXTFBindableElementWrapper *aWrapper)
NS_IMETHOD OnDestroyed ()
NS_IMETHOD DoneAddingChildren ()
 nsXFormsCaseElement ()
void onCreated (in nsIXTFBindableElementWrapper wrapper)
 onCreated will be called before any notifications are sent to the xtf element.
void onDestroyed ()
void getScriptingInterfaces (out unsigned long count,[array, size_is(count), retval] out nsIIDPtr array)
void willChangeDocument (in nsIDOMDocument newDoc)
void documentChanged (in nsIDOMDocument newDoc)
void willChangeParent (in nsIDOMElement newParent)
void parentChanged (in nsIDOMElement newParent)
void willInsertChild (in nsIDOMNode child, in unsigned long index)
void childInserted (in nsIDOMNode child, in unsigned long index)
void willAppendChild (in nsIDOMNode child)
void childAppended (in nsIDOMNode child)
void willRemoveChild (in unsigned long index)
void childRemoved (in unsigned long index)
void willSetAttribute (in nsIAtom name, in AString newValue)
void attributeSet (in nsIAtom name, in AString newValue)
void willRemoveAttribute (in nsIAtom name)
void attributeRemoved (in nsIAtom name)
void beginAddingChildren ()
void doneAddingChildren ()
boolean handleDefault (in nsIDOMEvent aEvent)
void cloneState (in nsIDOMElement aElement)
void setSelected (in boolean aEnable)
 Used by switch elements to mark case element selected or deselected.
void widgetAttached ()
 This should be called by the XBL widget, when it is created.

Public Attributes

const unsigned long ELEMENT_TYPE_GENERIC_ELEMENT = 0
const unsigned long ELEMENT_TYPE_SVG_VISUAL = 1
const unsigned long ELEMENT_TYPE_XML_VISUAL = 2
const unsigned long ELEMENT_TYPE_XUL_VISUAL = 3
const unsigned long ELEMENT_TYPE_BINDABLE = 4
readonly attribute unsigned long elementType
readonly attribute boolean isAttributeHandler
const unsigned long NOTIFY_WILL_CHANGE_DOCUMENT = 0x00000001
const unsigned long NOTIFY_DOCUMENT_CHANGED = 0x00000002
const unsigned long NOTIFY_WILL_CHANGE_PARENT = 0x00000004
const unsigned long NOTIFY_PARENT_CHANGED = 0x00000008
const unsigned long NOTIFY_WILL_INSERT_CHILD = 0x00000010
const unsigned long NOTIFY_CHILD_INSERTED = 0x00000020
const unsigned long NOTIFY_WILL_APPEND_CHILD = 0x00000040
const unsigned long NOTIFY_CHILD_APPENDED = 0x00000080
const unsigned long NOTIFY_WILL_REMOVE_CHILD = 0x00000100
const unsigned long NOTIFY_CHILD_REMOVED = 0x00000200
const unsigned long NOTIFY_WILL_SET_ATTRIBUTE = 0x00000400
const unsigned long NOTIFY_ATTRIBUTE_SET = 0x00000800
const unsigned long NOTIFY_WILL_REMOVE_ATTRIBUTE = 0x00001000
const unsigned long NOTIFY_ATTRIBUTE_REMOVED = 0x00002000
const unsigned long NOTIFY_BEGIN_ADDING_CHILDREN = 0x00004000
const unsigned long NOTIFY_DONE_ADDING_CHILDREN = 0x00008000
const unsigned long NOTIFY_HANDLE_DEFAULT = 0x00010000
readonly attribute boolean initialSelectedState
 According to the XForms 1.0 Errata, the "selected" attribute only determines the initial selected state.

Protected Attributes

nsIDOMElementmElement
PRPackedBool mSelected
PRPackedBool mCachedSelectedAttr

Detailed Description

Implementation of the XForms case element.

Definition at line 54 of file nsXFormsCaseElement.cpp.


Constructor & Destructor Documentation


Member Function Documentation

void nsIXTFElement::attributeSet ( in nsIAtom  name,
in AString  newValue 
) [inherited]
void nsIXTFElement::childInserted ( in nsIDOMNode  child,
in unsigned long  index 
) [inherited]
void nsIXTFElement::childRemoved ( in unsigned long  index) [inherited]
void nsIXTFElement::cloneState ( in nsIDOMElement  aElement) [inherited]

Definition at line 108 of file nsXFormsCaseElement.cpp.

{
  // cache the value of the "selected" attr
  nsAutoString value;
  mElement->GetAttribute(NS_LITERAL_STRING("selected"), value);
  if (value.EqualsLiteral("true") || value.EqualsLiteral("1")) {
    mCachedSelectedAttr = PR_TRUE;
  }

  return NS_OK;
}
void nsIXTFElement::getScriptingInterfaces ( out unsigned long  count,
[array, size_is(count), retval] out nsIIDPtr  array 
) [inherited]

onCreated will be called before any notifications are sent to the xtf element.

Parameters:
wrapperis a weak proxy to the wrapping element (i.e. holding a reference to this will not create a cycle).

Definition at line 101 of file nsXFormsCaseElement.cpp.

{
  mElement = nsnull;
  return NS_OK;
}
void nsIXTFElement::parentChanged ( in nsIDOMElement  newParent) [inherited]

Used by switch elements to mark case element selected or deselected.

This should be called by the XBL widget, when it is created.

void nsIXTFElement::willInsertChild ( in nsIDOMNode  child,
in unsigned long  index 
) [inherited]
void nsIXTFElement::willRemoveChild ( in unsigned long  index) [inherited]
void nsIXTFElement::willSetAttribute ( in nsIAtom  name,
in AString  newValue 
) [inherited]

Member Data Documentation

Definition at line 72 of file nsIXTFElement.idl.

Definition at line 56 of file nsIXTFElement.idl.

Definition at line 60 of file nsIXTFElement.idl.

Definition at line 64 of file nsIXTFElement.idl.

Definition at line 68 of file nsIXTFElement.idl.

readonly attribute unsigned long nsIXTFElement::elementType [inherited]

Definition at line 78 of file nsIXTFElement.idl.

According to the XForms 1.0 Errata, the "selected" attribute only determines the initial selected state.

This provides access to the initial state of the "selected" attribute, since it can be programmatically changed via the DOM. (see http://www.w3.org/2003/10/REC-xforms-10-20031014-errata.html#E25b)

Definition at line 54 of file nsIXFormsCaseElement.idl.

Definition at line 86 of file nsIXTFElement.idl.

Definition at line 73 of file nsXFormsCaseElement.cpp.

Definition at line 71 of file nsXFormsCaseElement.cpp.

Definition at line 72 of file nsXFormsCaseElement.cpp.

const unsigned long nsIXTFElement::NOTIFY_ATTRIBUTE_REMOVED = 0x00002000 [inherited]

Definition at line 118 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_ATTRIBUTE_SET = 0x00000800 [inherited]

Definition at line 115 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_BEGIN_ADDING_CHILDREN = 0x00004000 [inherited]

Definition at line 120 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_CHILD_APPENDED = 0x00000080 [inherited]

Definition at line 109 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_CHILD_INSERTED = 0x00000020 [inherited]

Definition at line 106 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_CHILD_REMOVED = 0x00000200 [inherited]

Definition at line 112 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_DOCUMENT_CHANGED = 0x00000002 [inherited]

Definition at line 100 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_DONE_ADDING_CHILDREN = 0x00008000 [inherited]

Definition at line 121 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_HANDLE_DEFAULT = 0x00010000 [inherited]

Definition at line 123 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_PARENT_CHANGED = 0x00000008 [inherited]

Definition at line 103 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_WILL_APPEND_CHILD = 0x00000040 [inherited]

Definition at line 108 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_WILL_CHANGE_DOCUMENT = 0x00000001 [inherited]

Definition at line 99 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_WILL_CHANGE_PARENT = 0x00000004 [inherited]

Definition at line 102 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_WILL_INSERT_CHILD = 0x00000010 [inherited]

Definition at line 105 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_WILL_REMOVE_ATTRIBUTE = 0x00001000 [inherited]

Definition at line 117 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_WILL_REMOVE_CHILD = 0x00000100 [inherited]

Definition at line 111 of file nsIXTFElement.idl.

const unsigned long nsIXTFElement::NOTIFY_WILL_SET_ATTRIBUTE = 0x00000400 [inherited]

Definition at line 114 of file nsIXTFElement.idl.


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