• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdehtml
 

tdehtml

  • tdehtml
  • dom
html_form.h
1 /*
2  * This file is part of the DOM implementation for KDE.
3  *
4  * (C) 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 <tdemacros.h>
37 
38 namespace DOM {
39 
40 class HTMLButtonElementImpl;
41 class HTMLFormElement;
42 class DOMString;
43 
50 class TDEHTML_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 TDEHTML_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 TDEHTML_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 TDEHTML_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  DOMString size() const TDE_DEPRECATED;
538 
542  void setSize( const DOMString & ) TDE_DEPRECATED;
543 
551  long getSize() const;
552 
556  void setSize( long );
557 
566  DOMString src() const;
567 
571  void setSrc( const DOMString & );
572 
580  long tabIndex() const;
581 
585  void setTabIndex( long );
586 
593  DOMString type() const;
594 
598  void setType(const DOMString&);
599 
606  DOMString useMap() const;
607 
611  void setUseMap( const DOMString & );
612 
620  DOMString value() const;
621 
625  void setValue( const DOMString & );
626 
631  void blur ( );
632 
637  void focus ( );
638 
645  void select ( );
646 
652  void click ( );
653 
654 
663  long selectionStart();
664 
671  void setSelectionStart(long offset);
672 
681  long selectionEnd();
682 
689  void setSelectionEnd(long offset);
690 
697  void setSelectionRange(long start, long end);
698 
699 };
700 
701 // --------------------------------------------------------------------------
702 
703 class HTMLLabelElementImpl;
710 class TDEHTML_EXPORT HTMLLabelElement : public HTMLElement
711 {
712 public:
713  HTMLLabelElement();
714  HTMLLabelElement(const HTMLLabelElement &other);
715  HTMLLabelElement(const Node &other) : HTMLElement()
716  {(*this)=other;}
717 protected:
718  HTMLLabelElement(HTMLLabelElementImpl *impl);
719 public:
720 
721  HTMLLabelElement & operator = (const HTMLLabelElement &other);
722  HTMLLabelElement & operator = (const Node &other);
723 
724  ~HTMLLabelElement();
725 
733  DOMString accessKey() const;
734 
738  void setAccessKey( const DOMString & );
739 
747  DOMString htmlFor() const;
748 
752  void setHtmlFor( const DOMString & );
753 };
754 
755 // --------------------------------------------------------------------------
756 
757 class HTMLLegendElementImpl;
765 class TDEHTML_EXPORT HTMLLegendElement : public HTMLElement
766 {
767 public:
768  HTMLLegendElement();
769  HTMLLegendElement(const HTMLLegendElement &other);
770  HTMLLegendElement(const Node &other) : HTMLElement()
771  {(*this)=other;}
772 protected:
773  HTMLLegendElement(HTMLLegendElementImpl *impl);
774 public:
775 
776  HTMLLegendElement & operator = (const HTMLLegendElement &other);
777  HTMLLegendElement & operator = (const Node &other);
778 
779  ~HTMLLegendElement();
780 
784  HTMLFormElement form() const;
785 
793  DOMString accessKey() const;
794 
798  void setAccessKey( const DOMString & );
799 
807  DOMString align() const;
808 
812  void setAlign( const DOMString & );
813 };
814 
815 // --------------------------------------------------------------------------
816 
817 class HTMLOptGroupElementImpl;
824 class TDEHTML_EXPORT HTMLOptGroupElement : public HTMLElement
825 {
826 public:
827  HTMLOptGroupElement();
828  HTMLOptGroupElement(const HTMLOptGroupElement &other);
829  HTMLOptGroupElement(const Node &other) : HTMLElement()
830  {(*this)=other;}
831 protected:
832  HTMLOptGroupElement(HTMLOptGroupElementImpl *impl);
833 public:
834 
835  HTMLOptGroupElement & operator = (const HTMLOptGroupElement &other);
836  HTMLOptGroupElement & operator = (const Node &other);
837 
838  ~HTMLOptGroupElement();
839 
846  bool disabled() const;
847 
851  void setDisabled( bool );
852 
859  DOMString label() const;
860 
864  void setLabel( const DOMString & );
865 };
866 
867 // --------------------------------------------------------------------------
868 
869 class HTMLSelectElementImpl;
878 class TDEHTML_EXPORT HTMLSelectElement : public HTMLElement
879 {
880 public:
881  HTMLSelectElement();
882  HTMLSelectElement(const HTMLSelectElement &other);
883  HTMLSelectElement(const Node &other) : HTMLElement()
884  {(*this)=other;}
885 protected:
886  HTMLSelectElement(HTMLSelectElementImpl *impl);
887 public:
888 
889  HTMLSelectElement & operator = (const HTMLSelectElement &other);
890  HTMLSelectElement & operator = (const Node &other);
891 
892  ~HTMLSelectElement();
893 
898  DOMString type() const;
899 
906  long selectedIndex() const;
907 
911  void setSelectedIndex( long );
912 
917  DOMString value() const;
918 
922  void setValue( const DOMString & );
923 
928  long length() const;
929 
933  HTMLFormElement form() const;
934 
940  HTMLCollection options() const;
941 
948  bool disabled() const;
949 
953  void setDisabled( bool );
954 
962  bool multiple() const;
963 
967  void setMultiple( bool );
968 
976  DOMString name() const;
977 
981  void setName( const DOMString & );
982 
989  long size() const;
990 
994  void setSize( long );
995 
1003  long tabIndex() const;
1004 
1008  void setTabIndex( long );
1009 
1020  void add ( const HTMLElement &element, const HTMLElement &before );
1021 
1030  void remove ( long index );
1031 
1036  void blur ( );
1037 
1042  void focus ( );
1043 };
1044 
1045 // --------------------------------------------------------------------------
1046 
1047 class HTMLTextAreaElementImpl;
1054 class TDEHTML_EXPORT HTMLTextAreaElement : public HTMLElement
1055 {
1056 public:
1057  HTMLTextAreaElement();
1058  HTMLTextAreaElement(const HTMLTextAreaElement &other);
1059  HTMLTextAreaElement(const Node &other) : HTMLElement()
1060  {(*this)=other;}
1061 protected:
1062  HTMLTextAreaElement(HTMLTextAreaElementImpl *impl);
1063 public:
1064 
1065  HTMLTextAreaElement & operator = (const HTMLTextAreaElement &other);
1066  HTMLTextAreaElement & operator = (const Node &other);
1067 
1068  ~HTMLTextAreaElement();
1069 
1075  DOMString defaultValue() const;
1076 
1080  void setDefaultValue( const DOMString & );
1081 
1085  HTMLFormElement form() const;
1086 
1094  DOMString accessKey() const;
1095 
1099  void setAccessKey( const DOMString & );
1100 
1107  long cols() const;
1108 
1112  void setCols( long );
1113 
1120  bool disabled() const;
1121 
1125  void setDisabled( bool );
1126 
1134  DOMString name() const;
1135 
1139  void setName( const DOMString & );
1140 
1147  bool readOnly() const;
1148 
1152  void setReadOnly( bool );
1153 
1160  long rows() const;
1161 
1165  void setRows( long );
1166 
1174  long tabIndex() const;
1175 
1179  void setTabIndex( long );
1180 
1185  DOMString type() const;
1186 
1193  DOMString value() const;
1194 
1198  void setValue( const DOMString & );
1199 
1203  void blur ( );
1204 
1208  void focus ( );
1209 
1213  void select ( );
1214 
1221  long selectionStart();
1222 
1228  void setSelectionStart(long offset);
1229 
1236  long selectionEnd();
1237 
1243  void setSelectionEnd(long offset);
1244 
1250  void setSelectionRange(long start, long end);
1251 
1257  long textLength();
1258 };
1259 
1260 // --------------------------------------------------------------------------
1261 
1262 class HTMLOptionElementImpl;
1269 class TDEHTML_EXPORT HTMLOptionElement : public HTMLElement
1270 {
1271 public:
1272  HTMLOptionElement();
1273  HTMLOptionElement(const HTMLOptionElement &other);
1274  HTMLOptionElement(const Node &other) : HTMLElement()
1275  {(*this)=other;}
1276 protected:
1277  HTMLOptionElement(HTMLOptionElementImpl *impl);
1278 public:
1279 
1280  HTMLOptionElement & operator = (const HTMLOptionElement &other);
1281  HTMLOptionElement & operator = (const Node &other);
1282 
1283  ~HTMLOptionElement();
1284 
1288  HTMLFormElement form() const;
1289 
1295  bool defaultSelected() const;
1296 
1300  void setDefaultSelected( bool );
1301 
1306  DOMString text() const;
1307 
1313  long index() const;
1314 
1321  void setIndex( long );
1322 
1329  bool disabled() const;
1330 
1334  void setDisabled( bool );
1335 
1342  DOMString label() const;
1343 
1347  void setLabel( const DOMString & );
1348 
1355  bool selected() const;
1356 
1360  void setSelected( bool );
1361 
1368  DOMString value() const;
1369 
1373  void setValue( const DOMString & );
1374 };
1375 
1376 
1377 // --------------------------------------------------------------------------
1378 
1379 class HTMLIsIndexElementImpl;
1380 class HTMLFormElement;
1381 
1389 class TDEHTML_EXPORT HTMLIsIndexElement : public HTMLElement
1390 {
1391 public:
1392  HTMLIsIndexElement();
1393  HTMLIsIndexElement(const HTMLIsIndexElement &other);
1394  HTMLIsIndexElement(const Node &other) : HTMLElement()
1395  {(*this)=other;}
1396 protected:
1397  HTMLIsIndexElement(HTMLIsIndexElementImpl *impl);
1398 public:
1399 
1400  HTMLIsIndexElement & operator = (const HTMLIsIndexElement &other);
1401  HTMLIsIndexElement & operator = (const Node &other);
1402 
1403  ~HTMLIsIndexElement();
1404 
1408  HTMLFormElement form() const;
1409 
1417  DOMString prompt() const;
1418 
1422  void setPrompt( const DOMString & );
1423 };
1424 
1425 } //namespace
1426 
1427 #endif
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
DOM::HTMLButtonElement
Push button.
Definition: html_form.h:51
DOM::HTMLCollection
An HTMLCollection is a list of nodes.
Definition: html_misc.h:127
DOM::HTMLElement
All HTML element interfaces derive from this class.
Definition: html_element.h:70
DOM::HTMLFieldSetElement
Organizes form controls into logical groups.
Definition: html_form.h:173
DOM::HTMLFormElement
The FORM element encompasses behavior similar to a collection and an element.
Definition: html_form.h:207
DOM::HTMLInputElement
Form control.
Definition: html_form.h:350
DOM::HTMLIsIndexElement
This element is used for single-line text input.
Definition: html_form.h:1390
DOM::HTMLLabelElement
Form field label text.
Definition: html_form.h:711
DOM::HTMLLegendElement
Provides a caption for a FIELDSET grouping.
Definition: html_form.h:766
DOM::HTMLObjectElement
Generic embedded object.
Definition: html_object.h:259
DOM::HTMLOptGroupElement
Group options together in logical subdivisions.
Definition: html_form.h:825
DOM::HTMLOptionElement
A selectable choice.
Definition: html_form.h:1270
DOM::HTMLSelectElement
The select element allows the selection of an option.
Definition: html_form.h:879
DOM::HTMLTextAreaElement
Multi-line text field.
Definition: html_form.h:1055
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:275
DOM
The Document Object Model (DOM) is divided into two parts, the COREDOM core DOM, specifying some core...
Definition: design.h:57

tdehtml

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

tdehtml

Skip menu "tdehtml"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdehtml by doxygen 1.9.1
This website is maintained by Timothy Pearson.