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

KHTML

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

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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