html_form.h
/*
* This file is part of the DOM implementation for KDE.
*
* (C) 1999 Lars Knoll (knoll@kde.org)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* This file includes excerpts from the Document Object Model (DOM)
* Level 1 Specification (Recommendation)
* http://www.w3.org/TR/REC-DOM-Level-1/
* Copyright © World Wide Web Consortium , (Massachusetts Institute of
* Technology , Institut National de Recherche en Informatique et en
* Automatique , Keio University ). All Rights Reserved.
*
*/
#ifndef HTML_FORM_H
#define HTML_FORM_H
// --------------------------------------------------------------------------
#include <dom/html_element.h>
#include <dom/html_misc.h>
#include <kdemacros.h>
namespace DOM {
class HTMLButtonElementImpl;
class HTMLFormElement;
class DOMString;
class KHTML_EXPORT HTMLButtonElement : public HTMLElement
{
public:
HTMLButtonElement();
HTMLButtonElement(const HTMLButtonElement &other);
HTMLButtonElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLButtonElement(HTMLButtonElementImpl *impl);
public:
HTMLButtonElement & operator = (const HTMLButtonElement &other);
HTMLButtonElement & operator = (const Node &other);
~HTMLButtonElement();
HTMLFormElement form() const;
DOMString accessKey() const;
void setAccessKey( const DOMString & );
bool disabled() const;
void setDisabled( bool );
DOMString name() const;
void setName( const DOMString & );
long tabIndex() const;
void setTabIndex( long );
DOMString type() const;
DOMString value() const;
void setValue( const DOMString & );
void blur ( );
void focus ( );
};
// --------------------------------------------------------------------------
class HTMLFieldSetElementImpl;
class KHTML_EXPORT HTMLFieldSetElement : public HTMLElement
{
public:
HTMLFieldSetElement();
HTMLFieldSetElement(const HTMLFieldSetElement &other);
HTMLFieldSetElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLFieldSetElement(HTMLFieldSetElementImpl *impl);
public:
HTMLFieldSetElement & operator = (const HTMLFieldSetElement &other);
HTMLFieldSetElement & operator = (const Node &other);
~HTMLFieldSetElement();
HTMLFormElement form() const;
};
// --------------------------------------------------------------------------
class HTMLFormElementImpl;
class KHTML_EXPORT HTMLFormElement : public HTMLElement
{
friend class HTMLButtonElement;
friend class HTMLFieldSetElement;
friend class HTMLInputElement;
friend class HTMLLabelElement;
friend class HTMLLegendElement;
friend class HTMLSelectElement;
friend class HTMLTextAreaElement;
friend class HTMLOptionElement;
friend class HTMLIsIndexElement;
friend class HTMLObjectElement;
public:
HTMLFormElement();
HTMLFormElement(const HTMLFormElement &other);
HTMLFormElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLFormElement(HTMLFormElementImpl *impl);
public:
HTMLFormElement & operator = (const HTMLFormElement &other);
HTMLFormElement & operator = (const Node &other);
~HTMLFormElement();
HTMLCollection elements() const;
long length() const;
DOMString name() const;
void setName( const DOMString & );
DOMString acceptCharset() const;
void setAcceptCharset( const DOMString & );
DOMString action() const;
void setAction( const DOMString & );
DOMString enctype() const;
void setEnctype( const DOMString & );
DOMString method() const;
void setMethod( const DOMString & );
DOMString target() const;
void setTarget( const DOMString & );
void submit ( );
void reset ( );
};
// --------------------------------------------------------------------------
class HTMLInputElementImpl;
class KHTML_EXPORT HTMLInputElement : public HTMLElement
{
public:
HTMLInputElement();
HTMLInputElement(const HTMLInputElement &other);
HTMLInputElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLInputElement(HTMLInputElementImpl *impl);
public:
HTMLInputElement & operator = (const HTMLInputElement &other);
HTMLInputElement & operator = (const Node &other);
~HTMLInputElement();
DOMString defaultValue() const;
void setDefaultValue( const DOMString & );
bool defaultChecked() const;
void setDefaultChecked( bool );
HTMLFormElement form() const;
DOMString accept() const;
void setAccept( const DOMString & );
DOMString accessKey() const;
void setAccessKey( const DOMString & );
DOMString align() const;
void setAlign( const DOMString & );
DOMString alt() const;
void setAlt( const DOMString & );
bool checked() const;
void setChecked( bool );
bool indeterminate() const;
void setIndeterminate( bool );
bool disabled() const;
void setDisabled( bool );
long maxLength() const;
void setMaxLength( long );
DOMString name() const;
void setName( const DOMString & );
bool readOnly() const;
// ### remove in 4.0
void setReadOnly( bool );
DOMString size() const KDE_DEPRECATED;
void setSize( const DOMString & ) KDE_DEPRECATED;
long getSize() const;
void setSize( long );
DOMString src() const;
void setSrc( const DOMString & );
long tabIndex() const;
void setTabIndex( long );
DOMString type() const;
void setType(const DOMString&);
DOMString useMap() const;
void setUseMap( const DOMString & );
DOMString value() const;
void setValue( const DOMString & );
void blur ( );
void focus ( );
void select ( );
void click ( );
long selectionStart();
void setSelectionStart(long offset);
long selectionEnd();
void setSelectionEnd(long offset);
void setSelectionRange(long start, long end);
};
// --------------------------------------------------------------------------
class HTMLLabelElementImpl;
class KHTML_EXPORT HTMLLabelElement : public HTMLElement
{
public:
HTMLLabelElement();
HTMLLabelElement(const HTMLLabelElement &other);
HTMLLabelElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLLabelElement(HTMLLabelElementImpl *impl);
public:
HTMLLabelElement & operator = (const HTMLLabelElement &other);
HTMLLabelElement & operator = (const Node &other);
~HTMLLabelElement();
DOMString accessKey() const;
void setAccessKey( const DOMString & );
DOMString htmlFor() const;
void setHtmlFor( const DOMString & );
};
// --------------------------------------------------------------------------
class HTMLLegendElementImpl;
class KHTML_EXPORT HTMLLegendElement : public HTMLElement
{
public:
HTMLLegendElement();
HTMLLegendElement(const HTMLLegendElement &other);
HTMLLegendElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLLegendElement(HTMLLegendElementImpl *impl);
public:
HTMLLegendElement & operator = (const HTMLLegendElement &other);
HTMLLegendElement & operator = (const Node &other);
~HTMLLegendElement();
HTMLFormElement form() const;
DOMString accessKey() const;
void setAccessKey( const DOMString & );
DOMString align() const;
void setAlign( const DOMString & );
};
// --------------------------------------------------------------------------
class HTMLOptGroupElementImpl;
class KHTML_EXPORT HTMLOptGroupElement : public HTMLElement
{
public:
HTMLOptGroupElement();
HTMLOptGroupElement(const HTMLOptGroupElement &other);
HTMLOptGroupElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLOptGroupElement(HTMLOptGroupElementImpl *impl);
public:
HTMLOptGroupElement & operator = (const HTMLOptGroupElement &other);
HTMLOptGroupElement & operator = (const Node &other);
~HTMLOptGroupElement();
bool disabled() const;
void setDisabled( bool );
DOMString label() const;
void setLabel( const DOMString & );
};
// --------------------------------------------------------------------------
class HTMLSelectElementImpl;
class KHTML_EXPORT HTMLSelectElement : public HTMLElement
{
public:
HTMLSelectElement();
HTMLSelectElement(const HTMLSelectElement &other);
HTMLSelectElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLSelectElement(HTMLSelectElementImpl *impl);
public:
HTMLSelectElement & operator = (const HTMLSelectElement &other);
HTMLSelectElement & operator = (const Node &other);
~HTMLSelectElement();
DOMString type() const;
long selectedIndex() const;
void setSelectedIndex( long );
DOMString value() const;
void setValue( const DOMString & );
long length() const;
HTMLFormElement form() const;
HTMLCollection options() const;
bool disabled() const;
void setDisabled( bool );
bool multiple() const;
void setMultiple( bool );
DOMString name() const;
void setName( const DOMString & );
long size() const;
void setSize( long );
long tabIndex() const;
void setTabIndex( long );
void add ( const HTMLElement &element, const HTMLElement &before );
void remove ( long index );
void blur ( );
void focus ( );
};
// --------------------------------------------------------------------------
class HTMLTextAreaElementImpl;
class KHTML_EXPORT HTMLTextAreaElement : public HTMLElement
{
public:
HTMLTextAreaElement();
HTMLTextAreaElement(const HTMLTextAreaElement &other);
HTMLTextAreaElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLTextAreaElement(HTMLTextAreaElementImpl *impl);
public:
HTMLTextAreaElement & operator = (const HTMLTextAreaElement &other);
HTMLTextAreaElement & operator = (const Node &other);
~HTMLTextAreaElement();
DOMString defaultValue() const;
void setDefaultValue( const DOMString & );
HTMLFormElement form() const;
DOMString accessKey() const;
void setAccessKey( const DOMString & );
long cols() const;
void setCols( long );
bool disabled() const;
void setDisabled( bool );
DOMString name() const;
void setName( const DOMString & );
bool readOnly() const;
void setReadOnly( bool );
long rows() const;
void setRows( long );
long tabIndex() const;
void setTabIndex( long );
DOMString type() const;
DOMString value() const;
void setValue( const DOMString & );
void blur ( );
void focus ( );
void select ( );
long selectionStart();
void setSelectionStart(long offset);
long selectionEnd();
void setSelectionEnd(long offset);
void setSelectionRange(long start, long end);
long textLength();
};
// --------------------------------------------------------------------------
class HTMLOptionElementImpl;
class KHTML_EXPORT HTMLOptionElement : public HTMLElement
{
public:
HTMLOptionElement();
HTMLOptionElement(const HTMLOptionElement &other);
HTMLOptionElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLOptionElement(HTMLOptionElementImpl *impl);
public:
HTMLOptionElement & operator = (const HTMLOptionElement &other);
HTMLOptionElement & operator = (const Node &other);
~HTMLOptionElement();
HTMLFormElement form() const;
bool defaultSelected() const;
void setDefaultSelected( bool );
DOMString text() const;
long index() const;
void setIndex( long );
bool disabled() const;
void setDisabled( bool );
DOMString label() const;
void setLabel( const DOMString & );
bool selected() const;
void setSelected( bool );
DOMString value() const;
void setValue( const DOMString & );
};
// --------------------------------------------------------------------------
class HTMLIsIndexElementImpl;
class HTMLFormElement;
class KHTML_EXPORT HTMLIsIndexElement : public HTMLElement
{
public:
HTMLIsIndexElement();
HTMLIsIndexElement(const HTMLIsIndexElement &other);
HTMLIsIndexElement(const Node &other) : HTMLElement()
{(*this)=other;}
protected:
HTMLIsIndexElement(HTMLIsIndexElementImpl *impl);
public:
HTMLIsIndexElement & operator = (const HTMLIsIndexElement &other);
HTMLIsIndexElement & operator = (const Node &other);
~HTMLIsIndexElement();
HTMLFormElement form() const;
DOMString prompt() const;
void setPrompt( const DOMString & );
};
} //namespace
#endif
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:274
DOM::HTMLSelectElement
The select element allows the selection of an option.
Definition: html_form.h:878
DOM::HTMLIsIndexElement
This element is used for single-line text input.
Definition: html_form.h:1389
DOM::HTMLFormElement
The FORM element encompasses behavior similar to a collection and an element.
Definition: html_form.h:206
DOM::HTMLInputElement
Form control.
Definition: html_form.h:349
DOM::HTMLCollection
An HTMLCollection is a list of nodes.
Definition: html_misc.h:126
DOM::HTMLOptGroupElement
Group options together in logical subdivisions.
Definition: html_form.h:824
DOM::HTMLLegendElement
Provides a caption for a FIELDSET grouping.
Definition: html_form.h:765
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::HTMLObjectElement
Generic embedded object.
Definition: html_object.h:258
DOM::HTMLTextAreaElement
Multi-line text field.
Definition: html_form.h:1054
DOM::HTMLButtonElement
Push button.
Definition: html_form.h:50
DOM::HTMLFieldSetElement
Organizes form controls into logical groups.
Definition: html_form.h:172
DOM::HTMLOptionElement
A selectable choice.
Definition: html_form.h:1269
DOM::HTMLLabelElement
Form field label text.
Definition: html_form.h:710
DOM::HTMLElement
All HTML element interfaces derive from this class.
Definition: html_element.h:69

KDE Home | KDE Accessibility Home | Description of Access Keys