khtml Library API Documentation

html_form.h

00001 /* 00002 * This file is part of the DOM implementation for KDE. 00003 * 00004 * (C) 1999 Lars Knoll (knoll@kde.org) 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Library General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Library General Public License 00017 * along with this library; see the file COPYING.LIB. If not, write to 00018 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 * Boston, MA 02111-1307, USA. 00020 * 00021 * This file includes excerpts from the Document Object Model (DOM) 00022 * Level 1 Specification (Recommendation) 00023 * http://www.w3.org/TR/REC-DOM-Level-1/ 00024 * Copyright © World Wide Web Consortium , (Massachusetts Institute of 00025 * Technology , Institut National de Recherche en Informatique et en 00026 * Automatique , Keio University ). All Rights Reserved. 00027 * 00028 * $Id: html_form.h,v 1.22 2003/10/13 06:20:16 faure Exp $ 00029 */ 00030 #ifndef HTML_FORM_H 00031 #define HTML_FORM_H 00032 00033 // -------------------------------------------------------------------------- 00034 #include <dom/html_element.h> 00035 #include <dom/html_misc.h> 00036 00037 #include <kdemacros.h> 00038 00039 namespace DOM { 00040 00041 class HTMLButtonElementImpl; 00042 class HTMLFormElement; 00043 class DOMString; 00044 00051 class HTMLButtonElement : public HTMLElement 00052 { 00053 public: 00054 HTMLButtonElement(); 00055 HTMLButtonElement(const HTMLButtonElement &other); 00056 HTMLButtonElement(const Node &other) : HTMLElement() 00057 {(*this)=other;} 00058 protected: 00059 HTMLButtonElement(HTMLButtonElementImpl *impl); 00060 public: 00061 00062 HTMLButtonElement & operator = (const HTMLButtonElement &other); 00063 HTMLButtonElement & operator = (const Node &other); 00064 00065 ~HTMLButtonElement(); 00066 00073 HTMLFormElement form() const; 00074 00082 DOMString accessKey() const; 00083 00087 void setAccessKey( const DOMString & ); 00088 00095 bool disabled() const; 00096 00100 void setDisabled( bool ); 00101 00109 DOMString name() const; 00110 00114 void setName( const DOMString & ); 00115 00123 long tabIndex() const; 00124 00128 void setTabIndex( long ); 00129 00136 DOMString type() const; 00137 00144 DOMString value() const; 00145 00149 void setValue( const DOMString & ); 00150 }; 00151 00152 // -------------------------------------------------------------------------- 00153 00154 class HTMLFieldSetElementImpl; 00161 class HTMLFieldSetElement : public HTMLElement 00162 { 00163 public: 00164 HTMLFieldSetElement(); 00165 HTMLFieldSetElement(const HTMLFieldSetElement &other); 00166 HTMLFieldSetElement(const Node &other) : HTMLElement() 00167 {(*this)=other;} 00168 protected: 00169 HTMLFieldSetElement(HTMLFieldSetElementImpl *impl); 00170 public: 00171 00172 HTMLFieldSetElement & operator = (const HTMLFieldSetElement &other); 00173 HTMLFieldSetElement & operator = (const Node &other); 00174 00175 ~HTMLFieldSetElement(); 00176 00180 HTMLFormElement form() const; 00181 }; 00182 00183 // -------------------------------------------------------------------------- 00184 00185 class HTMLFormElementImpl; 00195 class HTMLFormElement : public HTMLElement 00196 { 00197 friend class HTMLButtonElement; 00198 friend class HTMLFieldSetElement; 00199 friend class HTMLInputElement; 00200 friend class HTMLLabelElement; 00201 friend class HTMLLegendElement; 00202 friend class HTMLSelectElement; 00203 friend class HTMLTextAreaElement; 00204 friend class HTMLOptionElement; 00205 friend class HTMLIsIndexElement; 00206 friend class HTMLObjectElement; 00207 00208 public: 00209 HTMLFormElement(); 00210 HTMLFormElement(const HTMLFormElement &other); 00211 HTMLFormElement(const Node &other) : HTMLElement() 00212 {(*this)=other;} 00213 protected: 00214 HTMLFormElement(HTMLFormElementImpl *impl); 00215 public: 00216 00217 HTMLFormElement & operator = (const HTMLFormElement &other); 00218 HTMLFormElement & operator = (const Node &other); 00219 00220 ~HTMLFormElement(); 00221 00226 HTMLCollection elements() const; 00227 00232 long length() const; 00233 00238 DOMString name() const; 00239 00243 void setName( const DOMString & ); 00244 00251 DOMString acceptCharset() const; 00252 00256 void setAcceptCharset( const DOMString & ); 00257 00264 DOMString action() const; 00265 00269 void setAction( const DOMString & ); 00270 00278 DOMString enctype() const; 00279 00283 void setEnctype( const DOMString & ); 00284 00291 DOMString method() const; 00292 00296 void setMethod( const DOMString & ); 00297 00304 DOMString target() const; 00305 00309 void setTarget( const DOMString & ); 00310 00316 void submit ( ); 00317 00323 void reset ( ); 00324 }; 00325 00326 // -------------------------------------------------------------------------- 00327 00328 class HTMLInputElementImpl; 00338 class HTMLInputElement : public HTMLElement 00339 { 00340 public: 00341 HTMLInputElement(); 00342 HTMLInputElement(const HTMLInputElement &other); 00343 HTMLInputElement(const Node &other) : HTMLElement() 00344 {(*this)=other;} 00345 protected: 00346 HTMLInputElement(HTMLInputElementImpl *impl); 00347 public: 00348 00349 HTMLInputElement & operator = (const HTMLInputElement &other); 00350 HTMLInputElement & operator = (const Node &other); 00351 00352 ~HTMLInputElement(); 00353 00359 DOMString defaultValue() const; 00360 00364 void setDefaultValue( const DOMString & ); 00365 00372 bool defaultChecked() const; 00373 00377 void setDefaultChecked( bool ); 00378 00382 HTMLFormElement form() const; 00383 00391 DOMString accept() const; 00392 00396 void setAccept( const DOMString & ); 00397 00405 DOMString accessKey() const; 00406 00410 void setAccessKey( const DOMString & ); 00411 00420 DOMString align() const; 00421 00425 void setAlign( const DOMString & ); 00426 00434 DOMString alt() const; 00435 00439 void setAlt( const DOMString & ); 00440 00450 bool checked() const; 00451 00455 void setChecked( bool ); 00456 00463 bool disabled() const; 00464 00468 void setDisabled( bool ); 00469 00477 long maxLength() const; 00478 00482 void setMaxLength( long ); 00483 00491 DOMString name() const; 00492 00496 void setName( const DOMString & ); 00497 00505 bool readOnly() const; 00506 00507 // ### remove in 4.0 00511 void setReadOnly( bool ); 00512 00516 DOMString size() const KDE_DEPRECATED; 00517 00521 void setSize( const DOMString & ) KDE_DEPRECATED; 00522 00530 long getSize() const; 00531 00535 void setSize( long ); 00536 00545 DOMString src() const; 00546 00550 void setSrc( const DOMString & ); 00551 00559 long tabIndex() const; 00560 00564 void setTabIndex( long ); 00565 00572 DOMString type() const; 00573 00577 void setType(const DOMString&); 00578 00585 DOMString useMap() const; 00586 00590 void setUseMap( const DOMString & ); 00591 00599 DOMString value() const; 00600 00604 void setValue( const DOMString & ); 00605 00610 void blur ( ); 00611 00616 void focus ( ); 00617 00624 void select ( ); 00625 00631 void click ( ); 00632 }; 00633 00634 // -------------------------------------------------------------------------- 00635 00636 class HTMLLabelElementImpl; 00643 class HTMLLabelElement : public HTMLElement 00644 { 00645 public: 00646 HTMLLabelElement(); 00647 HTMLLabelElement(const HTMLLabelElement &other); 00648 HTMLLabelElement(const Node &other) : HTMLElement() 00649 {(*this)=other;} 00650 protected: 00651 HTMLLabelElement(HTMLLabelElementImpl *impl); 00652 public: 00653 00654 HTMLLabelElement & operator = (const HTMLLabelElement &other); 00655 HTMLLabelElement & operator = (const Node &other); 00656 00657 ~HTMLLabelElement(); 00658 00666 DOMString accessKey() const; 00667 00671 void setAccessKey( const DOMString & ); 00672 00680 DOMString htmlFor() const; 00681 00685 void setHtmlFor( const DOMString & ); 00686 }; 00687 00688 // -------------------------------------------------------------------------- 00689 00690 class HTMLLegendElementImpl; 00698 class HTMLLegendElement : public HTMLElement 00699 { 00700 public: 00701 HTMLLegendElement(); 00702 HTMLLegendElement(const HTMLLegendElement &other); 00703 HTMLLegendElement(const Node &other) : HTMLElement() 00704 {(*this)=other;} 00705 protected: 00706 HTMLLegendElement(HTMLLegendElementImpl *impl); 00707 public: 00708 00709 HTMLLegendElement & operator = (const HTMLLegendElement &other); 00710 HTMLLegendElement & operator = (const Node &other); 00711 00712 ~HTMLLegendElement(); 00713 00717 HTMLFormElement form() const; 00718 00726 DOMString accessKey() const; 00727 00731 void setAccessKey( const DOMString & ); 00732 00740 DOMString align() const; 00741 00745 void setAlign( const DOMString & ); 00746 }; 00747 00748 // -------------------------------------------------------------------------- 00749 00750 class HTMLOptGroupElementImpl; 00757 class HTMLOptGroupElement : public HTMLElement 00758 { 00759 public: 00760 HTMLOptGroupElement(); 00761 HTMLOptGroupElement(const HTMLOptGroupElement &other); 00762 HTMLOptGroupElement(const Node &other) : HTMLElement() 00763 {(*this)=other;} 00764 protected: 00765 HTMLOptGroupElement(HTMLOptGroupElementImpl *impl); 00766 public: 00767 00768 HTMLOptGroupElement & operator = (const HTMLOptGroupElement &other); 00769 HTMLOptGroupElement & operator = (const Node &other); 00770 00771 ~HTMLOptGroupElement(); 00772 00779 bool disabled() const; 00780 00784 void setDisabled( bool ); 00785 00792 DOMString label() const; 00793 00797 void setLabel( const DOMString & ); 00798 }; 00799 00800 // -------------------------------------------------------------------------- 00801 00802 class HTMLSelectElementImpl; 00811 class HTMLSelectElement : public HTMLElement 00812 { 00813 public: 00814 HTMLSelectElement(); 00815 HTMLSelectElement(const HTMLSelectElement &other); 00816 HTMLSelectElement(const Node &other) : HTMLElement() 00817 {(*this)=other;} 00818 protected: 00819 HTMLSelectElement(HTMLSelectElementImpl *impl); 00820 public: 00821 00822 HTMLSelectElement & operator = (const HTMLSelectElement &other); 00823 HTMLSelectElement & operator = (const Node &other); 00824 00825 ~HTMLSelectElement(); 00826 00831 DOMString type() const; 00832 00839 long selectedIndex() const; 00840 00844 void setSelectedIndex( long ); 00845 00850 DOMString value() const; 00851 00855 void setValue( const DOMString & ); 00856 00861 long length() const; 00862 00866 HTMLFormElement form() const; 00867 00873 HTMLCollection options() const; 00874 00881 bool disabled() const; 00882 00886 void setDisabled( bool ); 00887 00895 bool multiple() const; 00896 00900 void setMultiple( bool ); 00901 00909 DOMString name() const; 00910 00914 void setName( const DOMString & ); 00915 00922 long size() const; 00923 00927 void setSize( long ); 00928 00936 long tabIndex() const; 00937 00941 void setTabIndex( long ); 00942 00953 void add ( const HTMLElement &element, const HTMLElement &before ); 00954 00963 void remove ( long index ); 00964 00969 void blur ( ); 00970 00975 void focus ( ); 00976 }; 00977 00978 // -------------------------------------------------------------------------- 00979 00980 class HTMLTextAreaElementImpl; 00987 class HTMLTextAreaElement : public HTMLElement 00988 { 00989 public: 00990 HTMLTextAreaElement(); 00991 HTMLTextAreaElement(const HTMLTextAreaElement &other); 00992 HTMLTextAreaElement(const Node &other) : HTMLElement() 00993 {(*this)=other;} 00994 protected: 00995 HTMLTextAreaElement(HTMLTextAreaElementImpl *impl); 00996 public: 00997 00998 HTMLTextAreaElement & operator = (const HTMLTextAreaElement &other); 00999 HTMLTextAreaElement & operator = (const Node &other); 01000 01001 ~HTMLTextAreaElement(); 01002 01008 DOMString defaultValue() const; 01009 01013 void setDefaultValue( const DOMString & ); 01014 01018 HTMLFormElement form() const; 01019 01027 DOMString accessKey() const; 01028 01032 void setAccessKey( const DOMString & ); 01033 01040 long cols() const; 01041 01045 void setCols( long ); 01046 01053 bool disabled() const; 01054 01058 void setDisabled( bool ); 01059 01067 DOMString name() const; 01068 01072 void setName( const DOMString & ); 01073 01080 bool readOnly() const; 01081 01085 void setReadOnly( bool ); 01086 01093 long rows() const; 01094 01098 void setRows( long ); 01099 01107 long tabIndex() const; 01108 01112 void setTabIndex( long ); 01113 01118 DOMString type() const; 01119 01126 DOMString value() const; 01127 01131 void setValue( const DOMString & ); 01132 01136 void blur ( ); 01137 01141 void focus ( ); 01142 01146 void select ( ); 01147 }; 01148 01149 // -------------------------------------------------------------------------- 01150 01151 class HTMLOptionElementImpl; 01158 class HTMLOptionElement : public HTMLElement 01159 { 01160 public: 01161 HTMLOptionElement(); 01162 HTMLOptionElement(const HTMLOptionElement &other); 01163 HTMLOptionElement(const Node &other) : HTMLElement() 01164 {(*this)=other;} 01165 protected: 01166 HTMLOptionElement(HTMLOptionElementImpl *impl); 01167 public: 01168 01169 HTMLOptionElement & operator = (const HTMLOptionElement &other); 01170 HTMLOptionElement & operator = (const Node &other); 01171 01172 ~HTMLOptionElement(); 01173 01177 HTMLFormElement form() const; 01178 01184 bool defaultSelected() const; 01185 01189 void setDefaultSelected( bool ); 01190 01195 DOMString text() const; 01196 01202 long index() const; 01203 01210 void setIndex( long ); 01211 01218 bool disabled() const; 01219 01223 void setDisabled( bool ); 01224 01231 DOMString label() const; 01232 01236 void setLabel( const DOMString & ); 01237 01244 bool selected() const; 01245 01249 void setSelected( bool ); 01250 01257 DOMString value() const; 01258 01262 void setValue( const DOMString & ); 01263 }; 01264 01265 01266 // -------------------------------------------------------------------------- 01267 01268 class HTMLIsIndexElementImpl; 01269 class HTMLFormElement; 01270 01278 class HTMLIsIndexElement : public HTMLElement 01279 { 01280 public: 01281 HTMLIsIndexElement(); 01282 HTMLIsIndexElement(const HTMLIsIndexElement &other); 01283 HTMLIsIndexElement(const Node &other) : HTMLElement() 01284 {(*this)=other;} 01285 protected: 01286 HTMLIsIndexElement(HTMLIsIndexElementImpl *impl); 01287 public: 01288 01289 HTMLIsIndexElement & operator = (const HTMLIsIndexElement &other); 01290 HTMLIsIndexElement & operator = (const Node &other); 01291 01292 ~HTMLIsIndexElement(); 01293 01297 HTMLFormElement form() const; 01298 01306 DOMString prompt() const; 01307 01311 void setPrompt( const DOMString & ); 01312 }; 01313 01314 } //namespace 01315 01316 #endif
KDE Logo
This file is part of the documentation for khtml Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Oct 10 18:56:12 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003