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

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • khtml
  • dom
html_form.h
Go to the documentation of this file.
1 /*
2  * This file is part of the DOM implementation for KDE.
3  *
4  * Copyright 1999 Lars Knoll (knoll@kde.org)
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  * This file includes excerpts from the Document Object Model (DOM)
22  * Level 1 Specification (Recommendation)
23  * http://www.w3.org/TR/REC-DOM-Level-1/
24  * Copyright © World Wide Web Consortium , (Massachusetts Institute of
25  * Technology , Institut National de Recherche en Informatique et en
26  * Automatique , Keio University ). All Rights Reserved.
27  *
28  */
29 #ifndef HTML_FORM_H
30 #define HTML_FORM_H
31 
32 // --------------------------------------------------------------------------
33 #include <dom/html_element.h>
34 #include <dom/html_misc.h>
35 
36 #include <kdemacros.h>
37 
38 namespace DOM {
39 
40 class HTMLButtonElementImpl;
41 class HTMLFormElement;
42 class DOMString;
43 
50 class KHTML_EXPORT HTMLButtonElement : public HTMLElement
51 {
52 public:
53  HTMLButtonElement();
54  HTMLButtonElement(const HTMLButtonElement &other);
55  HTMLButtonElement(const Node &other) : HTMLElement()
56  {(*this)=other;}
57 protected:
58  HTMLButtonElement(HTMLButtonElementImpl *impl);
59 public:
60 
61  HTMLButtonElement & operator = (const HTMLButtonElement &other);
62  HTMLButtonElement & operator = (const Node &other);
63 
64  ~HTMLButtonElement();
65 
72  HTMLFormElement form() const;
73 
81  DOMString accessKey() const;
82 
86  void setAccessKey( const DOMString & );
87 
94  bool disabled() const;
95 
99  void setDisabled( bool );
100 
108  DOMString name() const;
109 
113  void setName( const DOMString & );
114 
122  long tabIndex() const;
123 
127  void setTabIndex( long );
128 
135  DOMString type() const;
136 
143  DOMString value() const;
144 
148  void setValue( const DOMString & );
149 
154  void blur ( );
155 
160  void focus ( );
161 };
162 
163 // --------------------------------------------------------------------------
164 
165 class HTMLFieldSetElementImpl;
172 class KHTML_EXPORT HTMLFieldSetElement : public HTMLElement
173 {
174 public:
175  HTMLFieldSetElement();
176  HTMLFieldSetElement(const HTMLFieldSetElement &other);
177  HTMLFieldSetElement(const Node &other) : HTMLElement()
178  {(*this)=other;}
179 protected:
180  HTMLFieldSetElement(HTMLFieldSetElementImpl *impl);
181 public:
182 
183  HTMLFieldSetElement & operator = (const HTMLFieldSetElement &other);
184  HTMLFieldSetElement & operator = (const Node &other);
185 
186  ~HTMLFieldSetElement();
187 
191  HTMLFormElement form() const;
192 };
193 
194 // --------------------------------------------------------------------------
195 
196 class HTMLFormElementImpl;
206 class KHTML_EXPORT HTMLFormElement : public HTMLElement
207 {
208  friend class HTMLButtonElement;
209  friend class HTMLFieldSetElement;
210  friend class HTMLInputElement;
211  friend class HTMLLabelElement;
212  friend class HTMLLegendElement;
213  friend class HTMLSelectElement;
214  friend class HTMLTextAreaElement;
215  friend class HTMLOptionElement;
216  friend class HTMLIsIndexElement;
217  friend class HTMLObjectElement;
218 
219 public:
220  HTMLFormElement();
221  HTMLFormElement(const HTMLFormElement &other);
222  HTMLFormElement(const Node &other) : HTMLElement()
223  {(*this)=other;}
224 protected:
225  HTMLFormElement(HTMLFormElementImpl *impl);
226 public:
227 
228  HTMLFormElement & operator = (const HTMLFormElement &other);
229  HTMLFormElement & operator = (const Node &other);
230 
231  ~HTMLFormElement();
232 
237  HTMLCollection elements() const;
238 
243  long length() const;
244 
249  DOMString name() const;
250 
254  void setName( const DOMString & );
255 
262  DOMString acceptCharset() const;
263 
267  void setAcceptCharset( const DOMString & );
268 
275  DOMString action() const;
276 
280  void setAction( const DOMString & );
281 
289  DOMString enctype() const;
290 
294  void setEnctype( const DOMString & );
295 
302  DOMString method() const;
303 
307  void setMethod( const DOMString & );
308 
315  DOMString target() const;
316 
320  void setTarget( const DOMString & );
321 
327  void submit ( );
328 
334  void reset ( );
335 };
336 
337 // --------------------------------------------------------------------------
338 
339 class HTMLInputElementImpl;
349 class KHTML_EXPORT HTMLInputElement : public HTMLElement
350 {
351 public:
352  HTMLInputElement();
353  HTMLInputElement(const HTMLInputElement &other);
354  HTMLInputElement(const Node &other) : HTMLElement()
355  {(*this)=other;}
356 protected:
357  HTMLInputElement(HTMLInputElementImpl *impl);
358 public:
359 
360  HTMLInputElement & operator = (const HTMLInputElement &other);
361  HTMLInputElement & operator = (const Node &other);
362 
363  ~HTMLInputElement();
364 
370  DOMString defaultValue() const;
371 
375  void setDefaultValue( const DOMString & );
376 
383  bool defaultChecked() const;
384 
388  void setDefaultChecked( bool );
389 
393  HTMLFormElement form() const;
394 
402  DOMString accept() const;
403 
407  void setAccept( const DOMString & );
408 
416  DOMString accessKey() const;
417 
421  void setAccessKey( const DOMString & );
422 
431  DOMString align() const;
432 
436  void setAlign( const DOMString & );
437 
445  DOMString alt() const;
446 
450  void setAlt( const DOMString & );
451 
461  bool checked() const;
462 
466  void setChecked( bool );
467 
471  bool indeterminate() const;
472 
476  void setIndeterminate( bool );
477 
484  bool disabled() const;
485 
489  void setDisabled( bool );
490 
498  long maxLength() const;
499 
503  void setMaxLength( long );
504 
512  DOMString name() const;
513 
517  void setName( const DOMString & );
518 
526  bool readOnly() const;
527 
528  // ### remove in 4.0
532  void setReadOnly( bool );
533 
537 #ifndef KDE_NO_DEPRECATED
538  KDE_DEPRECATED DOMString size() const;
539 #endif
540 
544 #ifndef KDE_NO_DEPRECATED
545  KDE_DEPRECATED void setSize( const DOMString & );
546 #endif
547 
555  long getSize() const;
556 
560  void setSize( long );
561 
570  DOMString src() const;
571 
575  void setSrc( const DOMString & );
576 
584  long tabIndex() const;
585 
589  void setTabIndex( long );
590 
597  DOMString type() const;
598 
602  void setType(const DOMString&);
603 
610  DOMString useMap() const;
611 
615  void setUseMap( const DOMString & );
616 
624  DOMString value() const;
625 
629  void setValue( const DOMString & );
630 
635  void blur ( );
636 
641  void focus ( );
642 
649  void select ( );
650 
656  void click ( );
657 
658 
666  long selectionStart();
667 
673  void setSelectionStart(long offset);
674 
682  long selectionEnd();
683 
689  void setSelectionEnd(long offset);
690 
696  void setSelectionRange(long start, long end);
697 
698 };
699 
700 // --------------------------------------------------------------------------
701 
702 class HTMLLabelElementImpl;
709 class KHTML_EXPORT HTMLLabelElement : public HTMLElement
710 {
711 public:
712  HTMLLabelElement();
713  HTMLLabelElement(const HTMLLabelElement &other);
714  HTMLLabelElement(const Node &other) : HTMLElement()
715  {(*this)=other;}
716 protected:
717  HTMLLabelElement(HTMLLabelElementImpl *impl);
718 public:
719 
720  HTMLLabelElement & operator = (const HTMLLabelElement &other);
721  HTMLLabelElement & operator = (const Node &other);
722 
723  ~HTMLLabelElement();
724 
732  DOMString accessKey() const;
733 
737  void setAccessKey( const DOMString & );
738 
746  DOMString htmlFor() const;
747 
751  void setHtmlFor( const DOMString & );
752 };
753 
754 // --------------------------------------------------------------------------
755 
756 class HTMLLegendElementImpl;
764 class KHTML_EXPORT HTMLLegendElement : public HTMLElement
765 {
766 public:
767  HTMLLegendElement();
768  HTMLLegendElement(const HTMLLegendElement &other);
769  HTMLLegendElement(const Node &other) : HTMLElement()
770  {(*this)=other;}
771 protected:
772  HTMLLegendElement(HTMLLegendElementImpl *impl);
773 public:
774 
775  HTMLLegendElement & operator = (const HTMLLegendElement &other);
776  HTMLLegendElement & operator = (const Node &other);
777 
778  ~HTMLLegendElement();
779 
783  HTMLFormElement form() const;
784 
792  DOMString accessKey() const;
793 
797  void setAccessKey( const DOMString & );
798 
806  DOMString align() const;
807 
811  void setAlign( const DOMString & );
812 };
813 
814 // --------------------------------------------------------------------------
815 
816 class HTMLOptGroupElementImpl;
823 class KHTML_EXPORT HTMLOptGroupElement : public HTMLElement
824 {
825 public:
826  HTMLOptGroupElement();
827  HTMLOptGroupElement(const HTMLOptGroupElement &other);
828  HTMLOptGroupElement(const Node &other) : HTMLElement()
829  {(*this)=other;}
830 protected:
831  HTMLOptGroupElement(HTMLOptGroupElementImpl *impl);
832 public:
833 
834  HTMLOptGroupElement & operator = (const HTMLOptGroupElement &other);
835  HTMLOptGroupElement & operator = (const Node &other);
836 
837  ~HTMLOptGroupElement();
838 
845  bool disabled() const;
846 
850  void setDisabled( bool );
851 
858  DOMString label() const;
859 
863  void setLabel( const DOMString & );
864 };
865 
866 // --------------------------------------------------------------------------
867 
868 class HTMLSelectElementImpl;
877 class KHTML_EXPORT HTMLSelectElement : public HTMLElement
878 {
879 public:
880  HTMLSelectElement();
881  HTMLSelectElement(const HTMLSelectElement &other);
882  HTMLSelectElement(const Node &other) : HTMLElement()
883  {(*this)=other;}
884 protected:
885  HTMLSelectElement(HTMLSelectElementImpl *impl);
886 public:
887 
888  HTMLSelectElement & operator = (const HTMLSelectElement &other);
889  HTMLSelectElement & operator = (const Node &other);
890 
891  ~HTMLSelectElement();
892 
897  DOMString type() const;
898 
905  long selectedIndex() const;
906 
910  void setSelectedIndex( long );
911 
916  DOMString value() const;
917 
921  void setValue( const DOMString & );
922 
927  long length() const;
928 
932  HTMLFormElement form() const;
933 
939  HTMLCollection options() const;
940 
947  bool disabled() const;
948 
952  void setDisabled( bool );
953 
961  bool multiple() const;
962 
966  void setMultiple( bool );
967 
975  DOMString name() const;
976 
980  void setName( const DOMString & );
981 
988  long size() const;
989 
993  void setSize( long );
994 
1002  long tabIndex() const;
1003 
1007  void setTabIndex( long );
1008 
1019  void add ( const HTMLElement &element, const HTMLElement &before );
1020 
1029  void remove ( long index );
1030 
1035  void blur ( );
1036 
1041  void focus ( );
1042 };
1043 
1044 // --------------------------------------------------------------------------
1045 
1046 class HTMLTextAreaElementImpl;
1053 class KHTML_EXPORT HTMLTextAreaElement : public HTMLElement
1054 {
1055 public:
1056  HTMLTextAreaElement();
1057  HTMLTextAreaElement(const HTMLTextAreaElement &other);
1058  HTMLTextAreaElement(const Node &other) : HTMLElement()
1059  {(*this)=other;}
1060 protected:
1061  HTMLTextAreaElement(HTMLTextAreaElementImpl *impl);
1062 public:
1063 
1064  HTMLTextAreaElement & operator = (const HTMLTextAreaElement &other);
1065  HTMLTextAreaElement & operator = (const Node &other);
1066 
1067  ~HTMLTextAreaElement();
1068 
1074  DOMString defaultValue() const;
1075 
1079  void setDefaultValue( const DOMString & );
1080 
1084  HTMLFormElement form() const;
1085 
1093  DOMString accessKey() const;
1094 
1098  void setAccessKey( const DOMString & );
1099 
1106  long cols() const;
1107 
1111  void setCols( long );
1112 
1119  bool disabled() const;
1120 
1124  void setDisabled( bool );
1125 
1133  DOMString name() const;
1134 
1138  void setName( const DOMString & );
1139 
1146  bool readOnly() const;
1147 
1151  void setReadOnly( bool );
1152 
1159  long rows() const;
1160 
1164  void setRows( long );
1165 
1173  long tabIndex() const;
1174 
1178  void setTabIndex( long );
1179 
1184  DOMString type() const;
1185 
1192  DOMString value() const;
1193 
1197  void setValue( const DOMString & );
1198 
1202  void blur ( );
1203 
1207  void focus ( );
1208 
1212  void select ( );
1213 
1219  long selectionStart();
1220 
1225  void setSelectionStart(long offset);
1226 
1232  long selectionEnd();
1233 
1238  void setSelectionEnd(long offset);
1239 
1244  void setSelectionRange(long start, long end);
1245 
1250  long textLength();
1251 };
1252 
1253 // --------------------------------------------------------------------------
1254 
1255 class HTMLOptionElementImpl;
1262 class KHTML_EXPORT HTMLOptionElement : public HTMLElement
1263 {
1264 public:
1265  HTMLOptionElement();
1266  HTMLOptionElement(const HTMLOptionElement &other);
1267  HTMLOptionElement(const Node &other) : HTMLElement()
1268  {(*this)=other;}
1269 protected:
1270  HTMLOptionElement(HTMLOptionElementImpl *impl);
1271 public:
1272 
1273  HTMLOptionElement & operator = (const HTMLOptionElement &other);
1274  HTMLOptionElement & operator = (const Node &other);
1275 
1276  ~HTMLOptionElement();
1277 
1281  HTMLFormElement form() const;
1282 
1288  bool defaultSelected() const;
1289 
1293  void setDefaultSelected( bool );
1294 
1299  DOMString text() const;
1300 
1306  long index() const;
1307 
1314  void setIndex( long );
1315 
1322  bool disabled() const;
1323 
1327  void setDisabled( bool );
1328 
1335  DOMString label() const;
1336 
1340  void setLabel( const DOMString & );
1341 
1348  bool selected() const;
1349 
1353  void setSelected( bool );
1354 
1361  DOMString value() const;
1362 
1366  void setValue( const DOMString & );
1367 };
1368 
1369 
1370 // --------------------------------------------------------------------------
1371 
1372 class HTMLIsIndexElementImpl;
1373 class HTMLFormElement;
1374 
1382 class KHTML_EXPORT HTMLIsIndexElement : public HTMLElement
1383 {
1384 public:
1385  HTMLIsIndexElement();
1386  HTMLIsIndexElement(const HTMLIsIndexElement &other);
1387  HTMLIsIndexElement(const Node &other) : HTMLElement()
1388  {(*this)=other;}
1389 protected:
1390  HTMLIsIndexElement(HTMLIsIndexElementImpl *impl);
1391 public:
1392 
1393  HTMLIsIndexElement & operator = (const HTMLIsIndexElement &other);
1394  HTMLIsIndexElement & operator = (const Node &other);
1395 
1396  ~HTMLIsIndexElement();
1397 
1401  HTMLFormElement form() const;
1402 
1410  DOMString prompt() const;
1411 
1415  void setPrompt( const DOMString & );
1416 };
1417 
1418 } //namespace
1419 
1420 #endif
add
KGuiItem add()
DOM::HTMLOptGroupElement::HTMLOptGroupElement
HTMLOptGroupElement(const Node &other)
Definition: html_form.h:828
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:270
DOM::HTMLSelectElement
The select element allows the selection of an option.
Definition: html_form.h:877
DOM::HTMLSelectElement::HTMLSelectElement
HTMLSelectElement(const Node &other)
Definition: html_form.h:882
DOM::HTMLIsIndexElement
This element is used for single-line text input.
Definition: html_form.h:1382
label
QString label(StandardShortcut id)
DOM::HTMLOptionElement::HTMLOptionElement
HTMLOptionElement(const Node &other)
Definition: html_form.h:1267
DOM::HTMLFormElement
The FORM element encompasses behavior similar to a collection and an element.
Definition: html_form.h:206
name
const char * name(StandardAction id)
html_element.h
DOM::HTMLInputElement
Form control.
Definition: html_form.h:349
DOM::HTMLCollection
An HTMLCollection is a list of nodes.
Definition: html_misc.h:130
DOM::HTMLOptGroupElement
Group options together in logical subdivisions.
Definition: html_form.h:823
DOM::HTMLLegendElement
Provides a caption for a FIELDSET grouping.
Definition: html_form.h:764
DOM::HTMLLabelElement::HTMLLabelElement
HTMLLabelElement(const Node &other)
Definition: html_form.h:714
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::HTMLFormElement::HTMLFormElement
HTMLFormElement(const Node &other)
Definition: html_form.h:222
DOM::HTMLButtonElement::HTMLButtonElement
HTMLButtonElement(const Node &other)
Definition: html_form.h:55
DOM::HTMLObjectElement
Generic embedded object.
Definition: html_object.h:266
DOM::HTMLTextAreaElement
Multi-line text field.
Definition: html_form.h:1053
DOM::HTMLButtonElement
Push button.
Definition: html_form.h:50
DOM::HTMLIsIndexElement::HTMLIsIndexElement
HTMLIsIndexElement(const Node &other)
Definition: html_form.h:1387
DOM::HTMLFieldSetElement
Organizes form controls into logical groups.
Definition: html_form.h:172
DOM::HTMLInputElement::HTMLInputElement
HTMLInputElement(const Node &other)
Definition: html_form.h:354
html_misc.h
DOM::HTMLLegendElement::HTMLLegendElement
HTMLLegendElement(const Node &other)
Definition: html_form.h:769
reset
KGuiItem reset()
DOM::HTMLOptionElement
A selectable choice.
Definition: html_form.h:1262
DOM::HTMLTextAreaElement::HTMLTextAreaElement
HTMLTextAreaElement(const Node &other)
Definition: html_form.h:1058
DOM::HTMLLabelElement
Form field label text.
Definition: html_form.h:709
DOM::HTMLElement
All HTML element interfaces derive from this class.
Definition: html_element.h:69
DOM::HTMLFieldSetElement::HTMLFieldSetElement
HTMLFieldSetElement(const Node &other)
Definition: html_form.h:177
defaultValue
QString defaultValue(const QString &t)
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

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

kdelibs API Reference

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

Search



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

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