Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIFormControl Class Reference

Interface which all form controls (e.g. More...

#include <nsIFormControl.h>

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

List of all members.

Public Member Functions

NS_IMETHOD GetForm (nsIDOMHTMLFormElement **aForm)=0
 Get the form for this form control.
NS_IMETHOD SetForm (nsIDOMHTMLFormElement *aForm, PRBool aRemoveFromForm=PR_TRUE)=0
 Set the form for this form control.
 NS_IMETHOD_ (PRInt32) GetType() const =0
 Get the type of this control as an int (see NS_FORM_* above)
NS_IMETHOD Reset ()=0
 Reset this form control (as it should be when the user clicks the Reset button)
NS_IMETHOD SubmitNamesValues (nsIFormSubmission *aFormSubmission, nsIContent *aSubmitElement)=0
 Tells the form control to submit its names and values to the form submission object.
NS_IMETHOD SaveState ()=0
 Save to presentation state.
virtual PRBool RestoreState (nsPresState *aState)=0
 Restore from presentation state.
virtual PRBool AllowDrop ()=0

Detailed Description

Interface which all form controls (e.g.

buttons, checkboxes, text, radio buttons, select, etc) implement in addition to their dom specific interface.

Definition at line 81 of file nsIFormControl.h.


Member Function Documentation

virtual PRBool nsIFormControl::AllowDrop ( ) [pure virtual]

Get the form for this form control.

Parameters:
aFormthe form [OUT]

Implemented in nsGenericHTMLFormElement.

nsIFormControl::NS_IMETHOD_ ( PRInt32  ) const [pure virtual]

Get the type of this control as an int (see NS_FORM_* above)

Returns:
the type of this control

Implemented in nsHTMLSelectElement, nsHTMLInputElement, nsHTMLTextAreaElement, nsHTMLButtonElement, nsHTMLObjectElement, nsHTMLLabelElement, nsHTMLLegendElement, and nsHTMLFieldSetElement.

NS_IMETHOD nsIFormControl::Reset ( ) [pure virtual]

Reset this form control (as it should be when the user clicks the Reset button)

Implemented in nsHTMLSelectElement, nsHTMLInputElement, nsHTMLTextAreaElement, nsHTMLButtonElement, nsHTMLObjectElement, nsHTMLObjectElement, nsHTMLLabelElement, nsHTMLLegendElement, and nsHTMLFieldSetElement.

virtual PRBool nsIFormControl::RestoreState ( nsPresState aState) [pure virtual]

Restore from presentation state.

You pass in the presentation state for this form control (generated with GenerateStateKey() + "-C") and the form control will grab its state from there.

Parameters:
aStatethe pres state to use to restore the control
Returns:
PR_TRUE if the form control was a checkbox and its checked state was restored, PR_FALSE otherwise.

Implemented in nsGenericHTMLFormElement, nsHTMLSelectElement, nsHTMLInputElement, nsHTMLTextAreaElement, nsHTMLObjectElement, and nsHTMLObjectElement.

Here is the caller graph for this function:

Save to presentation state.

The form control will determine whether it has anything to save and if so, create an entry in the layout history for its pres context.

Implemented in nsGenericHTMLFormElement, nsHTMLSelectElement, nsHTMLInputElement, nsHTMLTextAreaElement, nsHTMLObjectElement, and nsHTMLObjectElement.

NS_IMETHOD nsIFormControl::SetForm ( nsIDOMHTMLFormElement aForm,
PRBool  aRemoveFromForm = PR_TRUE 
) [pure virtual]

Set the form for this form control.

Parameters:
aFormthe form
aRemoveFromFormset false if you do not want this element removed from the form. (Used by nsFormControlList::Clear())

Implemented in nsGenericHTMLFormElement.

Here is the caller graph for this function:

NS_IMETHOD nsIFormControl::SubmitNamesValues ( nsIFormSubmission aFormSubmission,
nsIContent aSubmitElement 
) [pure virtual]

Tells the form control to submit its names and values to the form submission object.

Parameters:
aFormSubmissionthe form submission to notify of names/values/files to submit
aSubmitElementthe element that was pressed to submit (possibly null)

Implemented in nsHTMLSelectElement, nsHTMLInputElement, nsHTMLTextAreaElement, nsHTMLButtonElement, nsHTMLObjectElement, nsHTMLObjectElement, nsHTMLLabelElement, nsHTMLLegendElement, and nsHTMLFieldSetElement.


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