Back to index
Interface which all form controls (e.g. More...
|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) |
|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. |
|Save to presentation state. |
|virtual PRBool||RestoreState (nsPresState *aState)=0|
|Restore from presentation state. |
|virtual PRBool||AllowDrop ()=0|
Interface which all form controls (e.g.
buttons, checkboxes, text, radio buttons, select, etc) implement in addition to their dom specific interface.
Get the form for this form control.
|aForm||the form [OUT]|
Implemented in nsGenericHTMLFormElement.
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.
|aState||the pres state to use to restore the control|
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.
|NS_IMETHOD nsIFormControl::SetForm||(||nsIDOMHTMLFormElement *||aForm,|
|NS_IMETHOD nsIFormControl::SubmitNamesValues||(||nsIFormSubmission *||aFormSubmission,|
Tells the form control to submit its names and values to the form submission object.
|aFormSubmission||the form submission to notify of names/values/files to submit|
|aSubmitElement||the element that was pressed to submit (possibly null)|
Implemented in nsHTMLSelectElement, nsHTMLInputElement, nsHTMLTextAreaElement, nsHTMLButtonElement, nsHTMLObjectElement, nsHTMLObjectElement, nsHTMLLabelElement, nsHTMLLegendElement, and nsHTMLFieldSetElement.