• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • khtml
  • dom
html_form.cpp
Go to the documentation of this file.
1 
22 // --------------------------------------------------------------------------
23 
24 #include "dom/html_form.h"
25 #include "dom/dom_exception.h"
26 #include "dom/dom_doc.h"
27 
28 #include "html/html_formimpl.h"
29 #include "html/html_miscimpl.h"
30 
31 #include "xml/dom_docimpl.h"
32 
33 using namespace DOM;
34 
35 HTMLButtonElement::HTMLButtonElement() : HTMLElement()
36 {
37 }
38 
39 HTMLButtonElement::HTMLButtonElement(const HTMLButtonElement &other) : HTMLElement(other)
40 {
41 }
42 
43 HTMLButtonElement::HTMLButtonElement(HTMLButtonElementImpl *impl) : HTMLElement(impl)
44 {
45 }
46 
47 HTMLButtonElement &HTMLButtonElement::operator = (const Node &other)
48 {
49  assignOther( other, ID_BUTTON );
50  return *this;
51 }
52 
53 HTMLButtonElement &HTMLButtonElement::operator = (const HTMLButtonElement &other)
54 {
55  HTMLElement::operator = (other);
56  return *this;
57 }
58 
59 HTMLButtonElement::~HTMLButtonElement()
60 {
61 }
62 
63 HTMLFormElement HTMLButtonElement::form() const
64 {
65  return Element::form();
66 }
67 
68 DOMString HTMLButtonElement::accessKey() const
69 {
70  if(!impl) return DOMString();
71  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACCESSKEY);
72 }
73 
74 void HTMLButtonElement::setAccessKey( const DOMString &value )
75 {
76  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACCESSKEY, value);
77 }
78 
79 bool HTMLButtonElement::disabled() const
80 {
81  if(!impl) return 0;
82  return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();
83 }
84 
85 void HTMLButtonElement::setDisabled( bool _disabled )
86 {
87  if (impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
88 }
89 
90 DOMString HTMLButtonElement::name() const
91 {
92  if(!impl) return DOMString();
93  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_NAME);
94 }
95 
96 void HTMLButtonElement::setName( const DOMString &value )
97 {
98  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_NAME, value);
99 }
100 
101 void HTMLButtonElement::focus( )
102 {
103  if(impl)
104  static_cast<HTMLButtonElementImpl*>(impl)->focus();
105 }
106 
107 void HTMLButtonElement::blur( )
108 {
109  if(impl)
110  static_cast<HTMLButtonElementImpl*>(impl)->blur();
111 }
112 
113 long HTMLButtonElement::tabIndex() const
114 {
115  if(!impl) return 0;
116  return static_cast<ElementImpl*>(impl)->tabIndex();
117 }
118 
119 void HTMLButtonElement::setTabIndex( long _tabIndex )
120 {
121  if (!impl) return;
122  static_cast<ElementImpl*>(impl)->setTabIndex(_tabIndex);
123 }
124 
125 DOMString HTMLButtonElement::type() const
126 {
127  if(!impl) return DOMString();
128  return static_cast<HTMLButtonElementImpl*>(impl)->type();
129 }
130 
131 DOMString HTMLButtonElement::value() const
132 {
133  if(!impl) return DOMString();
134  DOMString s = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_VALUE);
135  if (s.isNull()) return DOMString("");
136  return s;
137 }
138 
139 void HTMLButtonElement::setValue( const DOMString &value )
140 {
141  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_VALUE, value);
142 }
143 
144 // --------------------------------------------------------------------------
145 
146 HTMLFieldSetElement::HTMLFieldSetElement() : HTMLElement()
147 {
148 }
149 
150 HTMLFieldSetElement::HTMLFieldSetElement(const HTMLFieldSetElement &other) : HTMLElement(other)
151 {
152 }
153 
154 HTMLFieldSetElement::HTMLFieldSetElement(HTMLFieldSetElementImpl *impl) : HTMLElement(impl)
155 {
156 }
157 
158 HTMLFieldSetElement &HTMLFieldSetElement::operator = (const Node &other)
159 {
160  assignOther( other, ID_FIELDSET );
161  return *this;
162 }
163 
164 HTMLFieldSetElement &HTMLFieldSetElement::operator = (const HTMLFieldSetElement &other)
165 {
166  HTMLElement::operator = (other);
167  return *this;
168 }
169 
170 HTMLFieldSetElement::~HTMLFieldSetElement()
171 {
172 }
173 
174 HTMLFormElement HTMLFieldSetElement::form() const
175 {
176  return Element::form();
177 }
178 
179 // --------------------------------------------------------------------------
180 
181 HTMLFormElement::HTMLFormElement() : HTMLElement()
182 {
183 }
184 
185 HTMLFormElement::HTMLFormElement(const HTMLFormElement &other) : HTMLElement(other)
186 {
187 }
188 
189 HTMLFormElement::HTMLFormElement(HTMLFormElementImpl *impl) : HTMLElement(impl)
190 {
191 }
192 
193 HTMLFormElement &HTMLFormElement::operator = (const Node &other)
194 {
195  assignOther( other, ID_FORM );
196  return *this;
197 }
198 
199 HTMLFormElement &HTMLFormElement::operator = (const HTMLFormElement &other)
200 {
201  HTMLElement::operator = (other);
202  return *this;
203 }
204 
205 HTMLFormElement::~HTMLFormElement()
206 {
207 }
208 
209 HTMLCollection HTMLFormElement::elements() const
210 {
211  if(!impl) return HTMLCollection();
212  return HTMLFormCollection(impl);
213 }
214 
215 long HTMLFormElement::length() const
216 {
217  if(!impl) return 0;
218  return static_cast<HTMLFormElementImpl*>(impl)->length();
219 }
220 
221 DOMString HTMLFormElement::name() const
222 {
223  if(!impl) return DOMString();
224  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_NAME);
225 }
226 
227 void HTMLFormElement::setName( const DOMString &value )
228 {
229  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_NAME, value);
230 }
231 
232 DOMString HTMLFormElement::acceptCharset() const
233 {
234  if(!impl) return DOMString();
235  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACCEPT_CHARSET);
236 }
237 
238 void HTMLFormElement::setAcceptCharset( const DOMString &value )
239 {
240  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACCEPT_CHARSET, value);
241 }
242 
243 DOMString HTMLFormElement::action() const
244 {
245  if(!impl) return DOMString();
246  return static_cast<HTMLFormElementImpl*>(impl)->action();
247 }
248 
249 void HTMLFormElement::setAction( const DOMString &value )
250 {
251  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACTION, value);
252 }
253 
254 DOMString HTMLFormElement::enctype() const
255 {
256  if(!impl) return DOMString();
257  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ENCTYPE);
258 }
259 
260 void HTMLFormElement::setEnctype( const DOMString &value )
261 {
262  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ENCTYPE, value);
263 }
264 
265 DOMString HTMLFormElement::method() const
266 {
267  if(!impl) return DOMString();
268  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_METHOD);
269 }
270 
271 void HTMLFormElement::setMethod( const DOMString &value )
272 {
273  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_METHOD, value);
274 }
275 
276 DOMString HTMLFormElement::target() const
277 {
278  if(!impl) return DOMString();
279  return static_cast<HTMLFormElementImpl*>(impl)->target();
280 }
281 
282 void HTMLFormElement::setTarget( const DOMString &value )
283 {
284  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_TARGET, value);
285 }
286 
287 void HTMLFormElement::submit( )
288 {
289  if(impl) static_cast<HTMLFormElementImpl*>(impl)->submit( );
290 }
291 
292 void HTMLFormElement::reset( )
293 {
294  if(impl) static_cast<HTMLFormElementImpl*>(impl)->reset( );
295 }
296 
297 // --------------------------------------------------------------------------
298 
299 HTMLInputElement::HTMLInputElement() : HTMLElement()
300 {
301 }
302 
303 HTMLInputElement::HTMLInputElement(const HTMLInputElement &other) : HTMLElement(other)
304 {
305 }
306 
307 HTMLInputElement::HTMLInputElement(HTMLInputElementImpl *impl) : HTMLElement(impl)
308 {
309 }
310 
311 HTMLInputElement &HTMLInputElement::operator = (const Node &other)
312 {
313  assignOther( other, ID_INPUT );
314  return *this;
315 }
316 
317 HTMLInputElement &HTMLInputElement::operator = (const HTMLInputElement &other)
318 {
319  HTMLElement::operator = (other);
320  return *this;
321 }
322 
323 HTMLInputElement::~HTMLInputElement()
324 {
325 }
326 
327 DOMString HTMLInputElement::defaultValue() const
328 {
329  if(!impl) return DOMString();
330  DOMString s = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_VALUE);
331  if (s.isNull()) return DOMString("");
332  return s;
333 
334 }
335 
336 void HTMLInputElement::setDefaultValue( const DOMString &value )
337 {
338  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALUE, value);
339 }
340 
341 bool HTMLInputElement::defaultChecked() const
342 {
343  if(!impl) return 0;
344  return !((ElementImpl *)impl)->getAttribute(ATTR_CHECKED).isNull();
345 }
346 
347 void HTMLInputElement::setDefaultChecked( bool _defaultChecked )
348 {
349  if(impl)
350  ((ElementImpl *)impl)->setAttribute(ATTR_CHECKED, _defaultChecked ? "" : 0);
351 }
352 
353 HTMLFormElement HTMLInputElement::form() const
354 {
355  return Element::form();
356 }
357 
358 DOMString HTMLInputElement::accept() const
359 {
360  if(!impl) return DOMString();
361  return ((ElementImpl *)impl)->getAttribute(ATTR_ACCEPT);
362 }
363 
364 void HTMLInputElement::setAccept( const DOMString &value )
365 {
366  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ACCEPT, value);
367 }
368 
369 DOMString HTMLInputElement::accessKey() const
370 {
371  if(!impl) return DOMString();
372  return ((ElementImpl *)impl)->getAttribute(ATTR_ACCESSKEY);
373 }
374 
375 void HTMLInputElement::setAccessKey( const DOMString &value )
376 {
377  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ACCESSKEY, value);
378 }
379 
380 DOMString HTMLInputElement::align() const
381 {
382  if(!impl) return DOMString();
383  return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
384 }
385 
386 void HTMLInputElement::setAlign( const DOMString &value )
387 {
388  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
389 }
390 
391 DOMString HTMLInputElement::alt() const
392 {
393  if(!impl) return DOMString();
394  return ((ElementImpl *)impl)->getAttribute(ATTR_ALT);
395 }
396 
397 void HTMLInputElement::setAlt( const DOMString &value )
398 {
399  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALT, value);
400 }
401 
402 bool HTMLInputElement::checked() const
403 {
404  if(!impl) return 0;
405  return ((HTMLInputElementImpl*)impl)->checked();
406 }
407 
408 void HTMLInputElement::setChecked( bool _checked )
409 {
410  if(impl)
411  ((HTMLInputElementImpl*)impl)->setChecked(_checked);
412 }
413 
414 bool HTMLInputElement::indeterminate() const
415 {
416  if(!impl) return 0;
417  return ((HTMLInputElementImpl*)impl)->indeterminate();
418 }
419 
420 void HTMLInputElement::setIndeterminate( bool _indeterminate )
421 {
422  if(impl)
423  ((HTMLInputElementImpl*)impl)->setIndeterminate(_indeterminate);
424 }
425 
426 bool HTMLInputElement::disabled() const
427 {
428  if(!impl) return 0;
429  return !((ElementImpl *)impl)->getAttribute(ATTR_DISABLED).isNull();
430 }
431 
432 void HTMLInputElement::setDisabled( bool _disabled )
433 {
434  if(impl)
435  {
436  ((ElementImpl *)impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
437  }
438 }
439 
440 long HTMLInputElement::maxLength() const
441 {
442  if(!impl) return 0;
443  return ((HTMLInputElementImpl *)impl)->getAttribute(ATTR_MAXLENGTH).toInt();
444 }
445 
446 void HTMLInputElement::setMaxLength( long _maxLength )
447 {
448  if(impl) {
449  DOMString value(QString::number(_maxLength));
450  ((ElementImpl *)impl)->setAttribute(ATTR_MAXLENGTH,value);
451  }
452 }
453 
454 DOMString HTMLInputElement::name() const
455 {
456  if(!impl) return DOMString();
457  return static_cast<HTMLInputElementImpl* const>(impl)->name();
458 }
459 
460 void HTMLInputElement::setName( const DOMString &value )
461 {
462  if(impl) static_cast<HTMLInputElementImpl*>(impl)->setName(value);
463 }
464 
465 bool HTMLInputElement::readOnly() const
466 {
467  if(!impl) return 0;
468  return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_READONLY).isNull();
469 }
470 
471 void HTMLInputElement::setReadOnly( bool _readOnly )
472 {
473  if(impl)
474  static_cast<ElementImpl*>(impl)->setAttribute(ATTR_READONLY, _readOnly ? "" : 0);
475 }
476 
477 /* The next two are provided for backwards compatibility. */
478 #ifndef KDE_NO_DEPRECATED
479 DOMString HTMLInputElement::size() const
480 {
481  if(!impl) return DOMString();
482  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_SIZE);
483 }
484 #endif
485 
486 #ifndef KDE_NO_DEPRECATED
487 void HTMLInputElement::setSize( const DOMString &value )
488 {
489  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SIZE, value);
490 }
491 #endif
492 
493 long HTMLInputElement::getSize() const
494 {
495  if(!impl) return 0;
496  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_SIZE).toInt();
497 }
498 
499 void HTMLInputElement::setSize( long value )
500 {
501  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SIZE, QString::number(value));
502 }
503 
504 DOMString HTMLInputElement::src() const
505 {
506  if(!impl) return DOMString();
507  DOMString s = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_SRC);
508  return !s.isNull() ? impl->document()->completeURL( s.string() ) : s;
509 }
510 
511 void HTMLInputElement::setSrc( const DOMString &value )
512 {
513  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SRC, value);
514 }
515 
516 long HTMLInputElement::tabIndex() const
517 {
518  if(!impl) return 0;
519  return static_cast<ElementImpl*>(impl)->tabIndex();
520 }
521 
522 void HTMLInputElement::setTabIndex( long _tabIndex )
523 {
524  if (!impl) return;
525  static_cast<ElementImpl*>(impl)->setTabIndex(_tabIndex);
526 }
527 
528 DOMString HTMLInputElement::type() const
529 {
530  if(!impl) return DOMString();
531  return ((HTMLInputElementImpl *)impl)->type();
532 }
533 
534 void HTMLInputElement::setType(const DOMString& _type)
535 {
536  if (!impl) return;
537  static_cast<HTMLInputElementImpl*>(impl)->setType(_type);
538 }
539 
540 DOMString HTMLInputElement::useMap() const
541 {
542  if(!impl) return DOMString();
543  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_USEMAP);
544 }
545 
546 void HTMLInputElement::setUseMap( const DOMString &value )
547 {
548  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_USEMAP, value);
549 }
550 
551 DOMString HTMLInputElement::value() const
552 {
553  if(!impl) return DOMString();
554  return ((HTMLInputElementImpl*)impl)->value();
555 }
556 
557 void HTMLInputElement::setValue( const DOMString &value )
558 {
559  if (impl)
560  ((HTMLInputElementImpl*)impl)->setValue(value);
561 
562 }
563 
564 void HTMLInputElement::blur( )
565 {
566  if(impl)
567  ((HTMLInputElementImpl*)impl)->blur();
568 }
569 
570 void HTMLInputElement::focus( )
571 {
572  if(impl)
573  ((HTMLInputElementImpl*)impl)->focus();
574 }
575 
576 void HTMLInputElement::select( )
577 {
578  if(impl)
579  ((HTMLInputElementImpl *)impl)->select( );
580 }
581 
582 void HTMLInputElement::click( )
583 {
584  if(impl)
585  ((HTMLInputElementImpl *)impl)->click( );
586 }
587 
588 long HTMLInputElement::selectionStart()
589 {
590  if (impl)
591  return ((HTMLInputElementImpl *)impl)->selectionStart( );
592  return -1;
593 }
594 
595 long HTMLInputElement::selectionEnd()
596 {
597  if (impl)
598  return ((HTMLInputElementImpl *)impl)->selectionEnd( );
599  return -1;
600 }
601 
602 void HTMLInputElement::setSelectionStart(long pos)
603 {
604  if (impl)
605  ((HTMLInputElementImpl *)impl)->setSelectionStart( pos );
606 }
607 
608 void HTMLInputElement::setSelectionEnd(long pos)
609 {
610  if (impl)
611  ((HTMLInputElementImpl *)impl)->setSelectionEnd( pos );
612 }
613 
614 void HTMLInputElement::setSelectionRange(long start, long end)
615 {
616  if (impl)
617  ((HTMLInputElementImpl *)impl)->setSelectionRange( start, end );
618 }
619 
620 // --------------------------------------------------------------------------
621 
622 HTMLLabelElement::HTMLLabelElement() : HTMLElement()
623 {
624 }
625 
626 HTMLLabelElement::HTMLLabelElement(const HTMLLabelElement &other) : HTMLElement(other)
627 {
628 }
629 
630 HTMLLabelElement::HTMLLabelElement(HTMLLabelElementImpl *impl) : HTMLElement(impl)
631 {
632 }
633 
634 HTMLLabelElement &HTMLLabelElement::operator = (const Node &other)
635 {
636  assignOther( other, ID_LABEL );
637  return *this;
638 }
639 
640 HTMLLabelElement &HTMLLabelElement::operator = (const HTMLLabelElement &other)
641 {
642  HTMLElement::operator = (other);
643  return *this;
644 }
645 
646 HTMLLabelElement::~HTMLLabelElement()
647 {
648 }
649 
650 DOMString HTMLLabelElement::accessKey() const
651 {
652  if(!impl) return DOMString();
653  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACCESSKEY);
654 }
655 
656 void HTMLLabelElement::setAccessKey( const DOMString &value )
657 {
658  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACCESSKEY, value);
659 }
660 
661 DOMString HTMLLabelElement::htmlFor() const
662 {
663  if(!impl) return DOMString();
664  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_FOR);
665 }
666 
667 void HTMLLabelElement::setHtmlFor( const DOMString &value )
668 {
669  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_FOR, value);
670 }
671 
672 // --------------------------------------------------------------------------
673 
674 HTMLLegendElement::HTMLLegendElement() : HTMLElement()
675 {
676 }
677 
678 HTMLLegendElement::HTMLLegendElement(const HTMLLegendElement &other) : HTMLElement(other)
679 {
680 }
681 
682 HTMLLegendElement::HTMLLegendElement(HTMLLegendElementImpl *impl) : HTMLElement(impl)
683 {
684 }
685 
686 HTMLLegendElement &HTMLLegendElement::operator = (const Node &other)
687 {
688  assignOther( other, ID_LEGEND );
689  return *this;
690 }
691 
692 HTMLLegendElement &HTMLLegendElement::operator = (const HTMLLegendElement &other)
693 {
694  HTMLElement::operator = (other);
695  return *this;
696 }
697 
698 HTMLLegendElement::~HTMLLegendElement()
699 {
700 }
701 
702 HTMLFormElement HTMLLegendElement::form() const
703 {
704  return Element::form();
705 }
706 
707 DOMString HTMLLegendElement::accessKey() const
708 {
709  if(!impl) return DOMString();
710  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACCESSKEY);
711 }
712 
713 void HTMLLegendElement::setAccessKey( const DOMString &value )
714 {
715  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACCESSKEY, value);
716 }
717 
718 DOMString HTMLLegendElement::align() const
719 {
720  if(!impl) return DOMString();
721  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ALIGN);
722 }
723 
724 void HTMLLegendElement::setAlign( const DOMString &value )
725 {
726  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ALIGN, value);
727 }
728 
729 // --------------------------------------------------------------------------
730 
731 HTMLOptGroupElement::HTMLOptGroupElement() : HTMLElement()
732 {
733 }
734 
735 HTMLOptGroupElement::HTMLOptGroupElement(const HTMLOptGroupElement &other) : HTMLElement(other)
736 {
737 }
738 
739 HTMLOptGroupElement::HTMLOptGroupElement(HTMLOptGroupElementImpl *impl) : HTMLElement(impl)
740 {
741 }
742 
743 HTMLOptGroupElement &HTMLOptGroupElement::operator = (const Node &other)
744 {
745  assignOther( other, ID_OPTGROUP );
746  return *this;
747 }
748 
749 HTMLOptGroupElement &HTMLOptGroupElement::operator = (const HTMLOptGroupElement &other)
750 {
751  HTMLElement::operator = (other);
752  return *this;
753 }
754 
755 HTMLOptGroupElement::~HTMLOptGroupElement()
756 {
757 }
758 
759 bool HTMLOptGroupElement::disabled() const
760 {
761  if(!impl) return 0;
762  return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();
763 }
764 
765 void HTMLOptGroupElement::setDisabled( bool _disabled )
766 {
767  if(impl)
768  static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
769 }
770 
771 DOMString HTMLOptGroupElement::label() const
772 {
773  if(!impl) return DOMString();
774  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_LABEL);
775 }
776 
777 void HTMLOptGroupElement::setLabel( const DOMString &value )
778 {
779  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_LABEL, value);
780 }
781 
782 // --------------------------------------------------------------------------
783 
784 HTMLSelectElement::HTMLSelectElement() : HTMLElement()
785 {
786 }
787 
788 HTMLSelectElement::HTMLSelectElement(const HTMLSelectElement &other) : HTMLElement(other)
789 {
790 }
791 
792 HTMLSelectElement::HTMLSelectElement(HTMLSelectElementImpl *impl) : HTMLElement(impl)
793 {
794 }
795 
796 HTMLSelectElement &HTMLSelectElement::operator = (const Node &other)
797 {
798  assignOther( other, ID_SELECT );
799  return *this;
800 }
801 
802 HTMLSelectElement &HTMLSelectElement::operator = (const HTMLSelectElement &other)
803 {
804  HTMLElement::operator = (other);
805  return *this;
806 }
807 
808 HTMLSelectElement::~HTMLSelectElement()
809 {
810 }
811 
812 DOMString HTMLSelectElement::type() const
813 {
814  if(!impl) return DOMString();
815  return ((HTMLSelectElementImpl *)impl)->type();
816 }
817 
818 long HTMLSelectElement::selectedIndex() const
819 {
820  if(!impl) return 0;
821  return ((HTMLSelectElementImpl *)impl)->selectedIndex();
822 }
823 
824 void HTMLSelectElement::setSelectedIndex( long _selectedIndex )
825 {
826  if(impl)
827  ((HTMLSelectElementImpl *)impl)->setSelectedIndex(_selectedIndex);
828 }
829 
830 DOMString HTMLSelectElement::value() const
831 {
832  if(!impl) return DOMString();
833  return static_cast<HTMLSelectElementImpl*>(impl)->value();
834 }
835 
836 void HTMLSelectElement::setValue( const DOMString &value )
837 {
838  if(!impl || value.isNull()) return;
839  static_cast<HTMLSelectElementImpl*>(impl)->setValue(value.implementation());
840 }
841 
842 long HTMLSelectElement::length() const
843 {
844  if(!impl) return 0;
845  return ((HTMLSelectElementImpl *)impl)->length();
846 }
847 
848 HTMLFormElement HTMLSelectElement::form() const
849 {
850  return Element::form();
851 }
852 
853 HTMLCollection HTMLSelectElement::options() const
854 {
855  if(!impl) return HTMLCollection();
856  return HTMLCollection(((HTMLSelectElementImpl*)impl)->options());
857 }
858 
859 bool HTMLSelectElement::disabled() const
860 {
861  if(!impl) return 0;
862  return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();
863 }
864 
865 void HTMLSelectElement::setDisabled( bool _disabled )
866 {
867  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
868 }
869 
870 
871 bool HTMLSelectElement::multiple() const
872 {
873  if(!impl) return 0;
874  return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_MULTIPLE).isNull();
875 }
876 
877 void HTMLSelectElement::setMultiple( bool _multiple )
878 {
879  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_MULTIPLE, _multiple ? "" : 0);
880 }
881 
882 DOMString HTMLSelectElement::name() const
883 {
884  if(!impl) return DOMString();
885  return static_cast<HTMLSelectElementImpl* const>(impl)->name();
886 }
887 
888 void HTMLSelectElement::setName( const DOMString &value )
889 {
890  if(impl) static_cast<HTMLSelectElementImpl*>(impl)->setName(value);
891 }
892 
893 long HTMLSelectElement::size() const
894 {
895  if(!impl) return 0;
896  return ((HTMLSelectElementImpl *)impl)->getAttribute(ATTR_SIZE).toInt();
897 }
898 
899 void HTMLSelectElement::setSize( long _size )
900 {
901 
902  if(impl) {
903  DOMString value(QString::number(_size));
904  static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SIZE,value);
905  }
906 }
907 
908 long HTMLSelectElement::tabIndex() const
909 {
910  if(!impl) return 0;
911  return static_cast<ElementImpl*>(impl)->tabIndex();
912 }
913 
914 void HTMLSelectElement::setTabIndex( long _tabIndex )
915 {
916  if (!impl) return;
917  static_cast<ElementImpl*>(impl)->setTabIndex(_tabIndex);
918 }
919 
920 void HTMLSelectElement::add( const HTMLElement &element, const HTMLElement &before )
921 {
922  if (!impl)
923  throw DOMException(DOMException::NOT_FOUND_ERR);
924 
925  int exceptioncode = 0;
926  static_cast<HTMLSelectElementImpl*>(impl)->add(
927  static_cast<HTMLElementImpl*>(element.handle()),
928  static_cast<HTMLElementImpl*>(before.handle()), exceptioncode );
929  if ( exceptioncode )
930  throw DOMException( exceptioncode );
931 }
932 
933 void HTMLSelectElement::remove( long index )
934 {
935  if(impl) static_cast<HTMLSelectElementImpl*>(impl)->remove( index );
936 }
937 
938 void HTMLSelectElement::blur( )
939 {
940  if(impl)
941  ((HTMLSelectElementImpl*)impl)->blur();
942 }
943 
944 void HTMLSelectElement::focus( )
945 {
946  if(impl)
947  ((HTMLSelectElementImpl*)impl)->focus();
948 }
949 
950 // --------------------------------------------------------------------------
951 
952 HTMLTextAreaElement::HTMLTextAreaElement() : HTMLElement()
953 {
954 }
955 
956 HTMLTextAreaElement::HTMLTextAreaElement(const HTMLTextAreaElement &other) : HTMLElement(other)
957 {
958 }
959 
960 HTMLTextAreaElement::HTMLTextAreaElement(HTMLTextAreaElementImpl *impl) : HTMLElement(impl)
961 {
962 }
963 
964 HTMLTextAreaElement &HTMLTextAreaElement::operator = (const Node &other)
965 {
966  assignOther( other, ID_TEXTAREA );
967  return *this;
968 }
969 
970 HTMLTextAreaElement &HTMLTextAreaElement::operator = (const HTMLTextAreaElement &other)
971 {
972  HTMLElement::operator = (other);
973  return *this;
974 }
975 
976 HTMLTextAreaElement::~HTMLTextAreaElement()
977 {
978 }
979 
980 DOMString HTMLTextAreaElement::defaultValue() const
981 {
982  if(!impl) return DOMString();
983  return ((HTMLTextAreaElementImpl *)impl)->defaultValue();
984 }
985 
986 void HTMLTextAreaElement::setDefaultValue( const DOMString &value )
987 {
988  if (impl) ((HTMLTextAreaElementImpl *)impl)->setDefaultValue(value);
989 }
990 
991 HTMLFormElement HTMLTextAreaElement::form() const
992 {
993  return Element::form();
994 }
995 
996 DOMString HTMLTextAreaElement::accessKey() const
997 {
998  if(!impl) return DOMString();
999  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACCESSKEY);
1000 }
1001 
1002 void HTMLTextAreaElement::setAccessKey( const DOMString &value )
1003 {
1004  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACCESSKEY, value);
1005 }
1006 
1007 long HTMLTextAreaElement::cols() const
1008 {
1009  if(!impl) return 0;
1010  return ((HTMLTextAreaElementImpl *)impl)->getAttribute(ATTR_COLS).toInt();
1011 }
1012 
1013 void HTMLTextAreaElement::setCols( long _cols )
1014 {
1015 
1016  if(impl) {
1017  DOMString value(QString::number(_cols));
1018  static_cast<ElementImpl*>(impl)->setAttribute(ATTR_COLS,value);
1019  }
1020 }
1021 
1022 bool HTMLTextAreaElement::disabled() const
1023 {
1024  if(!impl) return 0;
1025  return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();
1026 }
1027 
1028 void HTMLTextAreaElement::setDisabled( bool _disabled )
1029 {
1030  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
1031 }
1032 
1033 DOMString HTMLTextAreaElement::name() const
1034 {
1035  if(!impl) return DOMString();
1036  return static_cast<HTMLTextAreaElementImpl* const>(impl)->name();
1037 }
1038 
1039 void HTMLTextAreaElement::setName( const DOMString &value )
1040 {
1041  if(impl) static_cast<HTMLTextAreaElementImpl*>(impl)->setName(value);
1042 }
1043 
1044 bool HTMLTextAreaElement::readOnly() const
1045 {
1046  if(!impl) return 0;
1047  return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_READONLY).isNull();
1048 }
1049 
1050 void HTMLTextAreaElement::setReadOnly( bool _readOnly )
1051 {
1052  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_READONLY, _readOnly ? "" : 0);
1053 }
1054 
1055 long HTMLTextAreaElement::rows() const
1056 {
1057  if(!impl) return 0;
1058  return ((HTMLTextAreaElementImpl *)impl)->getAttribute(ATTR_ROWS).toInt();
1059 }
1060 
1061 void HTMLTextAreaElement::setRows( long _rows )
1062 {
1063 
1064  if(impl) {
1065  DOMString value(QString::number(_rows));
1066  static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ROWS,value);
1067  }
1068 }
1069 
1070 long HTMLTextAreaElement::tabIndex() const
1071 {
1072  if(!impl) return 0;
1073  return static_cast<ElementImpl*>(impl)->tabIndex();
1074 }
1075 
1076 void HTMLTextAreaElement::setTabIndex( long _tabIndex )
1077 {
1078  if (!impl) return;
1079  static_cast<ElementImpl*>(impl)->setTabIndex(_tabIndex);
1080 }
1081 
1082 DOMString HTMLTextAreaElement::type() const
1083 {
1084  if(!impl) return DOMString();
1085  return ((HTMLTextAreaElementImpl *)impl)->type();
1086 }
1087 
1088 DOMString HTMLTextAreaElement::value() const
1089 {
1090  if(!impl) return DOMString();
1091  return ((HTMLTextAreaElementImpl *)impl)->value();
1092 }
1093 
1094 void HTMLTextAreaElement::setValue( const DOMString &value )
1095 {
1096  if(impl) ((HTMLTextAreaElementImpl *)impl)->setValue(value);
1097 }
1098 
1099 void HTMLTextAreaElement::blur( )
1100 {
1101  if(impl)
1102  ((HTMLTextAreaElementImpl*)impl)->blur();
1103 }
1104 
1105 void HTMLTextAreaElement::focus( )
1106 {
1107  if(impl)
1108  ((HTMLTextAreaElementImpl*)impl)->focus();
1109 }
1110 
1111 void HTMLTextAreaElement::select( )
1112 {
1113  if(impl)
1114  ((HTMLTextAreaElementImpl *)impl)->select( );
1115 }
1116 
1117 long HTMLTextAreaElement::selectionStart()
1118 {
1119  if (impl)
1120  return ((HTMLTextAreaElementImpl *)impl)->selectionStart( );
1121  return 0;
1122 }
1123 
1124 long HTMLTextAreaElement::selectionEnd()
1125 {
1126  if (impl)
1127  return ((HTMLTextAreaElementImpl *)impl)->selectionEnd( );
1128  return 0;
1129 }
1130 
1131 long HTMLTextAreaElement::textLength()
1132 {
1133  if (impl)
1134  return ((HTMLTextAreaElementImpl *)impl)->textLength( );
1135  return 0;
1136 }
1137 
1138 void HTMLTextAreaElement::setSelectionStart(long pos)
1139 {
1140  if (impl)
1141  ((HTMLTextAreaElementImpl *)impl)->setSelectionStart( pos );
1142 }
1143 
1144 void HTMLTextAreaElement::setSelectionEnd(long pos)
1145 {
1146  if (impl)
1147  ((HTMLTextAreaElementImpl *)impl)->setSelectionEnd( pos );
1148 }
1149 
1150 void HTMLTextAreaElement::setSelectionRange(long start, long end)
1151 {
1152  if (impl)
1153  ((HTMLTextAreaElementImpl *)impl)->setSelectionRange( start, end );
1154 }
1155 
1156 // --------------------------------------------------------------------------
1157 
1158 HTMLOptionElement::HTMLOptionElement() : HTMLElement()
1159 {
1160 }
1161 
1162 HTMLOptionElement::HTMLOptionElement(const HTMLOptionElement &other) : HTMLElement(other)
1163 {
1164 }
1165 
1166 HTMLOptionElement::HTMLOptionElement(HTMLOptionElementImpl *impl) : HTMLElement(impl)
1167 {
1168 }
1169 
1170 HTMLOptionElement &HTMLOptionElement::operator = (const Node &other)
1171 {
1172  assignOther( other, ID_OPTION );
1173  return *this;
1174 }
1175 
1176 HTMLOptionElement &HTMLOptionElement::operator = (const HTMLOptionElement &other)
1177 {
1178  HTMLElement::operator = (other);
1179  return *this;
1180 }
1181 
1182 HTMLOptionElement::~HTMLOptionElement()
1183 {
1184 }
1185 
1186 HTMLFormElement HTMLOptionElement::form() const
1187 {
1188  return Element::form();
1189 }
1190 
1191 bool HTMLOptionElement::defaultSelected() const
1192 {
1193  if(!impl) return 0;
1194  return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_SELECTED).isNull();
1195 }
1196 
1197 void HTMLOptionElement::setDefaultSelected( bool _defaultSelected )
1198 {
1199  if(impl) static_cast<HTMLOptionElementImpl*>(impl)->setDefaultSelected(_defaultSelected);
1200 }
1201 
1202 DOMString HTMLOptionElement::text() const
1203 {
1204  if(!impl) return DOMString();
1205  return ((HTMLOptionElementImpl *)impl)->text();
1206 }
1207 
1208 long HTMLOptionElement::index() const
1209 {
1210  if(!impl) return 0;
1211  return ((HTMLOptionElementImpl *)impl)->index();
1212 }
1213 
1214 void HTMLOptionElement::setIndex( long /*_index*/ )
1215 {
1216  throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR);
1217 }
1218 
1219 bool HTMLOptionElement::disabled() const
1220 {
1221  if(!impl) return 0;
1222  return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();
1223 }
1224 
1225 void HTMLOptionElement::setDisabled( bool _disabled )
1226 {
1227  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
1228 }
1229 
1230 DOMString HTMLOptionElement::label() const
1231 {
1232  if(!impl) return DOMString();
1233  return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_LABEL);
1234 }
1235 
1236 void HTMLOptionElement::setLabel( const DOMString &value )
1237 {
1238  if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_LABEL, value);
1239 }
1240 
1241 bool HTMLOptionElement::selected() const
1242 {
1243  if(!impl) return 0;
1244  return ((HTMLOptionElementImpl *)impl)->selected();
1245 }
1246 
1247 void HTMLOptionElement::setSelected(bool _selected) {
1248  if(!impl) return;
1249  ((HTMLOptionElementImpl *)impl)->setSelected(_selected);
1250 }
1251 
1252 DOMString HTMLOptionElement::value() const
1253 {
1254  if(!impl) return DOMString();
1255  return static_cast<HTMLOptionElementImpl*>(impl)->value();
1256 }
1257 
1258 void HTMLOptionElement::setValue( const DOMString &value )
1259 {
1260  if(impl) static_cast<HTMLOptionElementImpl*>(impl)->setValue(value.implementation());
1261 }
1262 
1263 // -----------------------------------------------------------------------------
1264 
1265 HTMLIsIndexElement::HTMLIsIndexElement() : HTMLElement()
1266 {
1267 }
1268 
1269 HTMLIsIndexElement::HTMLIsIndexElement(const HTMLIsIndexElement &other) : HTMLElement(other)
1270 {
1271 }
1272 
1273 HTMLIsIndexElement::HTMLIsIndexElement(HTMLIsIndexElementImpl *impl) : HTMLElement(impl)
1274 {
1275 }
1276 
1277 HTMLIsIndexElement &HTMLIsIndexElement::operator = (const Node &other)
1278 {
1279  assignOther( other, ID_ISINDEX );
1280  return *this;
1281 }
1282 
1283 HTMLIsIndexElement &HTMLIsIndexElement::operator = (const HTMLIsIndexElement &other)
1284 {
1285  HTMLElement::operator = (other);
1286  return *this;
1287 }
1288 
1289 HTMLIsIndexElement::~HTMLIsIndexElement()
1290 {
1291 }
1292 
1293 HTMLFormElement HTMLIsIndexElement::form() const
1294 {
1295  return Element::form();
1296 }
1297 
1298 DOMString HTMLIsIndexElement::prompt() const
1299 {
1300  if(!impl) return DOMString();
1301  return static_cast<HTMLIsIndexElementImpl*>(impl)->prompt();
1302 }
1303 
1304 void HTMLIsIndexElement::setPrompt( const DOMString &value )
1305 {
1306  if(impl) static_cast<HTMLIsIndexElementImpl*>(impl)->setPrompt(value);
1307 }
DOM::HTMLFormElement::method
DOMString method() const
HTTP method used to submit form.
Definition: html_form.cpp:265
DOM::DOMException::NOT_FOUND_ERR
Definition: dom_exception.h:80
DOM::HTMLTextAreaElement::readOnly
bool readOnly() const
This control is read-only.
Definition: html_form.cpp:1044
DOM::HTMLSelectElement::remove
void remove(long index)
Remove an element from the collection of OPTION elements for this SELECT .
Definition: html_form.cpp:933
DOM::HTMLTextAreaElement::setReadOnly
void setReadOnly(bool)
see readOnly
Definition: html_form.cpp:1050
DOM::HTMLTextAreaElement::setSelectionRange
void setSelectionRange(long start, long end)
Selects the text from start to end, and positions the cursor after the selection. ...
Definition: html_form.cpp:1150
DOM::HTMLInputElement::setReadOnly
void setReadOnly(bool)
see readOnly
Definition: html_form.cpp:471
dom_doc.h
DOM::HTMLSelectElement::type
DOMString type() const
The type of control created.
Definition: html_form.cpp:812
DOM::HTMLInputElement::setAccessKey
void setAccessKey(const DOMString &)
see accessKey
Definition: html_form.cpp:375
DOM::HTMLIsIndexElement::setPrompt
void setPrompt(const DOMString &)
see prompt
Definition: html_form.cpp:1304
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:270
DOM::HTMLInputElement::setSize
void setSize(const DOMString &)
Definition: html_form.cpp:487
DOM::HTMLOptGroupElement::HTMLOptGroupElement
HTMLOptGroupElement()
Definition: html_form.cpp:731
DOM::HTMLTextAreaElement::form
HTMLFormElement form() const
KDE 4.0: remove.
Definition: html_form.cpp:991
DOM::HTMLInputElement::setSelectionEnd
void setSelectionEnd(long offset)
Move the end of the selection (and the cursor) to the given offset in text This call has no effect if...
Definition: html_form.cpp:608
DOM::HTMLButtonElement::tabIndex
long tabIndex() const
Index that represents the element's position in the tabbing order.
Definition: html_form.cpp:113
DOM::HTMLInputElement::setTabIndex
void setTabIndex(long)
see tabIndex
Definition: html_form.cpp:522
DOM::HTMLInputElement::name
DOMString name() const
Form control or object name when submitted with a form.
Definition: html_form.cpp:454
DOM::HTMLSelectElement
The select element allows the selection of an option.
Definition: html_form.h:877
DOM::HTMLLegendElement::accessKey
DOMString accessKey() const
A single character access key to give access to the form control.
Definition: html_form.cpp:707
DOM::HTMLFormElement::submit
void submit()
Submits the form.
Definition: html_form.cpp:287
DOM::HTMLInputElement::setAlign
void setAlign(const DOMString &)
see align
Definition: html_form.cpp:386
DOM::HTMLTextAreaElement::textLength
long textLength()
Returns the length of the text.
Definition: html_form.cpp:1131
DOM::HTMLInputElement::size
DOMString size() const
Definition: html_form.cpp:479
DOM::HTMLIsIndexElement
This element is used for single-line text input.
Definition: html_form.h:1382
DOM::HTMLButtonElement::setName
void setName(const DOMString &)
see name
Definition: html_form.cpp:96
DOM::HTMLSelectElement::tabIndex
long tabIndex() const
Index that represents the element's position in the tabbing order.
Definition: html_form.cpp:908
DOM::HTMLFormElement::setAction
void setAction(const DOMString &)
see action
Definition: html_form.cpp:249
DOM::HTMLOptionElement::label
DOMString label() const
Option label for use in hierarchical menus.
Definition: html_form.cpp:1230
DOM::HTMLSelectElement::name
DOMString name() const
Form control or object name when submitted with a form.
Definition: html_form.cpp:882
DOM::HTMLFormElement::setEnctype
void setEnctype(const DOMString &)
see enctype
Definition: html_form.cpp:260
DOM::HTMLFormElement::elements
HTMLCollection elements() const
Returns a collection of all control elements in the form.
Definition: html_form.cpp:209
DOM::HTMLInputElement::defaultValue
DOMString defaultValue() const
Stores the initial control value (i.e., the initial value of value ).
Definition: html_form.cpp:327
DOM::HTMLSelectElement::setTabIndex
void setTabIndex(long)
see tabIndex
Definition: html_form.cpp:914
DOM::HTMLButtonElement::value
DOMString value() const
The current form control value.
Definition: html_form.cpp:131
DOM::HTMLButtonElement::~HTMLButtonElement
~HTMLButtonElement()
Definition: html_form.cpp:59
DOM::HTMLFormElement
The FORM element encompasses behavior similar to a collection and an element.
Definition: html_form.h:206
DOM::HTMLSelectElement::setValue
void setValue(const DOMString &)
see value
Definition: html_form.cpp:836
DOM::HTMLInputElement::alt
DOMString alt() const
Alternate text for user agents not rendering the normal content of this element.
Definition: html_form.cpp:391
DOM::HTMLInputElement::accept
DOMString accept() const
A comma-separated list of content types that a server processing this form will handle correctly...
Definition: html_form.cpp:358
DOM::HTMLInputElement::setAccept
void setAccept(const DOMString &)
see accept
Definition: html_form.cpp:364
DOM::HTMLFormElement::HTMLFormElement
HTMLFormElement()
Definition: html_form.cpp:181
DOM::HTMLTextAreaElement::rows
long rows() const
Number of text rows.
Definition: html_form.cpp:1055
DOM::DOMString::string
QString string() const
Definition: dom_string.cpp:236
DOM::HTMLSelectElement::length
long length() const
The number of options in this SELECT .
Definition: html_form.cpp:842
DOM::HTMLTextAreaElement::setAccessKey
void setAccessKey(const DOMString &)
see accessKey
Definition: html_form.cpp:1002
DOM::HTMLTextAreaElement::value
DOMString value() const
The current textual content of the multi-line text field.
Definition: html_form.cpp:1088
DOM::HTMLInputElement::selectionEnd
long selectionEnd()
Returns the character offset of end of selection, or if none, the cursor position.
Definition: html_form.cpp:595
DOM::HTMLInputElement::click
void click()
Simulate a mouse-click.
Definition: html_form.cpp:582
DOM::HTMLButtonElement::focus
void focus()
Gives keyboard focus to this element.
Definition: html_form.cpp:101
DOM::HTMLOptionElement::index
long index() const
The index of this OPTION in its parent SELECT .
Definition: html_form.cpp:1208
DOM::HTMLInputElement
Form control.
Definition: html_form.h:349
DOM::HTMLSelectElement::focus
void focus()
Gives keyboard focus to this element.
Definition: html_form.cpp:944
DOM::HTMLSelectElement::setMultiple
void setMultiple(bool)
see multiple
Definition: html_form.cpp:877
DOM::HTMLInputElement::readOnly
bool readOnly() const
This control is read-only.
Definition: html_form.cpp:465
DOM::HTMLInputElement::getSize
long getSize() const
Size information.
Definition: html_form.cpp:493
DOM::HTMLTextAreaElement::setCols
void setCols(long)
see cols
Definition: html_form.cpp:1013
DOM::DOMException
DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impos...
Definition: dom_exception.h:58
DOM::HTMLButtonElement::setAccessKey
void setAccessKey(const DOMString &)
see accessKey
Definition: html_form.cpp:74
DOM::HTMLInputElement::value
DOMString value() const
The current form control value.
Definition: html_form.cpp:551
DOM::HTMLButtonElement::setTabIndex
void setTabIndex(long)
see tabIndex
Definition: html_form.cpp:119
DOM::HTMLOptionElement::operator=
HTMLOptionElement & operator=(const HTMLOptionElement &other)
Definition: html_form.cpp:1176
DOM::HTMLButtonElement::form
HTMLFormElement form() const
Returns the FORM element containing this control.
Definition: html_form.cpp:63
DOM::HTMLOptionElement::value
DOMString value() const
The current form control value.
Definition: html_form.cpp:1252
DOM::HTMLInputElement::setDefaultValue
void setDefaultValue(const DOMString &)
see defaultValue
Definition: html_form.cpp:336
DOM::HTMLFormElement::target
DOMString target() const
Frame to render the resource in.
Definition: html_form.cpp:276
DOM::Element::setAttribute
void setAttribute(const DOMString &name, const DOMString &value)
Adds a new attribute.
Definition: dom_element.cpp:158
DOM::HTMLSelectElement::selectedIndex
long selectedIndex() const
The ordinal index of the selected option.
Definition: html_form.cpp:818
DOM::HTMLLabelElement::~HTMLLabelElement
~HTMLLabelElement()
Definition: html_form.cpp:646
DOM::HTMLFormElement::acceptCharset
DOMString acceptCharset() const
List of character sets supported by the server.
Definition: html_form.cpp:232
DOM::HTMLFormElement::enctype
DOMString enctype() const
The content type of the submitted form, generally "application/x-www-form-urlencoded".
Definition: html_form.cpp:254
DOM::HTMLLabelElement::operator=
HTMLLabelElement & operator=(const HTMLLabelElement &other)
Definition: html_form.cpp:640
DOM::HTMLCollection
An HTMLCollection is a list of nodes.
Definition: html_misc.h:130
DOM::HTMLTextAreaElement::disabled
bool disabled() const
The control is unavailable in this context.
Definition: html_form.cpp:1022
DOM::HTMLInputElement::disabled
bool disabled() const
The control is unavailable in this context.
Definition: html_form.cpp:426
DOM::HTMLLabelElement::setAccessKey
void setAccessKey(const DOMString &)
see accessKey
Definition: html_form.cpp:656
DOM::HTMLFormElement::~HTMLFormElement
~HTMLFormElement()
Definition: html_form.cpp:205
DOM::HTMLInputElement::defaultChecked
bool defaultChecked() const
When type has the value "Radio" or "Checkbox", stores the initial value of the checked attribute...
Definition: html_form.cpp:341
DOM::DOMString::isNull
bool isNull() const
Definition: dom_string.h:121
DOM::HTMLInputElement::tabIndex
long tabIndex() const
Index that represents the element's position in the tabbing order.
Definition: html_form.cpp:516
DOM::HTMLIsIndexElement::prompt
DOMString prompt() const
The prompt message.
Definition: html_form.cpp:1298
DOM::HTMLTextAreaElement::setDefaultValue
void setDefaultValue(const DOMString &)
see defaultValue
Definition: html_form.cpp:986
DOM::HTMLFormElement::setTarget
void setTarget(const DOMString &)
see target
Definition: html_form.cpp:282
DOM::HTMLSelectElement::options
HTMLCollection options() const
The collection of OPTION elements contained by this element.
Definition: html_form.cpp:853
DOM::HTMLTextAreaElement::setRows
void setRows(long)
see rows
Definition: html_form.cpp:1061
DOM::HTMLLegendElement::operator=
HTMLLegendElement & operator=(const HTMLLegendElement &other)
Definition: html_form.cpp:692
DOM::HTMLFormElement::operator=
HTMLFormElement & operator=(const HTMLFormElement &other)
Definition: html_form.cpp:199
DOM::HTMLFormElement::action
DOMString action() const
Server-side form handler.
Definition: html_form.cpp:243
DOM::HTMLSelectElement::disabled
bool disabled() const
The control is unavailable in this context.
Definition: html_form.cpp:859
DOM::HTMLTextAreaElement::setTabIndex
void setTabIndex(long)
see tabIndex
Definition: html_form.cpp:1076
DOM::HTMLInputElement::operator=
HTMLInputElement & operator=(const HTMLInputElement &other)
Definition: html_form.cpp:317
DOM::HTMLTextAreaElement::focus
void focus()
Gives keyboard focus to this element.
Definition: html_form.cpp:1105
DOM::HTMLOptGroupElement
Group options together in logical subdivisions.
Definition: html_form.h:823
DOM::HTMLOptionElement::text
DOMString text() const
The text contained within the option element.
Definition: html_form.cpp:1202
DOM::HTMLIsIndexElement::form
HTMLFormElement form() const
KDE 4.0: remove
Definition: html_form.cpp:1293
DOM::HTMLOptionElement::form
HTMLFormElement form() const
KDE 4.0: remove
Definition: html_form.cpp:1186
html_form.h
DOM::HTMLInputElement::HTMLInputElement
HTMLInputElement()
Definition: html_form.cpp:299
DOM::HTMLOptGroupElement::disabled
bool disabled() const
The control is unavailable in this context.
Definition: html_form.cpp:759
DOM::HTMLLegendElement
Provides a caption for a FIELDSET grouping.
Definition: html_form.h:764
DOM::HTMLInputElement::setAlt
void setAlt(const DOMString &)
see alt
Definition: html_form.cpp:397
DOM::HTMLTextAreaElement::setSelectionEnd
void setSelectionEnd(long offset)
Move the end of the selection (and the cursor) to the given offset in text NOTE: this method is not p...
Definition: html_form.cpp:1144
DOM::HTMLTextAreaElement::accessKey
DOMString accessKey() const
A single character access key to give access to the form control.
Definition: html_form.cpp:996
DOM::HTMLInputElement::checked
bool checked() const
Describes whether a radio or check box is checked, when type has the value "Radio" or "Checkbox"...
Definition: html_form.cpp:402
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::HTMLInputElement::maxLength
long maxLength() const
Maximum number of characters for text fields, when type has the value "Text" or "Password".
Definition: html_form.cpp:440
DOM::HTMLInputElement::setType
void setType(const DOMString &)
see type
Definition: html_form.cpp:534
DOM::HTMLOptionElement::~HTMLOptionElement
~HTMLOptionElement()
Definition: html_form.cpp:1182
DOM::HTMLInputElement::type
DOMString type() const
The type of control created.
Definition: html_form.cpp:528
DOM::HTMLInputElement::align
DOMString align() const
Aligns this object (vertically or horizontally) with respect to its surrounding text.
Definition: html_form.cpp:380
dom_exception.h
DOM::HTMLFieldSetElement::HTMLFieldSetElement
HTMLFieldSetElement()
Definition: html_form.cpp:146
DOM::HTMLOptGroupElement::operator=
HTMLOptGroupElement & operator=(const HTMLOptGroupElement &other)
Definition: html_form.cpp:749
DOM::HTMLTextAreaElement::selectionEnd
long selectionEnd()
Returns the character offset of end of selection, or if none, the cursor position.
Definition: html_form.cpp:1124
DOM::HTMLSelectElement::value
DOMString value() const
The current form control value.
Definition: html_form.cpp:830
DOM::HTMLIsIndexElement::~HTMLIsIndexElement
~HTMLIsIndexElement()
Definition: html_form.cpp:1289
DOM::HTMLOptionElement::selected
bool selected() const
Means that this option is initially selected.
Definition: html_form.cpp:1241
DOM::HTMLFieldSetElement::form
HTMLFormElement form() const
KDE 4.0: remove.
Definition: html_form.cpp:174
DOM::HTMLFieldSetElement::operator=
HTMLFieldSetElement & operator=(const HTMLFieldSetElement &other)
Definition: html_form.cpp:164
DOM::Node::impl
NodeImpl * impl
Definition: dom_node.h:948
DOM::HTMLOptGroupElement::~HTMLOptGroupElement
~HTMLOptGroupElement()
Definition: html_form.cpp:755
DOM::HTMLLegendElement::form
HTMLFormElement form() const
KDE 4.0: remove
Definition: html_form.cpp:702
DOM::HTMLTextAreaElement::cols
long cols() const
Width of control (in characters).
Definition: html_form.cpp:1007
DOM::HTMLTextAreaElement::blur
void blur()
Removes keyboard focus from this element.
Definition: html_form.cpp:1099
DOM::HTMLOptionElement::setDisabled
void setDisabled(bool)
see disabled
Definition: html_form.cpp:1225
DOM::HTMLTextAreaElement::setDisabled
void setDisabled(bool)
see disabled
Definition: html_form.cpp:1028
DOM::DOMString::toInt
int toInt() const
Definition: dom_string.cpp:243
DOM::HTMLInputElement::focus
void focus()
Gives keyboard focus to this element.
Definition: html_form.cpp:570
DOM::HTMLLabelElement::accessKey
DOMString accessKey() const
A single character access key to give access to the form control.
Definition: html_form.cpp:650
DOM::HTMLTextAreaElement::setSelectionStart
void setSelectionStart(long offset)
Move the beginning of the selection to the given offset in text NOTE: this method is not part of the ...
Definition: html_form.cpp:1138
DOM::HTMLTextAreaElement::name
DOMString name() const
Form control or object name when submitted with a form.
Definition: html_form.cpp:1033
DOM::HTMLLegendElement::~HTMLLegendElement
~HTMLLegendElement()
Definition: html_form.cpp:698
DOM::HTMLTextAreaElement::~HTMLTextAreaElement
~HTMLTextAreaElement()
Definition: html_form.cpp:976
DOM::HTMLIsIndexElement::operator=
HTMLIsIndexElement & operator=(const HTMLIsIndexElement &other)
Definition: html_form.cpp:1283
DOM::HTMLFormElement::reset
void reset()
Restores a form element's default values.
Definition: html_form.cpp:292
DOM::HTMLFormElement::setName
void setName(const DOMString &)
see name
Definition: html_form.cpp:227
DOM::HTMLInputElement::setValue
void setValue(const DOMString &)
see value
Definition: html_form.cpp:557
DOM::HTMLSelectElement::blur
void blur()
Removes keyboard focus from this element.
Definition: html_form.cpp:938
DOM::HTMLInputElement::setSelectionStart
void setSelectionStart(long offset)
Move the beginning of the selection to the given offset in text This call has no effect if the type o...
Definition: html_form.cpp:602
DOM::HTMLSelectElement::size
long size() const
Number of visible rows.
Definition: html_form.cpp:893
DOM::HTMLInputElement::src
DOMString src() const
When the type attribute has the value "Image", this attribute specifies the location of the image to ...
Definition: html_form.cpp:504
DOM::HTMLSelectElement::setName
void setName(const DOMString &)
see name
Definition: html_form.cpp:888
DOM::HTMLButtonElement::setValue
void setValue(const DOMString &)
see value
Definition: html_form.cpp:139
DOM::HTMLInputElement::selectionStart
long selectionStart()
Returns the character offset of beginning of selection, or if none, the cursor position.
Definition: html_form.cpp:588
DOM::HTMLInputElement::blur
void blur()
Removes keyboard focus from this element.
Definition: html_form.cpp:564
DOM::HTMLButtonElement::accessKey
DOMString accessKey() const
A single character access key to give access to the form control.
Definition: html_form.cpp:68
DOM::HTMLButtonElement::setDisabled
void setDisabled(bool)
see disabled
Definition: html_form.cpp:85
DOM::HTMLLegendElement::HTMLLegendElement
HTMLLegendElement()
Definition: html_form.cpp:674
DOM::HTMLSelectElement::operator=
HTMLSelectElement & operator=(const HTMLSelectElement &other)
Definition: html_form.cpp:802
DOM::HTMLInputElement::setUseMap
void setUseMap(const DOMString &)
see useMap
Definition: html_form.cpp:546
DOM::HTMLElement::operator=
HTMLElement & operator=(const HTMLElement &other)
Definition: html_element.cpp:41
DOM::HTMLTextAreaElement
Multi-line text field.
Definition: html_form.h:1053
DOM::HTMLButtonElement::type
DOMString type() const
The type of button.
Definition: html_form.cpp:125
DOM::HTMLLabelElement::htmlFor
DOMString htmlFor() const
This attribute links this label with another form control by id attribute.
Definition: html_form.cpp:661
DOM::HTMLInputElement::setChecked
void setChecked(bool)
see checked
Definition: html_form.cpp:408
DOM::HTMLButtonElement
Push button.
Definition: html_form.h:50
DOM::HTMLInputElement::setMaxLength
void setMaxLength(long)
see maxLength
Definition: html_form.cpp:446
DOM::HTMLSelectElement::setSize
void setSize(long)
see size
Definition: html_form.cpp:899
DOM::HTMLInputElement::select
void select()
Select the contents of the text area.
Definition: html_form.cpp:576
DOM::HTMLOptionElement::setValue
void setValue(const DOMString &)
see value
Definition: html_form.cpp:1258
DOM::HTMLFormElement::setMethod
void setMethod(const DOMString &)
see method
Definition: html_form.cpp:271
DOM::HTMLButtonElement::blur
void blur()
Removes keyboard focus from this element.
Definition: html_form.cpp:107
DOM::HTMLSelectElement::HTMLSelectElement
HTMLSelectElement()
Definition: html_form.cpp:784
DOM::HTMLOptionElement::setLabel
void setLabel(const DOMString &)
see label
Definition: html_form.cpp:1236
DOM::HTMLLegendElement::setAccessKey
void setAccessKey(const DOMString &)
see accessKey
Definition: html_form.cpp:713
DOM::HTMLButtonElement::operator=
HTMLButtonElement & operator=(const HTMLButtonElement &other)
Definition: html_form.cpp:53
DOM::Element::getAttribute
DOMString getAttribute(const DOMString &name)
Retrieves an attribute value by name.
Definition: dom_element.cpp:147
DOM::HTMLInputElement::setSelectionRange
void setSelectionRange(long start, long end)
Makes the position span from start to end, and positions the cursor after the selection.
Definition: html_form.cpp:614
DOM::HTMLButtonElement::name
DOMString name() const
Form control or object name when submitted with a form.
Definition: html_form.cpp:90
DOM::HTMLFieldSetElement
Organizes form controls into logical groups.
Definition: html_form.h:172
DOM::HTMLSelectElement::setDisabled
void setDisabled(bool)
see disabled
Definition: html_form.cpp:865
DOM::HTMLButtonElement::disabled
bool disabled() const
The control is unavailable in this context.
Definition: html_form.cpp:79
DOM::HTMLButtonElement::HTMLButtonElement
HTMLButtonElement()
Definition: html_form.cpp:35
DOM::HTMLOptGroupElement::setLabel
void setLabel(const DOMString &)
see label
Definition: html_form.cpp:777
DOM::DOMException::NO_MODIFICATION_ALLOWED_ERR
Definition: dom_exception.h:79
DOM::HTMLInputElement::indeterminate
bool indeterminate() const
Describes whether a radio box is indeterminate.
Definition: html_form.cpp:414
DOM::HTMLInputElement::setName
void setName(const DOMString &)
see name
Definition: html_form.cpp:460
DOM::Element::form
Element form() const
KHTML extension to DOM This method returns the associated form element.
Definition: dom_element.cpp:310
DOM::DOMString::implementation
DOMStringImpl * implementation() const
Definition: dom_string.h:131
DOM::HTMLLegendElement::align
DOMString align() const
Text alignment relative to FIELDSET .
Definition: html_form.cpp:718
DOM::HTMLInputElement::form
HTMLFormElement form() const
KDE 4.0: remove.
Definition: html_form.cpp:353
DOM::HTMLLabelElement::HTMLLabelElement
HTMLLabelElement()
Definition: html_form.cpp:622
DOM::Node::HTMLCollection
friend class HTMLCollection
Definition: dom_node.h:274
DOM::HTMLTextAreaElement::tabIndex
long tabIndex() const
Index that represents the element's position in the tabbing order.
Definition: html_form.cpp:1070
DOM::HTMLFormElement::setAcceptCharset
void setAcceptCharset(const DOMString &)
see acceptCharset
Definition: html_form.cpp:238
DOM::HTMLElement::assignOther
void assignOther(const Node &other, int elementId)
Definition: html_element.cpp:176
DOM::HTMLOptionElement::defaultSelected
bool defaultSelected() const
Stores the initial value of the selected attribute.
Definition: html_form.cpp:1191
DOM::HTMLLabelElement::setHtmlFor
void setHtmlFor(const DOMString &)
see htmlFor
Definition: html_form.cpp:667
DOM::HTMLTextAreaElement::HTMLTextAreaElement
HTMLTextAreaElement()
Definition: html_form.cpp:952
DOM::HTMLTextAreaElement::setName
void setName(const DOMString &)
see name
Definition: html_form.cpp:1039
DOM::HTMLOptionElement::setIndex
void setIndex(long)
see index
Definition: html_form.cpp:1214
DOM::HTMLInputElement::accessKey
DOMString accessKey() const
A single character access key to give access to the form control.
Definition: html_form.cpp:369
DOM::HTMLTextAreaElement::setValue
void setValue(const DOMString &)
see value
Definition: html_form.cpp:1094
DOM::HTMLInputElement::setIndeterminate
void setIndeterminate(bool)
see indeterminate
Definition: html_form.cpp:420
DOM::HTMLTextAreaElement::selectionStart
long selectionStart()
Returns the character offset of beginning of selection, or if none, the cursor position.
Definition: html_form.cpp:1117
DOM::HTMLOptionElement
A selectable choice.
Definition: html_form.h:1262
DOM::HTMLSelectElement::~HTMLSelectElement
~HTMLSelectElement()
Definition: html_form.cpp:808
DOM::HTMLSelectElement::multiple
bool multiple() const
If true, multiple OPTION elements may be selected in this SELECT .
Definition: html_form.cpp:871
DOM::HTMLOptGroupElement::setDisabled
void setDisabled(bool)
see disabled
Definition: html_form.cpp:765
DOM::Node::handle
NodeImpl * handle() const
Definition: dom_node.h:925
DOM::HTMLSelectElement::setSelectedIndex
void setSelectedIndex(long)
see selectedIndex
Definition: html_form.cpp:824
DOM::HTMLFormElement::name
DOMString name() const
Names the form.
Definition: html_form.cpp:221
DOM::HTMLInputElement::~HTMLInputElement
~HTMLInputElement()
Definition: html_form.cpp:323
DOM::HTMLInputElement::setDisabled
void setDisabled(bool)
see disabled
Definition: html_form.cpp:432
DOM::HTMLOptionElement::setSelected
void setSelected(bool)
see selected
Definition: html_form.cpp:1247
DOM::HTMLFormCollection
Definition: html_misc.h:209
DOM::HTMLTextAreaElement::defaultValue
DOMString defaultValue() const
Stores the initial control value (i.e., the initial value of value ).
Definition: html_form.cpp:980
DOM::HTMLTextAreaElement::operator=
HTMLTextAreaElement & operator=(const HTMLTextAreaElement &other)
Definition: html_form.cpp:970
DOM::HTMLOptionElement::HTMLOptionElement
HTMLOptionElement()
Definition: html_form.cpp:1158
DOM::HTMLIsIndexElement::HTMLIsIndexElement
HTMLIsIndexElement()
Definition: html_form.cpp:1265
DOM::HTMLOptionElement::disabled
bool disabled() const
The control is unavailable in this context.
Definition: html_form.cpp:1219
DOM::HTMLSelectElement::form
HTMLFormElement form() const
KDE 4.0: remove.
Definition: html_form.cpp:848
DOM::HTMLOptGroupElement::label
DOMString label() const
Assigns a label to this option group.
Definition: html_form.cpp:771
DOM::HTMLOptionElement::setDefaultSelected
void setDefaultSelected(bool)
see defaultSelected
Definition: html_form.cpp:1197
DOM::HTMLLabelElement
Form field label text.
Definition: html_form.h:709
DOM::HTMLFormElement::length
long length() const
The number of form controls in the form.
Definition: html_form.cpp:215
DOM::HTMLElement
All HTML element interfaces derive from this class.
Definition: html_element.h:69
DOM::HTMLFieldSetElement::~HTMLFieldSetElement
~HTMLFieldSetElement()
Definition: html_form.cpp:170
DOM::HTMLInputElement::setSrc
void setSrc(const DOMString &)
see src
Definition: html_form.cpp:511
DOM::HTMLTextAreaElement::select
void select()
Select the contents of the TEXTAREA .
Definition: html_form.cpp:1111
DOM::HTMLTextAreaElement::type
DOMString type() const
The type of this form control.
Definition: html_form.cpp:1082
DOM::HTMLInputElement::useMap
DOMString useMap() const
Use client-side image map.
Definition: html_form.cpp:540
DOM::HTMLLegendElement::setAlign
void setAlign(const DOMString &)
see align
Definition: html_form.cpp:724
DOM::HTMLSelectElement::add
void add(const HTMLElement &element, const HTMLElement &before)
Add a new element to the collection of OPTION elements for this SELECT .
Definition: html_form.cpp:920
DOM::HTMLInputElement::setDefaultChecked
void setDefaultChecked(bool)
see defaultChecked
Definition: html_form.cpp:347
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal