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
00653 long selectionStart();
00654
00661 void setSelectionStart(long offset);
00662
00671 long selectionEnd();
00672
00679 void setSelectionEnd(long offset);
00680
00687 void setSelectionRange(long start, long end);
00688
00689 };
00690
00691
00692
00693 class HTMLLabelElementImpl;
00700 class KHTML_EXPORT HTMLLabelElement : public HTMLElement
00701 {
00702 public:
00703 HTMLLabelElement();
00704 HTMLLabelElement(const HTMLLabelElement &other);
00705 HTMLLabelElement(const Node &other) : HTMLElement()
00706 {(*this)=other;}
00707 protected:
00708 HTMLLabelElement(HTMLLabelElementImpl *impl);
00709 public:
00710
00711 HTMLLabelElement & operator = (const HTMLLabelElement &other);
00712 HTMLLabelElement & operator = (const Node &other);
00713
00714 ~HTMLLabelElement();
00715
00723 DOMString accessKey() const;
00724
00728 void setAccessKey( const DOMString & );
00729
00737 DOMString htmlFor() const;
00738
00742 void setHtmlFor( const DOMString & );
00743 };
00744
00745
00746
00747 class HTMLLegendElementImpl;
00755 class KHTML_EXPORT HTMLLegendElement : public HTMLElement
00756 {
00757 public:
00758 HTMLLegendElement();
00759 HTMLLegendElement(const HTMLLegendElement &other);
00760 HTMLLegendElement(const Node &other) : HTMLElement()
00761 {(*this)=other;}
00762 protected:
00763 HTMLLegendElement(HTMLLegendElementImpl *impl);
00764 public:
00765
00766 HTMLLegendElement & operator = (const HTMLLegendElement &other);
00767 HTMLLegendElement & operator = (const Node &other);
00768
00769 ~HTMLLegendElement();
00770
00774 HTMLFormElement form() const;
00775
00783 DOMString accessKey() const;
00784
00788 void setAccessKey( const DOMString & );
00789
00797 DOMString align() const;
00798
00802 void setAlign( const DOMString & );
00803 };
00804
00805
00806
00807 class HTMLOptGroupElementImpl;
00814 class KHTML_EXPORT HTMLOptGroupElement : public HTMLElement
00815 {
00816 public:
00817 HTMLOptGroupElement();
00818 HTMLOptGroupElement(const HTMLOptGroupElement &other);
00819 HTMLOptGroupElement(const Node &other) : HTMLElement()
00820 {(*this)=other;}
00821 protected:
00822 HTMLOptGroupElement(HTMLOptGroupElementImpl *impl);
00823 public:
00824
00825 HTMLOptGroupElement & operator = (const HTMLOptGroupElement &other);
00826 HTMLOptGroupElement & operator = (const Node &other);
00827
00828 ~HTMLOptGroupElement();
00829
00836 bool disabled() const;
00837
00841 void setDisabled( bool );
00842
00849 DOMString label() const;
00850
00854 void setLabel( const DOMString & );
00855 };
00856
00857
00858
00859 class HTMLSelectElementImpl;
00868 class KHTML_EXPORT HTMLSelectElement : public HTMLElement
00869 {
00870 public:
00871 HTMLSelectElement();
00872 HTMLSelectElement(const HTMLSelectElement &other);
00873 HTMLSelectElement(const Node &other) : HTMLElement()
00874 {(*this)=other;}
00875 protected:
00876 HTMLSelectElement(HTMLSelectElementImpl *impl);
00877 public:
00878
00879 HTMLSelectElement & operator = (const HTMLSelectElement &other);
00880 HTMLSelectElement & operator = (const Node &other);
00881
00882 ~HTMLSelectElement();
00883
00888 DOMString type() const;
00889
00896 long selectedIndex() const;
00897
00901 void setSelectedIndex( long );
00902
00907 DOMString value() const;
00908
00912 void setValue( const DOMString & );
00913
00918 long length() const;
00919
00923 HTMLFormElement form() const;
00924
00930 HTMLCollection options() const;
00931
00938 bool disabled() const;
00939
00943 void setDisabled( bool );
00944
00952 bool multiple() const;
00953
00957 void setMultiple( bool );
00958
00966 DOMString name() const;
00967
00971 void setName( const DOMString & );
00972
00979 long size() const;
00980
00984 void setSize( long );
00985
00993 long tabIndex() const;
00994
00998 void setTabIndex( long );
00999
01010 void add ( const HTMLElement &element, const HTMLElement &before );
01011
01020 void remove ( long index );
01021
01026 void blur ( );
01027
01032 void focus ( );
01033 };
01034
01035
01036
01037 class HTMLTextAreaElementImpl;
01044 class KHTML_EXPORT HTMLTextAreaElement : public HTMLElement
01045 {
01046 public:
01047 HTMLTextAreaElement();
01048 HTMLTextAreaElement(const HTMLTextAreaElement &other);
01049 HTMLTextAreaElement(const Node &other) : HTMLElement()
01050 {(*this)=other;}
01051 protected:
01052 HTMLTextAreaElement(HTMLTextAreaElementImpl *impl);
01053 public:
01054
01055 HTMLTextAreaElement & operator = (const HTMLTextAreaElement &other);
01056 HTMLTextAreaElement & operator = (const Node &other);
01057
01058 ~HTMLTextAreaElement();
01059
01065 DOMString defaultValue() const;
01066
01070 void setDefaultValue( const DOMString & );
01071
01075 HTMLFormElement form() const;
01076
01084 DOMString accessKey() const;
01085
01089 void setAccessKey( const DOMString & );
01090
01097 long cols() const;
01098
01102 void setCols( long );
01103
01110 bool disabled() const;
01111
01115 void setDisabled( bool );
01116
01124 DOMString name() const;
01125
01129 void setName( const DOMString & );
01130
01137 bool readOnly() const;
01138
01142 void setReadOnly( bool );
01143
01150 long rows() const;
01151
01155 void setRows( long );
01156
01164 long tabIndex() const;
01165
01169 void setTabIndex( long );
01170
01175 DOMString type() const;
01176
01183 DOMString value() const;
01184
01188 void setValue( const DOMString & );
01189
01193 void blur ( );
01194
01198 void focus ( );
01199
01203 void select ( );
01204
01211 long selectionStart();
01212
01218 void setSelectionStart(long offset);
01219
01226 long selectionEnd();
01227
01233 void setSelectionEnd(long offset);
01234
01240 void setSelectionRange(long start, long end);
01241
01247 long textLength();
01248 };
01249
01250
01251
01252 class HTMLOptionElementImpl;
01259 class KHTML_EXPORT HTMLOptionElement : public HTMLElement
01260 {
01261 public:
01262 HTMLOptionElement();
01263 HTMLOptionElement(const HTMLOptionElement &other);
01264 HTMLOptionElement(const Node &other) : HTMLElement()
01265 {(*this)=other;}
01266 protected:
01267 HTMLOptionElement(HTMLOptionElementImpl *impl);
01268 public:
01269
01270 HTMLOptionElement & operator = (const HTMLOptionElement &other);
01271 HTMLOptionElement & operator = (const Node &other);
01272
01273 ~HTMLOptionElement();
01274
01278 HTMLFormElement form() const;
01279
01285 bool defaultSelected() const;
01286
01290 void setDefaultSelected( bool );
01291
01296 DOMString text() const;
01297
01303 long index() const;
01304
01311 void setIndex( long );
01312
01319 bool disabled() const;
01320
01324 void setDisabled( bool );
01325
01332 DOMString label() const;
01333
01337 void setLabel( const DOMString & );
01338
01345 bool selected() const;
01346
01350 void setSelected( bool );
01351
01358 DOMString value() const;
01359
01363 void setValue( const DOMString & );
01364 };
01365
01366
01367
01368
01369 class HTMLIsIndexElementImpl;
01370 class HTMLFormElement;
01371
01379 class KHTML_EXPORT HTMLIsIndexElement : public HTMLElement
01380 {
01381 public:
01382 HTMLIsIndexElement();
01383 HTMLIsIndexElement(const HTMLIsIndexElement &other);
01384 HTMLIsIndexElement(const Node &other) : HTMLElement()
01385 {(*this)=other;}
01386 protected:
01387 HTMLIsIndexElement(HTMLIsIndexElementImpl *impl);
01388 public:
01389
01390 HTMLIsIndexElement & operator = (const HTMLIsIndexElement &other);
01391 HTMLIsIndexElement & operator = (const Node &other);
01392
01393 ~HTMLIsIndexElement();
01394
01398 HTMLFormElement form() const;
01399
01407 DOMString prompt() const;
01408
01412 void setPrompt( const DOMString & );
01413 };
01414
01415 }
01416
01417 #endif
|