html_form.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef HTML_FORM_H
00030 #define HTML_FORM_H
00031
00032
00033 #include <dom/html_element.h>
00034 #include <dom/html_misc.h>
00035
00036 #include <kdemacros.h>
00037
00038 namespace DOM {
00039
00040 class HTMLButtonElementImpl;
00041 class HTMLFormElement;
00042 class DOMString;
00043
00050 class KHTML_EXPORT HTMLButtonElement : public HTMLElement
00051 {
00052 public:
00053 HTMLButtonElement();
00054 HTMLButtonElement(const HTMLButtonElement &other);
00055 HTMLButtonElement(const Node &other) : HTMLElement()
00056 {(*this)=other;}
00057 protected:
00058 HTMLButtonElement(HTMLButtonElementImpl *impl);
00059 public:
00060
00061 HTMLButtonElement & operator = (const HTMLButtonElement &other);
00062 HTMLButtonElement & operator = (const Node &other);
00063
00064 ~HTMLButtonElement();
00065
00072 HTMLFormElement form() const;
00073
00081 DOMString accessKey() const;
00082
00086 void setAccessKey( const DOMString & );
00087
00094 bool disabled() const;
00095
00099 void setDisabled( bool );
00100
00108 DOMString name() const;
00109
00113 void setName( const DOMString & );
00114
00122 long tabIndex() const;
00123
00127 void setTabIndex( long );
00128
00135 DOMString type() const;
00136
00143 DOMString value() const;
00144
00148 void setValue( const DOMString & );
00149
00154 void blur ( );
00155
00160 void focus ( );
00161 };
00162
00163
00164
00165 class HTMLFieldSetElementImpl;
00172 class KHTML_EXPORT HTMLFieldSetElement : public HTMLElement
00173 {
00174 public:
00175 HTMLFieldSetElement();
00176 HTMLFieldSetElement(const HTMLFieldSetElement &other);
00177 HTMLFieldSetElement(const Node &other) : HTMLElement()
00178 {(*this)=other;}
00179 protected:
00180 HTMLFieldSetElement(HTMLFieldSetElementImpl *impl);
00181 public:
00182
00183 HTMLFieldSetElement & operator = (const HTMLFieldSetElement &other);
00184 HTMLFieldSetElement & operator = (const Node &other);
00185
00186 ~HTMLFieldSetElement();
00187
00191 HTMLFormElement form() const;
00192 };
00193
00194
00195
00196 class HTMLFormElementImpl;
00206 class KHTML_EXPORT HTMLFormElement : public HTMLElement
00207 {
00208 friend class HTMLButtonElement;
00209 friend class HTMLFieldSetElement;
00210 friend class HTMLInputElement;
00211 friend class HTMLLabelElement;
00212 friend class HTMLLegendElement;
00213 friend class HTMLSelectElement;
00214 friend class HTMLTextAreaElement;
00215 friend class HTMLOptionElement;
00216 friend class HTMLIsIndexElement;
00217 friend class HTMLObjectElement;
00218
00219 public:
00220 HTMLFormElement();
00221 HTMLFormElement(const HTMLFormElement &other);
00222 HTMLFormElement(const Node &other) : HTMLElement()
00223 {(*this)=other;}
00224 protected:
00225 HTMLFormElement(HTMLFormElementImpl *impl);
00226 public:
00227
00228 HTMLFormElement & operator = (const HTMLFormElement &other);
00229 HTMLFormElement & operator = (const Node &other);
00230
00231 ~HTMLFormElement();
00232
00237 HTMLCollection elements() const;
00238
00243 long length() const;
00244
00249 DOMString name() const;
00250
00254 void setName( const DOMString & );
00255
00262 DOMString acceptCharset() const;
00263
00267 void setAcceptCharset( const DOMString & );
00268
00275 DOMString action() const;
00276
00280 void setAction( const DOMString & );
00281
00289 DOMString enctype() const;
00290
00294 void setEnctype( const DOMString & );
00295
00302 DOMString method() const;
00303
00307 void setMethod( const DOMString & );
00308
00315 DOMString target() const;
00316
00320 void setTarget( const DOMString & );
00321
00327 void submit ( );
00328
00334 void reset ( );
00335 };
00336
00337
00338
00339 class HTMLInputElementImpl;
00349 class KHTML_EXPORT HTMLInputElement : public HTMLElement
00350 {
00351 public:
00352 HTMLInputElement();
00353 HTMLInputElement(const HTMLInputElement &other);
00354 HTMLInputElement(const Node &other) : HTMLElement()
00355 {(*this)=other;}
00356 protected:
00357 HTMLInputElement(HTMLInputElementImpl *impl);
00358 public:
00359
00360 HTMLInputElement & operator = (const HTMLInputElement &other);
00361 HTMLInputElement & operator = (const Node &other);
00362
00363 ~HTMLInputElement();
00364
00370 DOMString defaultValue() const;
00371
00375 void setDefaultValue( const DOMString & );
00376
00383 bool defaultChecked() const;
00384
00388 void setDefaultChecked( bool );
00389
00393 HTMLFormElement form() const;
00394
00402 DOMString accept() const;
00403
00407 void setAccept( const DOMString & );
00408
00416 DOMString accessKey() const;
00417
00421 void setAccessKey( const DOMString & );
00422
00431 DOMString align() const;
00432
00436 void setAlign( const DOMString & );
00437
00445 DOMString alt() const;
00446
00450 void setAlt( const DOMString & );
00451
00461 bool checked() const;
00462
00466 void setChecked( bool );
00467
00474 bool disabled() const;
00475
00479 void setDisabled( bool );
00480
00488 long maxLength() const;
00489
00493 void setMaxLength( long );
00494
00502 DOMString name() const;
00503
00507 void setName( const DOMString & );
00508
00516 bool readOnly() const;
00517
00518
00522 void setReadOnly( bool );
00523
00527 DOMString size() const KDE_DEPRECATED;
00528
00532 void setSize( const DOMString & ) KDE_DEPRECATED;
00533
00541 long getSize() const;
00542
00546 void setSize( long );
00547
00556 DOMString src() const;
00557
00561 void setSrc( const DOMString & );
00562
00570 long tabIndex() const;
00571
00575 void setTabIndex( long );
00576
00583 DOMString type() const;
00584
00588 void setType(const DOMString&);
00589
00596 DOMString useMap() const;
00597
00601 void setUseMap( const DOMString & );
00602
00610 DOMString value() const;
00611
00615 void setValue( const DOMString & );
00616
00621 void blur ( );
00622
00627 void focus ( );
00628
00635 void select ( );
00636
00642 void click ( );
00643 };
00644
00645
00646
00647 class HTMLLabelElementImpl;
00654 class KHTML_EXPORT HTMLLabelElement : public HTMLElement
00655 {
00656 public:
00657 HTMLLabelElement();
00658 HTMLLabelElement(const HTMLLabelElement &other);
00659 HTMLLabelElement(const Node &other) : HTMLElement()
00660 {(*this)=other;}
00661 protected:
00662 HTMLLabelElement(HTMLLabelElementImpl *impl);
00663 public:
00664
00665 HTMLLabelElement & operator = (const HTMLLabelElement &other);
00666 HTMLLabelElement & operator = (const Node &other);
00667
00668 ~HTMLLabelElement();
00669
00677 DOMString accessKey() const;
00678
00682 void setAccessKey( const DOMString & );
00683
00691 DOMString htmlFor() const;
00692
00696 void setHtmlFor( const DOMString & );
00697 };
00698
00699
00700
00701 class HTMLLegendElementImpl;
00709 class KHTML_EXPORT HTMLLegendElement : public HTMLElement
00710 {
00711 public:
00712 HTMLLegendElement();
00713 HTMLLegendElement(const HTMLLegendElement &other);
00714 HTMLLegendElement(const Node &other) : HTMLElement()
00715 {(*this)=other;}
00716 protected:
00717 HTMLLegendElement(HTMLLegendElementImpl *impl);
00718 public:
00719
00720 HTMLLegendElement & operator = (const HTMLLegendElement &other);
00721 HTMLLegendElement & operator = (const Node &other);
00722
00723 ~HTMLLegendElement();
00724
00728 HTMLFormElement form() const;
00729
00737 DOMString accessKey() const;
00738
00742 void setAccessKey( const DOMString & );
00743
00751 DOMString align() const;
00752
00756 void setAlign( const DOMString & );
00757 };
00758
00759
00760
00761 class HTMLOptGroupElementImpl;
00768 class KHTML_EXPORT HTMLOptGroupElement : public HTMLElement
00769 {
00770 public:
00771 HTMLOptGroupElement();
00772 HTMLOptGroupElement(const HTMLOptGroupElement &other);
00773 HTMLOptGroupElement(const Node &other) : HTMLElement()
00774 {(*this)=other;}
00775 protected:
00776 HTMLOptGroupElement(HTMLOptGroupElementImpl *impl);
00777 public:
00778
00779 HTMLOptGroupElement & operator = (const HTMLOptGroupElement &other);
00780 HTMLOptGroupElement & operator = (const Node &other);
00781
00782 ~HTMLOptGroupElement();
00783
00790 bool disabled() const;
00791
00795 void setDisabled( bool );
00796
00803 DOMString label() const;
00804
00808 void setLabel( const DOMString & );
00809 };
00810
00811
00812
00813 class HTMLSelectElementImpl;
00822 class KHTML_EXPORT HTMLSelectElement : public HTMLElement
00823 {
00824 public:
00825 HTMLSelectElement();
00826 HTMLSelectElement(const HTMLSelectElement &other);
00827 HTMLSelectElement(const Node &other) : HTMLElement()
00828 {(*this)=other;}
00829 protected:
00830 HTMLSelectElement(HTMLSelectElementImpl *impl);
00831 public:
00832
00833 HTMLSelectElement & operator = (const HTMLSelectElement &other);
00834 HTMLSelectElement & operator = (const Node &other);
00835
00836 ~HTMLSelectElement();
00837
00842 DOMString type() const;
00843
00850 long selectedIndex() const;
00851
00855 void setSelectedIndex( long );
00856
00861 DOMString value() const;
00862
00866 void setValue( const DOMString & );
00867
00872 long length() const;
00873
00877 HTMLFormElement form() const;
00878
00884 HTMLCollection options() const;
00885
00892 bool disabled() const;
00893
00897 void setDisabled( bool );
00898
00906 bool multiple() const;
00907
00911 void setMultiple( bool );
00912
00920 DOMString name() const;
00921
00925 void setName( const DOMString & );
00926
00933 long size() const;
00934
00938 void setSize( long );
00939
00947 long tabIndex() const;
00948
00952 void setTabIndex( long );
00953
00964 void add ( const HTMLElement &element, const HTMLElement &before );
00965
00974 void remove ( long index );
00975
00980 void blur ( );
00981
00986 void focus ( );
00987 };
00988
00989
00990
00991 class HTMLTextAreaElementImpl;
00998 class KHTML_EXPORT HTMLTextAreaElement : public HTMLElement
00999 {
01000 public:
01001 HTMLTextAreaElement();
01002 HTMLTextAreaElement(const HTMLTextAreaElement &other);
01003 HTMLTextAreaElement(const Node &other) : HTMLElement()
01004 {(*this)=other;}
01005 protected:
01006 HTMLTextAreaElement(HTMLTextAreaElementImpl *impl);
01007 public:
01008
01009 HTMLTextAreaElement & operator = (const HTMLTextAreaElement &other);
01010 HTMLTextAreaElement & operator = (const Node &other);
01011
01012 ~HTMLTextAreaElement();
01013
01019 DOMString defaultValue() const;
01020
01024 void setDefaultValue( const DOMString & );
01025
01029 HTMLFormElement form() const;
01030
01038 DOMString accessKey() const;
01039
01043 void setAccessKey( const DOMString & );
01044
01051 long cols() const;
01052
01056 void setCols( long );
01057
01064 bool disabled() const;
01065
01069 void setDisabled( bool );
01070
01078 DOMString name() const;
01079
01083 void setName( const DOMString & );
01084
01091 bool readOnly() const;
01092
01096 void setReadOnly( bool );
01097
01104 long rows() const;
01105
01109 void setRows( long );
01110
01118 long tabIndex() const;
01119
01123 void setTabIndex( long );
01124
01129 DOMString type() const;
01130
01137 DOMString value() const;
01138
01142 void setValue( const DOMString & );
01143
01147 void blur ( );
01148
01152 void focus ( );
01153
01157 void select ( );
01158 };
01159
01160
01161
01162 class HTMLOptionElementImpl;
01169 class KHTML_EXPORT HTMLOptionElement : public HTMLElement
01170 {
01171 public:
01172 HTMLOptionElement();
01173 HTMLOptionElement(const HTMLOptionElement &other);
01174 HTMLOptionElement(const Node &other) : HTMLElement()
01175 {(*this)=other;}
01176 protected:
01177 HTMLOptionElement(HTMLOptionElementImpl *impl);
01178 public:
01179
01180 HTMLOptionElement & operator = (const HTMLOptionElement &other);
01181 HTMLOptionElement & operator = (const Node &other);
01182
01183 ~HTMLOptionElement();
01184
01188 HTMLFormElement form() const;
01189
01195 bool defaultSelected() const;
01196
01200 void setDefaultSelected( bool );
01201
01206 DOMString text() const;
01207
01213 long index() const;
01214
01221 void setIndex( long );
01222
01229 bool disabled() const;
01230
01234 void setDisabled( bool );
01235
01242 DOMString label() const;
01243
01247 void setLabel( const DOMString & );
01248
01255 bool selected() const;
01256
01260 void setSelected( bool );
01261
01268 DOMString value() const;
01269
01273 void setValue( const DOMString & );
01274 };
01275
01276
01277
01278
01279 class HTMLIsIndexElementImpl;
01280 class HTMLFormElement;
01281
01289 class KHTML_EXPORT HTMLIsIndexElement : public HTMLElement
01290 {
01291 public:
01292 HTMLIsIndexElement();
01293 HTMLIsIndexElement(const HTMLIsIndexElement &other);
01294 HTMLIsIndexElement(const Node &other) : HTMLElement()
01295 {(*this)=other;}
01296 protected:
01297 HTMLIsIndexElement(HTMLIsIndexElementImpl *impl);
01298 public:
01299
01300 HTMLIsIndexElement & operator = (const HTMLIsIndexElement &other);
01301 HTMLIsIndexElement & operator = (const Node &other);
01302
01303 ~HTMLIsIndexElement();
01304
01308 HTMLFormElement form() const;
01309
01317 DOMString prompt() const;
01318
01322 void setPrompt( const DOMString & );
01323 };
01324
01325 }
01326
01327 #endif
|