Back to index

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

Implementation for the accessors for a range element, nsIXFormsRangeAccessors. More...

#include <nsXFormsRangeAccessors.h>

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

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIXFORMSRANGEACCESSORS 
nsXFormsRangeAccessors (nsIDelegateInternal *aDelegate, nsIDOMElement *aElement)
NS_IMETHOD GetInterfaces (PRUint32 *aCount, nsIID ***aArray)
void Destroy ()
 Called by the owning delegate when it itself is destroyed.
DOMString getValue ()
 Get the value bound to the XForms control.
void setValue (in DOMString value)
 Set the value bound to the XForms control.
boolean isReadonly ()
boolean isRelevant ()
boolean isRequired ()
boolean isValid ()
boolean hasBoundNode ()
 true, if XForms control is bound to a node in a data model.
nsIDOMNode getBoundNode ()
 Node that the control is bound to in its data model.
void setContent (in nsIDOMNode aNode, in boolean aForceUpdate)
 Used to set the complete contents of the bound node.
void getInterfaces (out PRUint32 count,[array, size_is(count), retval] out nsIIDPtr array)
 Get an ordered list of the interface ids that instances of the class promise to implement.
nsISupports getHelperForLanguage (in PRUint32 language)
 Get a language mapping specific helper object that may assist in using objects of this class in a specific lanaguage.
boolean isInRange ()
void setInRange (in boolean aInRange)
 Used to tell the XForms processor whether the control can represent all of data in the bound node.
DOMString getRangeStart ()
 The start of the range interval.
DOMString getRangeEnd ()
 The end of the range interval.
DOMString getRangeStep ()
 The step size.

Public Attributes

readonly attribute string contractID
 A contract ID through which an instance of this class can be created (or accessed as a service, if |flags & SINGLETON|), or null.
readonly attribute string classDescription
 A human readable string naming the class, or null.
readonly attribute nsCIDPtr classID
 A class ID through which an instance of this class can be created (or accessed as a service, if |flags & SINGLETON|), or null.
readonly attribute PRUint32 implementationLanguage
 Return language type from list in nsIProgrammingLanguage.
const PRUint32 SINGLETON = 1 << 0
 Bitflags for 'flags' attribute.
const PRUint32 THREADSAFE = 1 << 1
const PRUint32 MAIN_THREAD_ONLY = 1 << 2
const PRUint32 DOM_OBJECT = 1 << 3
const PRUint32 PLUGIN_OBJECT = 1 << 4
const PRUint32 EAGER_CLASSINFO = 1 << 5
const PRUint32 CONTENT_NODE = 1 << 6
 'flags' attribute bitflag: whether objects of this type implement nsIContent.
const PRUint32 RESERVED = 1 << 31
readonly attribute PRUint32 flags
readonly attribute nsCID classIDNoAlloc
 Also a class ID through which an instance of this class can be created (or accessed as a service, if |flags & SINGLETON|).

Protected Member Functions

nsresult AttributeGetter (const nsAString &aAttr, nsAString &aVal)
 Gets the value of an attribute on the element (mElement).
nsresult GetState (PRInt32 aState, PRBool *aStateVal)
 Checks the status of the model item properties.

Protected Attributes

nsIDelegateInternalmDelegate
 The delegate owning us.
nsIDOMElementmElement
 The control DOM element.

Detailed Description

Implementation for the accessors for a range element, nsIXFormsRangeAccessors.

Definition at line 47 of file nsXFormsRangeAccessors.h.


Constructor & Destructor Documentation

NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSIXFORMSRANGEACCESSORS nsXFormsRangeAccessors::nsXFormsRangeAccessors ( nsIDelegateInternal aDelegate,
nsIDOMElement aElement 
) [inline]

Definition at line 57 of file nsXFormsRangeAccessors.h.

    : nsXFormsRangeConditionAccessors(aDelegate, aElement)
  {
  }

Member Function Documentation

nsresult nsXFormsRangeAccessors::AttributeGetter ( const nsAString &  aAttr,
nsAString &  aVal 
) [protected]

Gets the value of an attribute on the element (mElement).

Parameters:
aAttrThe attribute
aValThe returned value ("DOMNull"s it if it's not there or empty)

Called by the owning delegate when it itself is destroyed.

Definition at line 53 of file nsXFormsAccessors.cpp.

Node that the control is bound to in its data model.

nsISupports nsIClassInfo::getHelperForLanguage ( in PRUint32  language) [inherited]

Get a language mapping specific helper object that may assist in using objects of this class in a specific lanaguage.

For instance, if asked for the helper for nsIProgrammingLanguage::JAVASCRIPT this might return an object that can be QI'd into the nsIXPCScriptable interface to assist XPConnect in supplying JavaScript specific behavior to callers of the instance object.

see: nsIProgrammingLanguage.idl

Should return null if no helper available for given language.

void nsIClassInfo::getInterfaces ( out PRUint32  count,
[array, size_is(count), retval] out nsIIDPtr  array 
) [inherited]

Get an ordered list of the interface ids that instances of the class promise to implement.

Note that nsISupports is an implicit member of any such list and need not be included.

Should set *count = 0 and *array = null and return NS_OK if getting the list is not supported.

Reimplemented from nsXFormsRangeConditionAccessors.

Definition at line 103 of file nsXFormsRangeAccessors.cpp.

{
  return nsXFormsUtils::CloneScriptingInterfaces(sScriptingIIDs,
                                                 NS_ARRAY_LENGTH(sScriptingIIDs),
                                                 aCount, aArray);
}
DOMString nsIXFormsRangeAccessors::getRangeEnd ( ) [inherited]

The end of the range interval.

DOMString nsIXFormsRangeAccessors::getRangeStart ( ) [inherited]

The start of the range interval.

DOMString nsIXFormsRangeAccessors::getRangeStep ( ) [inherited]

The step size.

nsresult nsXFormsAccessors::GetState ( PRInt32  aState,
PRBool aStateVal 
) [protected, inherited]

Checks the status of the model item properties.

Parameters:
aStateThe state to check aStateVal The returned state

Definition at line 60 of file nsXFormsAccessors.cpp.

{
  NS_ENSURE_ARG_POINTER(aStateVal);
  nsCOMPtr<nsIContent> content(do_QueryInterface(mElement));
  *aStateVal = (content && (content->IntrinsicState() & aState));

  return NS_OK;
}

Here is the call graph for this function:

DOMString nsIXFormsAccessors::getValue ( ) [inherited]

Get the value bound to the XForms control.

true, if XForms control is bound to a node in a data model.

void nsIXFormsAccessors::setContent ( in nsIDOMNode  aNode,
in boolean  aForceUpdate 
) [inherited]

Used to set the complete contents of the bound node.

This function is meant to be used like setValue() except that it can be used to set more than just the first textnode contained under the bound node. If there is nothing contained under aNode, then all children of the bound node will be eliminated.

Parameters:
aNodesetContent will take the contents of aNode and copy them under the control's bound node.
aForceUpdateIndicates whether setContent should rebuild, recalculate, revalidate and refresh the model that this control is bound to prior to returning

Used to tell the XForms processor whether the control can represent all of data in the bound node.

For example, if there are 3 different space-seperated values in the instance data bound to a xf:select1 and the select1 only has one item, then the data must be out of the range of the control.

Parameters:
aInRangeIf false, the control should be styled as defined by out-of-range pseudo-class. If the control was previously in-range, then the xforms-out-of-range event should be dispatched. If true, the control should be styled as defined by in-range pseudo-class or the default style matching the control. If the data was previously out-of-range, then the xforms-in-range event should be dispatched.
void nsIXFormsAccessors::setValue ( in DOMString  value) [inherited]

Set the value bound to the XForms control.


Member Data Documentation

A human readable string naming the class, or null.

Definition at line 86 of file nsIClassInfo.idl.

readonly attribute nsCIDPtr nsIClassInfo::classID [inherited]

A class ID through which an instance of this class can be created (or accessed as a service, if |flags & SINGLETON|), or null.

Definition at line 92 of file nsIClassInfo.idl.

Also a class ID through which an instance of this class can be created (or accessed as a service, if |flags & SINGLETON|).

If the class does not have a CID, it should return NS_ERROR_NOT_AVAILABLE. This attribute exists so C++ callers can avoid allocating and freeing a CID, as would happen if they used classID.

Definition at line 130 of file nsIClassInfo.idl.

'flags' attribute bitflag: whether objects of this type implement nsIContent.

Definition at line 113 of file nsIClassInfo.idl.

A contract ID through which an instance of this class can be created (or accessed as a service, if |flags & SINGLETON|), or null.

Definition at line 81 of file nsIClassInfo.idl.

const PRUint32 nsIClassInfo::DOM_OBJECT = 1 << 3 [inherited]

Definition at line 106 of file nsIClassInfo.idl.

Definition at line 108 of file nsIClassInfo.idl.

readonly attribute PRUint32 nsIClassInfo::flags [inherited]

Definition at line 121 of file nsIClassInfo.idl.

Return language type from list in nsIProgrammingLanguage.

Definition at line 98 of file nsIClassInfo.idl.

Definition at line 105 of file nsIClassInfo.idl.

The delegate owning us.

Definition at line 79 of file nsXFormsAccessors.h.

nsIDOMElement* nsXFormsAccessors::mElement [protected, inherited]

The control DOM element.

Definition at line 82 of file nsXFormsAccessors.h.

Definition at line 107 of file nsIClassInfo.idl.

const PRUint32 nsIClassInfo::RESERVED = 1 << 31 [inherited]

Definition at line 118 of file nsIClassInfo.idl.

const PRUint32 nsIClassInfo::SINGLETON = 1 << 0 [inherited]

Bitflags for 'flags' attribute.

Definition at line 103 of file nsIClassInfo.idl.

const PRUint32 nsIClassInfo::THREADSAFE = 1 << 1 [inherited]

Definition at line 104 of file nsIClassInfo.idl.


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