KHtml

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

KDE's Doxygen guidelines are available online.