00001
00022
00023
00024 #include "dom/html_form.h"
00025 #include "dom/dom_exception.h"
00026 #include "dom/dom_doc.h"
00027
00028 #include "html/html_formimpl.h"
00029 #include "html/html_miscimpl.h"
00030
00031 #include "xml/dom_docimpl.h"
00032 #include "misc/htmlhashes.h"
00033
00034 using namespace DOM;
00035
00036 HTMLButtonElement::HTMLButtonElement() : HTMLElement()
00037 {
00038 }
00039
00040 HTMLButtonElement::HTMLButtonElement(const HTMLButtonElement &other) : HTMLElement(other)
00041 {
00042 }
00043
00044 HTMLButtonElement::HTMLButtonElement(HTMLButtonElementImpl *impl) : HTMLElement(impl)
00045 {
00046 }
00047
00048 HTMLButtonElement &HTMLButtonElement::operator = (const Node &other)
00049 {
00050 assignOther( other, ID_BUTTON );
00051 return *this;
00052 }
00053
00054 HTMLButtonElement &HTMLButtonElement::operator = (const HTMLButtonElement &other)
00055 {
00056 HTMLElement::operator = (other);
00057 return *this;
00058 }
00059
00060 HTMLButtonElement::~HTMLButtonElement()
00061 {
00062 }
00063
00064 HTMLFormElement HTMLButtonElement::form() const
00065 {
00066 return Element::form();
00067 }
00068
00069 DOMString HTMLButtonElement::accessKey() const
00070 {
00071 if(!impl) return DOMString();
00072 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACCESSKEY);
00073 }
00074
00075 void HTMLButtonElement::setAccessKey( const DOMString &value )
00076 {
00077 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACCESSKEY, value);
00078 }
00079
00080 bool HTMLButtonElement::disabled() const
00081 {
00082 if(!impl) return 0;
00083 return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();
00084 }
00085
00086 void HTMLButtonElement::setDisabled( bool _disabled )
00087 {
00088 if (impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
00089 }
00090
00091 DOMString HTMLButtonElement::name() const
00092 {
00093 if(!impl) return DOMString();
00094 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_NAME);
00095 }
00096
00097 void HTMLButtonElement::setName( const DOMString &value )
00098 {
00099 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_NAME, value);
00100 }
00101
00102 void HTMLButtonElement::focus( )
00103 {
00104 if(impl)
00105 static_cast<HTMLButtonElementImpl*>(impl)->focus();
00106 }
00107
00108 void HTMLButtonElement::blur( )
00109 {
00110 if(impl)
00111 static_cast<HTMLButtonElementImpl*>(impl)->blur();
00112 }
00113
00114 long HTMLButtonElement::tabIndex() const
00115 {
00116 if(!impl) return 0;
00117 return static_cast<ElementImpl*>(impl)->tabIndex();
00118 }
00119
00120 void HTMLButtonElement::setTabIndex( long _tabIndex )
00121 {
00122 if (!impl) return;
00123 static_cast<ElementImpl*>(impl)->setTabIndex(_tabIndex);
00124 }
00125
00126 DOMString HTMLButtonElement::type() const
00127 {
00128 if(!impl) return DOMString();
00129 return static_cast<HTMLButtonElementImpl*>(impl)->type();
00130 }
00131
00132 DOMString HTMLButtonElement::value() const
00133 {
00134 if(!impl) return DOMString();
00135 DOMString s = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_VALUE);
00136 if (s.isNull()) return DOMString("");
00137 return s;
00138 }
00139
00140 void HTMLButtonElement::setValue( const DOMString &value )
00141 {
00142 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_VALUE, value);
00143 }
00144
00145
00146
00147 HTMLFieldSetElement::HTMLFieldSetElement() : HTMLElement()
00148 {
00149 }
00150
00151 HTMLFieldSetElement::HTMLFieldSetElement(const HTMLFieldSetElement &other) : HTMLElement(other)
00152 {
00153 }
00154
00155 HTMLFieldSetElement::HTMLFieldSetElement(HTMLFieldSetElementImpl *impl) : HTMLElement(impl)
00156 {
00157 }
00158
00159 HTMLFieldSetElement &HTMLFieldSetElement::operator = (const Node &other)
00160 {
00161 assignOther( other, ID_FIELDSET );
00162 return *this;
00163 }
00164
00165 HTMLFieldSetElement &HTMLFieldSetElement::operator = (const HTMLFieldSetElement &other)
00166 {
00167 HTMLElement::operator = (other);
00168 return *this;
00169 }
00170
00171 HTMLFieldSetElement::~HTMLFieldSetElement()
00172 {
00173 }
00174
00175 HTMLFormElement HTMLFieldSetElement::form() const
00176 {
00177 return Element::form();
00178 }
00179
00180
00181
00182 HTMLFormElement::HTMLFormElement() : HTMLElement()
00183 {
00184 }
00185
00186 HTMLFormElement::HTMLFormElement(const HTMLFormElement &other) : HTMLElement(other)
00187 {
00188 }
00189
00190 HTMLFormElement::HTMLFormElement(HTMLFormElementImpl *impl) : HTMLElement(impl)
00191 {
00192 }
00193
00194 HTMLFormElement &HTMLFormElement::operator = (const Node &other)
00195 {
00196 assignOther( other, ID_FORM );
00197 return *this;
00198 }
00199
00200 HTMLFormElement &HTMLFormElement::operator = (const HTMLFormElement &other)
00201 {
00202 HTMLElement::operator = (other);
00203 return *this;
00204 }
00205
00206 HTMLFormElement::~HTMLFormElement()
00207 {
00208 }
00209
00210 HTMLCollection HTMLFormElement::elements() const
00211 {
00212 if(!impl) return HTMLCollection();
00213 return HTMLFormCollection(impl);
00214 }
00215
00216 long HTMLFormElement::length() const
00217 {
00218 if(!impl) return 0;
00219 return static_cast<HTMLFormElementImpl*>(impl)->length();
00220 }
00221
00222 DOMString HTMLFormElement::name() const
00223 {
00224 if(!impl) return DOMString();
00225 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_NAME);
00226 }
00227
00228 void HTMLFormElement::setName( const DOMString &value )
00229 {
00230 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_NAME, value);
00231 }
00232
00233 DOMString HTMLFormElement::acceptCharset() const
00234 {
00235 if(!impl) return DOMString();
00236 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACCEPT_CHARSET);
00237 }
00238
00239 void HTMLFormElement::setAcceptCharset( const DOMString &value )
00240 {
00241 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACCEPT_CHARSET, value);
00242 }
00243
00244 DOMString HTMLFormElement::action() const
00245 {
00246 if(!impl) return DOMString();
00247 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACTION);
00248 }
00249
00250 void HTMLFormElement::setAction( const DOMString &value )
00251 {
00252 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACTION, value);
00253 }
00254
00255 DOMString HTMLFormElement::enctype() const
00256 {
00257 if(!impl) return DOMString();
00258 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ENCTYPE);
00259 }
00260
00261 void HTMLFormElement::setEnctype( const DOMString &value )
00262 {
00263 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ENCTYPE, value);
00264 }
00265
00266 DOMString HTMLFormElement::method() const
00267 {
00268 if(!impl) return DOMString();
00269 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_METHOD);
00270 }
00271
00272 void HTMLFormElement::setMethod( const DOMString &value )
00273 {
00274 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_METHOD, value);
00275 }
00276
00277 DOMString HTMLFormElement::target() const
00278 {
00279 if(!impl) return DOMString();
00280 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_TARGET);
00281 }
00282
00283 void HTMLFormElement::setTarget( const DOMString &value )
00284 {
00285 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_TARGET, value);
00286 }
00287
00288 void HTMLFormElement::submit( )
00289 {
00290 if(impl) static_cast<HTMLFormElementImpl*>(impl)->submit( );
00291 }
00292
00293 void HTMLFormElement::reset( )
00294 {
00295 if(impl) static_cast<HTMLFormElementImpl*>(impl)->reset( );
00296 }
00297
00298
00299
00300 HTMLInputElement::HTMLInputElement() : HTMLElement()
00301 {
00302 }
00303
00304 HTMLInputElement::HTMLInputElement(const HTMLInputElement &other) : HTMLElement(other)
00305 {
00306 }
00307
00308 HTMLInputElement::HTMLInputElement(HTMLInputElementImpl *impl) : HTMLElement(impl)
00309 {
00310 }
00311
00312 HTMLInputElement &HTMLInputElement::operator = (const Node &other)
00313 {
00314 assignOther( other, ID_INPUT );
00315 return *this;
00316 }
00317
00318 HTMLInputElement &HTMLInputElement::operator = (const HTMLInputElement &other)
00319 {
00320 HTMLElement::operator = (other);
00321 return *this;
00322 }
00323
00324 HTMLInputElement::~HTMLInputElement()
00325 {
00326 }
00327
00328 DOMString HTMLInputElement::defaultValue() const
00329 {
00330 if(!impl) return DOMString();
00331 DOMString s = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_VALUE);
00332 if (s.isNull()) return DOMString("");
00333 return s;
00334
00335 }
00336
00337 void HTMLInputElement::setDefaultValue( const DOMString &value )
00338 {
00339 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALUE, value);
00340 }
00341
00342 bool HTMLInputElement::defaultChecked() const
00343 {
00344 if(!impl) return 0;
00345 return !((ElementImpl *)impl)->getAttribute(ATTR_CHECKED).isNull();
00346 }
00347
00348 void HTMLInputElement::setDefaultChecked( bool _defaultChecked )
00349 {
00350 if(impl)
00351 ((ElementImpl *)impl)->setAttribute(ATTR_CHECKED, _defaultChecked ? "" : 0);
00352 }
00353
00354 HTMLFormElement HTMLInputElement::form() const
00355 {
00356 return Element::form();
00357 }
00358
00359 DOMString HTMLInputElement::accept() const
00360 {
00361 if(!impl) return DOMString();
00362 return ((ElementImpl *)impl)->getAttribute(ATTR_ACCEPT);
00363 }
00364
00365 void HTMLInputElement::setAccept( const DOMString &value )
00366 {
00367 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ACCEPT, value);
00368 }
00369
00370 DOMString HTMLInputElement::accessKey() const
00371 {
00372 if(!impl) return DOMString();
00373 return ((ElementImpl *)impl)->getAttribute(ATTR_ACCESSKEY);
00374 }
00375
00376 void HTMLInputElement::setAccessKey( const DOMString &value )
00377 {
00378 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ACCESSKEY, value);
00379 }
00380
00381 DOMString HTMLInputElement::align() const
00382 {
00383 if(!impl) return DOMString();
00384 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
00385 }
00386
00387 void HTMLInputElement::setAlign( const DOMString &value )
00388 {
00389 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
00390 }
00391
00392 DOMString HTMLInputElement::alt() const
00393 {
00394 if(!impl) return DOMString();
00395 return ((ElementImpl *)impl)->getAttribute(ATTR_ALT);
00396 }
00397
00398 void HTMLInputElement::setAlt( const DOMString &value )
00399 {
00400 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALT, value);
00401 }
00402
00403 bool HTMLInputElement::checked() const
00404 {
00405 if(!impl) return 0;
00406 return ((HTMLInputElementImpl*)impl)->checked();
00407 }
00408
00409 void HTMLInputElement::setChecked( bool _checked )
00410 {
00411 if(impl)
00412 ((HTMLInputElementImpl*)impl)->setChecked(_checked);
00413 }
00414
00415 bool HTMLInputElement::disabled() const
00416 {
00417 if(!impl) return 0;
00418 return !((ElementImpl *)impl)->getAttribute(ATTR_DISABLED).isNull();
00419 }
00420
00421 void HTMLInputElement::setDisabled( bool _disabled )
00422 {
00423 if(impl)
00424 {
00425 ((ElementImpl *)impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
00426 }
00427 }
00428
00429 long HTMLInputElement::maxLength() const
00430 {
00431 if(!impl) return 0;
00432 return ((HTMLInputElementImpl *)impl)->getAttribute(ATTR_MAXLENGTH).toInt();
00433 }
00434
00435 void HTMLInputElement::setMaxLength( long _maxLength )
00436 {
00437 if(impl) {
00438 DOMString value(QString::number(_maxLength));
00439 ((ElementImpl *)impl)->setAttribute(ATTR_MAXLENGTH,value);
00440 }
00441 }
00442
00443 DOMString HTMLInputElement::name() const
00444 {
00445 if(!impl) return DOMString();
00446 return static_cast<HTMLInputElementImpl* const>(impl)->name();
00447 }
00448
00449 void HTMLInputElement::setName( const DOMString &value )
00450 {
00451 if(impl) static_cast<HTMLInputElementImpl*>(impl)->setName(value);
00452 }
00453
00454 bool HTMLInputElement::readOnly() const
00455 {
00456 if(!impl) return 0;
00457 return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_READONLY).isNull();
00458 }
00459
00460 void HTMLInputElement::setReadOnly( bool _readOnly )
00461 {
00462 if(impl)
00463 static_cast<ElementImpl*>(impl)->setAttribute(ATTR_READONLY, _readOnly ? "" : 0);
00464 }
00465
00466
00467 DOMString HTMLInputElement::size() const
00468 {
00469 if(!impl) return DOMString();
00470 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_SIZE);
00471 }
00472
00473 void HTMLInputElement::setSize( const DOMString &value )
00474 {
00475 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SIZE, value);
00476 }
00477
00478 long HTMLInputElement::getSize() const
00479 {
00480 if(!impl) return 0;
00481 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_SIZE).toInt();
00482 }
00483
00484 void HTMLInputElement::setSize( long value )
00485 {
00486 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SIZE, QString::number(value));
00487 }
00488
00489 DOMString HTMLInputElement::src() const
00490 {
00491 if(!impl) return DOMString();
00492 DOMString s = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_SRC);
00493 return !s.isNull() ? impl->getDocument()->completeURL( s.string() ) : s;
00494 }
00495
00496 void HTMLInputElement::setSrc( const DOMString &value )
00497 {
00498 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SRC, value);
00499 }
00500
00501 long HTMLInputElement::tabIndex() const
00502 {
00503 if(!impl) return 0;
00504 return static_cast<ElementImpl*>(impl)->tabIndex();
00505 }
00506
00507 void HTMLInputElement::setTabIndex( long _tabIndex )
00508 {
00509 if (!impl) return;
00510 static_cast<ElementImpl*>(impl)->setTabIndex(_tabIndex);
00511 }
00512
00513 DOMString HTMLInputElement::type() const
00514 {
00515 if(!impl) return DOMString();
00516 return ((HTMLInputElementImpl *)impl)->type();
00517 }
00518
00519 void HTMLInputElement::setType(const DOMString& _type)
00520 {
00521 if (!impl) return;
00522 static_cast<HTMLInputElementImpl*>(impl)->setType(_type);
00523 }
00524
00525 DOMString HTMLInputElement::useMap() const
00526 {
00527 if(!impl) return DOMString();
00528 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_USEMAP);
00529 }
00530
00531 void HTMLInputElement::setUseMap( const DOMString &value )
00532 {
00533 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_USEMAP, value);
00534 }
00535
00536 DOMString HTMLInputElement::value() const
00537 {
00538 if(!impl) return DOMString();
00539 return ((HTMLInputElementImpl*)impl)->value();
00540 }
00541
00542 void HTMLInputElement::setValue( const DOMString &value )
00543 {
00544 if (impl)
00545 ((HTMLInputElementImpl*)impl)->setValue(value);
00546
00547 }
00548
00549 void HTMLInputElement::blur( )
00550 {
00551 if(impl)
00552 ((HTMLInputElementImpl*)impl)->blur();
00553 }
00554
00555 void HTMLInputElement::focus( )
00556 {
00557 if(impl)
00558 ((HTMLInputElementImpl*)impl)->focus();
00559 }
00560
00561 void HTMLInputElement::select( )
00562 {
00563 if(impl)
00564 ((HTMLInputElementImpl *)impl)->select( );
00565 }
00566
00567 void HTMLInputElement::click( )
00568 {
00569 if(impl)
00570 ((HTMLInputElementImpl *)impl)->click( );
00571 }
00572
00573
00574
00575 HTMLLabelElement::HTMLLabelElement() : HTMLElement()
00576 {
00577 }
00578
00579 HTMLLabelElement::HTMLLabelElement(const HTMLLabelElement &other) : HTMLElement(other)
00580 {
00581 }
00582
00583 HTMLLabelElement::HTMLLabelElement(HTMLLabelElementImpl *impl) : HTMLElement(impl)
00584 {
00585 }
00586
00587 HTMLLabelElement &HTMLLabelElement::operator = (const Node &other)
00588 {
00589 assignOther( other, ID_LABEL );
00590 return *this;
00591 }
00592
00593 HTMLLabelElement &HTMLLabelElement::operator = (const HTMLLabelElement &other)
00594 {
00595 HTMLElement::operator = (other);
00596 return *this;
00597 }
00598
00599 HTMLLabelElement::~HTMLLabelElement()
00600 {
00601 }
00602
00603 DOMString HTMLLabelElement::accessKey() const
00604 {
00605 if(!impl) return DOMString();
00606 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACCESSKEY);
00607 }
00608
00609 void HTMLLabelElement::setAccessKey( const DOMString &value )
00610 {
00611 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACCESSKEY, value);
00612 }
00613
00614 DOMString HTMLLabelElement::htmlFor() const
00615 {
00616 if(!impl) return DOMString();
00617 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_FOR);
00618 }
00619
00620 void HTMLLabelElement::setHtmlFor( const DOMString &value )
00621 {
00622 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_FOR, value);
00623 }
00624
00625
00626
00627 HTMLLegendElement::HTMLLegendElement() : HTMLElement()
00628 {
00629 }
00630
00631 HTMLLegendElement::HTMLLegendElement(const HTMLLegendElement &other) : HTMLElement(other)
00632 {
00633 }
00634
00635 HTMLLegendElement::HTMLLegendElement(HTMLLegendElementImpl *impl) : HTMLElement(impl)
00636 {
00637 }
00638
00639 HTMLLegendElement &HTMLLegendElement::operator = (const Node &other)
00640 {
00641 assignOther( other, ID_LEGEND );
00642 return *this;
00643 }
00644
00645 HTMLLegendElement &HTMLLegendElement::operator = (const HTMLLegendElement &other)
00646 {
00647 HTMLElement::operator = (other);
00648 return *this;
00649 }
00650
00651 HTMLLegendElement::~HTMLLegendElement()
00652 {
00653 }
00654
00655 HTMLFormElement HTMLLegendElement::form() const
00656 {
00657 return Element::form();
00658 }
00659
00660 DOMString HTMLLegendElement::accessKey() const
00661 {
00662 if(!impl) return DOMString();
00663 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACCESSKEY);
00664 }
00665
00666 void HTMLLegendElement::setAccessKey( const DOMString &value )
00667 {
00668 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACCESSKEY, value);
00669 }
00670
00671 DOMString HTMLLegendElement::align() const
00672 {
00673 if(!impl) return DOMString();
00674 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ALIGN);
00675 }
00676
00677 void HTMLLegendElement::setAlign( const DOMString &value )
00678 {
00679 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ALIGN, value);
00680 }
00681
00682
00683
00684 HTMLOptGroupElement::HTMLOptGroupElement() : HTMLElement()
00685 {
00686 }
00687
00688 HTMLOptGroupElement::HTMLOptGroupElement(const HTMLOptGroupElement &other) : HTMLElement(other)
00689 {
00690 }
00691
00692 HTMLOptGroupElement::HTMLOptGroupElement(HTMLOptGroupElementImpl *impl) : HTMLElement(impl)
00693 {
00694 }
00695
00696 HTMLOptGroupElement &HTMLOptGroupElement::operator = (const Node &other)
00697 {
00698 assignOther( other, ID_OPTGROUP );
00699 return *this;
00700 }
00701
00702 HTMLOptGroupElement &HTMLOptGroupElement::operator = (const HTMLOptGroupElement &other)
00703 {
00704 HTMLElement::operator = (other);
00705 return *this;
00706 }
00707
00708 HTMLOptGroupElement::~HTMLOptGroupElement()
00709 {
00710 }
00711
00712 bool HTMLOptGroupElement::disabled() const
00713 {
00714 if(!impl) return 0;
00715 return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();
00716 }
00717
00718 void HTMLOptGroupElement::setDisabled( bool _disabled )
00719 {
00720 if(impl)
00721 static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
00722 }
00723
00724 DOMString HTMLOptGroupElement::label() const
00725 {
00726 if(!impl) return DOMString();
00727 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_LABEL);
00728 }
00729
00730 void HTMLOptGroupElement::setLabel( const DOMString &value )
00731 {
00732 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_LABEL, value);
00733 }
00734
00735
00736
00737 HTMLSelectElement::HTMLSelectElement() : HTMLElement()
00738 {
00739 }
00740
00741 HTMLSelectElement::HTMLSelectElement(const HTMLSelectElement &other) : HTMLElement(other)
00742 {
00743 }
00744
00745 HTMLSelectElement::HTMLSelectElement(HTMLSelectElementImpl *impl) : HTMLElement(impl)
00746 {
00747 }
00748
00749 HTMLSelectElement &HTMLSelectElement::operator = (const Node &other)
00750 {
00751 assignOther( other, ID_SELECT );
00752 return *this;
00753 }
00754
00755 HTMLSelectElement &HTMLSelectElement::operator = (const HTMLSelectElement &other)
00756 {
00757 HTMLElement::operator = (other);
00758 return *this;
00759 }
00760
00761 HTMLSelectElement::~HTMLSelectElement()
00762 {
00763 }
00764
00765 DOMString HTMLSelectElement::type() const
00766 {
00767 if(!impl) return DOMString();
00768 return ((HTMLSelectElementImpl *)impl)->type();
00769 }
00770
00771 long HTMLSelectElement::selectedIndex() const
00772 {
00773 if(!impl) return 0;
00774 return ((HTMLSelectElementImpl *)impl)->selectedIndex();
00775 }
00776
00777 void HTMLSelectElement::setSelectedIndex( long _selectedIndex )
00778 {
00779 if(impl)
00780 ((HTMLSelectElementImpl *)impl)->setSelectedIndex(_selectedIndex);
00781 }
00782
00783 DOMString HTMLSelectElement::value() const
00784 {
00785 if(!impl) return DOMString();
00786 return static_cast<HTMLSelectElementImpl*>(impl)->value();
00787 }
00788
00789 void HTMLSelectElement::setValue( const DOMString &value )
00790 {
00791 if(!impl || value.isNull()) return;
00792 static_cast<HTMLSelectElementImpl*>(impl)->setValue(value.implementation());
00793 }
00794
00795 long HTMLSelectElement::length() const
00796 {
00797 if(!impl) return 0;
00798 return ((HTMLSelectElementImpl *)impl)->length();
00799 }
00800
00801 HTMLFormElement HTMLSelectElement::form() const
00802 {
00803 return Element::form();
00804 }
00805
00806 HTMLCollection HTMLSelectElement::options() const
00807 {
00808 if(!impl) return HTMLCollection();
00809 return HTMLCollection(impl, HTMLCollectionImpl::SELECT_OPTIONS);
00810 }
00811
00812 bool HTMLSelectElement::disabled() const
00813 {
00814 if(!impl) return 0;
00815 return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();
00816 }
00817
00818 void HTMLSelectElement::setDisabled( bool _disabled )
00819 {
00820 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
00821 }
00822
00823
00824 bool HTMLSelectElement::multiple() const
00825 {
00826 if(!impl) return 0;
00827 return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_MULTIPLE).isNull();
00828 }
00829
00830 void HTMLSelectElement::setMultiple( bool _multiple )
00831 {
00832 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_MULTIPLE, _multiple ? "" : 0);
00833 }
00834
00835 DOMString HTMLSelectElement::name() const
00836 {
00837 if(!impl) return DOMString();
00838 return static_cast<HTMLSelectElementImpl* const>(impl)->name();
00839 }
00840
00841 void HTMLSelectElement::setName( const DOMString &value )
00842 {
00843 if(impl) static_cast<HTMLSelectElementImpl*>(impl)->setName(value);
00844 }
00845
00846 long HTMLSelectElement::size() const
00847 {
00848 if(!impl) return 0;
00849 return ((HTMLSelectElementImpl *)impl)->getAttribute(ATTR_SIZE).toInt();
00850 }
00851
00852 void HTMLSelectElement::setSize( long _size )
00853 {
00854
00855 if(impl) {
00856 DOMString value(QString::number(_size));
00857 static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SIZE,value);
00858 }
00859 }
00860
00861 long HTMLSelectElement::tabIndex() const
00862 {
00863 if(!impl) return 0;
00864 return static_cast<ElementImpl*>(impl)->tabIndex();
00865 }
00866
00867 void HTMLSelectElement::setTabIndex( long _tabIndex )
00868 {
00869 if (!impl) return;
00870 static_cast<ElementImpl*>(impl)->setTabIndex(_tabIndex);
00871 }
00872
00873 void HTMLSelectElement::add( const HTMLElement &element, const HTMLElement &before )
00874 {
00875 if (!impl)
00876 throw DOMException(DOMException::NOT_FOUND_ERR);
00877
00878 int exceptioncode = 0;
00879 static_cast<HTMLSelectElementImpl*>(impl)->add( element, before, exceptioncode );
00880 if ( exceptioncode )
00881 throw DOMException( exceptioncode );
00882 }
00883
00884 void HTMLSelectElement::remove( long index )
00885 {
00886 if(impl) static_cast<HTMLSelectElementImpl*>(impl)->remove( index );
00887 }
00888
00889 void HTMLSelectElement::blur( )
00890 {
00891 if(impl)
00892 ((HTMLSelectElementImpl*)impl)->blur();
00893 }
00894
00895 void HTMLSelectElement::focus( )
00896 {
00897 if(impl)
00898 ((HTMLSelectElementImpl*)impl)->focus();
00899 }
00900
00901
00902
00903 HTMLTextAreaElement::HTMLTextAreaElement() : HTMLElement()
00904 {
00905 }
00906
00907 HTMLTextAreaElement::HTMLTextAreaElement(const HTMLTextAreaElement &other) : HTMLElement(other)
00908 {
00909 }
00910
00911 HTMLTextAreaElement::HTMLTextAreaElement(HTMLTextAreaElementImpl *impl) : HTMLElement(impl)
00912 {
00913 }
00914
00915 HTMLTextAreaElement &HTMLTextAreaElement::operator = (const Node &other)
00916 {
00917 assignOther( other, ID_TEXTAREA );
00918 return *this;
00919 }
00920
00921 HTMLTextAreaElement &HTMLTextAreaElement::operator = (const HTMLTextAreaElement &other)
00922 {
00923 HTMLElement::operator = (other);
00924 return *this;
00925 }
00926
00927 HTMLTextAreaElement::~HTMLTextAreaElement()
00928 {
00929 }
00930
00931 DOMString HTMLTextAreaElement::defaultValue() const
00932 {
00933 if(!impl) return DOMString();
00934 return ((HTMLTextAreaElementImpl *)impl)->defaultValue();
00935 }
00936
00937 void HTMLTextAreaElement::setDefaultValue( const DOMString &value )
00938 {
00939 if (impl) ((HTMLTextAreaElementImpl *)impl)->setDefaultValue(value);
00940 }
00941
00942 HTMLFormElement HTMLTextAreaElement::form() const
00943 {
00944 return Element::form();
00945 }
00946
00947 DOMString HTMLTextAreaElement::accessKey() const
00948 {
00949 if(!impl) return DOMString();
00950 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACCESSKEY);
00951 }
00952
00953 void HTMLTextAreaElement::setAccessKey( const DOMString &value )
00954 {
00955 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACCESSKEY, value);
00956 }
00957
00958 long HTMLTextAreaElement::cols() const
00959 {
00960 if(!impl) return 0;
00961 return ((HTMLTextAreaElementImpl *)impl)->getAttribute(ATTR_COLS).toInt();
00962 }
00963
00964 void HTMLTextAreaElement::setCols( long _cols )
00965 {
00966
00967 if(impl) {
00968 DOMString value(QString::number(_cols));
00969 static_cast<ElementImpl*>(impl)->setAttribute(ATTR_COLS,value);
00970 }
00971 }
00972
00973 bool HTMLTextAreaElement::disabled() const
00974 {
00975 if(!impl) return 0;
00976 return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();
00977 }
00978
00979 void HTMLTextAreaElement::setDisabled( bool _disabled )
00980 {
00981 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
00982 }
00983
00984 DOMString HTMLTextAreaElement::name() const
00985 {
00986 if(!impl) return DOMString();
00987 return static_cast<HTMLTextAreaElementImpl* const>(impl)->name();
00988 }
00989
00990 void HTMLTextAreaElement::setName( const DOMString &value )
00991 {
00992 if(impl) static_cast<HTMLTextAreaElementImpl*>(impl)->setName(value);
00993 }
00994
00995 bool HTMLTextAreaElement::readOnly() const
00996 {
00997 if(!impl) return 0;
00998 return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_READONLY).isNull();
00999 }
01000
01001 void HTMLTextAreaElement::setReadOnly( bool _readOnly )
01002 {
01003 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_READONLY, _readOnly ? "" : 0);
01004 }
01005
01006 long HTMLTextAreaElement::rows() const
01007 {
01008 if(!impl) return 0;
01009 return ((HTMLTextAreaElementImpl *)impl)->getAttribute(ATTR_ROWS).toInt();
01010 }
01011
01012 void HTMLTextAreaElement::setRows( long _rows )
01013 {
01014
01015 if(impl) {
01016 DOMString value(QString::number(_rows));
01017 static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ROWS,value);
01018 }
01019 }
01020
01021 long HTMLTextAreaElement::tabIndex() const
01022 {
01023 if(!impl) return 0;
01024 return static_cast<ElementImpl*>(impl)->tabIndex();
01025 }
01026
01027 void HTMLTextAreaElement::setTabIndex( long _tabIndex )
01028 {
01029 if (!impl) return;
01030 static_cast<ElementImpl*>(impl)->setTabIndex(_tabIndex);
01031 }
01032
01033 DOMString HTMLTextAreaElement::type() const
01034 {
01035 if(!impl) return DOMString();
01036 return ((HTMLTextAreaElementImpl *)impl)->type();
01037 }
01038
01039 DOMString HTMLTextAreaElement::value() const
01040 {
01041 if(!impl) return DOMString();
01042 return ((HTMLTextAreaElementImpl *)impl)->value();
01043 }
01044
01045 void HTMLTextAreaElement::setValue( const DOMString &value )
01046 {
01047 if(impl) ((HTMLTextAreaElementImpl *)impl)->setValue(value);
01048 }
01049
01050 void HTMLTextAreaElement::blur( )
01051 {
01052 if(impl)
01053 ((HTMLTextAreaElementImpl*)impl)->blur();
01054 }
01055
01056 void HTMLTextAreaElement::focus( )
01057 {
01058 if(impl)
01059 ((HTMLTextAreaElementImpl*)impl)->focus();
01060 }
01061
01062 void HTMLTextAreaElement::select( )
01063 {
01064 if(impl)
01065 ((HTMLTextAreaElementImpl *)impl)->select( );
01066 }
01067
01068
01069
01070 HTMLOptionElement::HTMLOptionElement() : HTMLElement()
01071 {
01072 }
01073
01074 HTMLOptionElement::HTMLOptionElement(const HTMLOptionElement &other) : HTMLElement(other)
01075 {
01076 }
01077
01078 HTMLOptionElement::HTMLOptionElement(HTMLOptionElementImpl *impl) : HTMLElement(impl)
01079 {
01080 }
01081
01082 HTMLOptionElement &HTMLOptionElement::operator = (const Node &other)
01083 {
01084 assignOther( other, ID_OPTION );
01085 return *this;
01086 }
01087
01088 HTMLOptionElement &HTMLOptionElement::operator = (const HTMLOptionElement &other)
01089 {
01090 HTMLElement::operator = (other);
01091 return *this;
01092 }
01093
01094 HTMLOptionElement::~HTMLOptionElement()
01095 {
01096 }
01097
01098 HTMLFormElement HTMLOptionElement::form() const
01099 {
01100 return Element::form();
01101 }
01102
01103 bool HTMLOptionElement::defaultSelected() const
01104 {
01105 if(!impl) return 0;
01106 return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_SELECTED).isNull();
01107 }
01108
01109 void HTMLOptionElement::setDefaultSelected( bool _defaultSelected )
01110 {
01111 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SELECTED, _defaultSelected ? "" : 0);
01112 }
01113
01114 DOMString HTMLOptionElement::text() const
01115 {
01116 if(!impl) return DOMString();
01117 return ((HTMLOptionElementImpl *)impl)->text();
01118 }
01119
01120 long HTMLOptionElement::index() const
01121 {
01122 if(!impl) return 0;
01123 return ((HTMLOptionElementImpl *)impl)->index();
01124 }
01125
01126 void HTMLOptionElement::setIndex( long )
01127 {
01128 throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR);
01129 }
01130
01131 bool HTMLOptionElement::disabled() const
01132 {
01133 if(!impl) return 0;
01134 return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();
01135 }
01136
01137 void HTMLOptionElement::setDisabled( bool _disabled )
01138 {
01139 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
01140 }
01141
01142 DOMString HTMLOptionElement::label() const
01143 {
01144 if(!impl) return DOMString();
01145 return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_LABEL);
01146 }
01147
01148 void HTMLOptionElement::setLabel( const DOMString &value )
01149 {
01150 if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_LABEL, value);
01151 }
01152
01153 bool HTMLOptionElement::selected() const
01154 {
01155 if(!impl) return 0;
01156 return ((HTMLOptionElementImpl *)impl)->selected();
01157 }
01158
01159 void HTMLOptionElement::setSelected(bool _selected) {
01160 if(!impl) return;
01161 ((HTMLOptionElementImpl *)impl)->setSelected(_selected);
01162 }
01163
01164 DOMString HTMLOptionElement::value() const
01165 {
01166 if(!impl) return DOMString();
01167 return static_cast<HTMLOptionElementImpl*>(impl)->value();
01168 }
01169
01170 void HTMLOptionElement::setValue( const DOMString &value )
01171 {
01172 if(impl) static_cast<HTMLOptionElementImpl*>(impl)->setValue(value.implementation());
01173 }
01174
01175
01176
01177 HTMLIsIndexElement::HTMLIsIndexElement() : HTMLElement()
01178 {
01179 }
01180
01181 HTMLIsIndexElement::HTMLIsIndexElement(const HTMLIsIndexElement &other) : HTMLElement(other)
01182 {
01183 }
01184
01185 HTMLIsIndexElement::HTMLIsIndexElement(HTMLIsIndexElementImpl *impl) : HTMLElement(impl)
01186 {
01187 }
01188
01189 HTMLIsIndexElement &HTMLIsIndexElement::operator = (const Node &other)
01190 {
01191 assignOther( other, ID_ISINDEX );
01192 return *this;
01193 }
01194
01195 HTMLIsIndexElement &HTMLIsIndexElement::operator = (const HTMLIsIndexElement &other)
01196 {
01197 HTMLElement::operator = (other);
01198 return *this;
01199 }
01200
01201 HTMLIsIndexElement::~HTMLIsIndexElement()
01202 {
01203 }
01204
01205 HTMLFormElement HTMLIsIndexElement::form() const
01206 {
01207 return Element::form();
01208 }
01209
01210 DOMString HTMLIsIndexElement::prompt() const
01211 {
01212 if(!impl) return DOMString();
01213 return static_cast<HTMLIsIndexElementImpl*>(impl)->prompt();
01214 }
01215
01216 void HTMLIsIndexElement::setPrompt( const DOMString &value )
01217 {
01218 if(impl) static_cast<HTMLIsIndexElementImpl*>(impl)->setPrompt(value);
01219 }