File indexing completed on 2024-04-28 15:23:02
0001 /* 0002 * This file is part of the DOM implementation for KDE. 0003 * 0004 * Copyright 1999 Lars Knoll (knoll@kde.org) 0005 * 0006 * This library is free software; you can redistribute it and/or 0007 * modify it under the terms of the GNU Library General Public 0008 * License as published by the Free Software Foundation; either 0009 * version 2 of the License, or (at your option) any later version. 0010 * 0011 * This library is distributed in the hope that it will be useful, 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 * Library General Public License for more details. 0015 * 0016 * You should have received a copy of the GNU Library General Public License 0017 * along with this library; see the file COPYING.LIB. If not, write to 0018 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0019 * Boston, MA 02110-1301, USA. 0020 * 0021 * This file includes excerpts from the Document Object Model (DOM) 0022 * Level 1 Specification (Recommendation) 0023 * https://www.w3.org/TR/REC-DOM-Level-1/ 0024 * Copyright © World Wide Web Consortium , (Massachusetts Institute of 0025 * Technology , Institut National de Recherche en Informatique et en 0026 * Automatique , Keio University ). All Rights Reserved. 0027 * 0028 */ 0029 #ifndef HTML_INLINE_H 0030 #define HTML_INLINE_H 0031 0032 #include <khtml_export.h> 0033 #include <dom/html_element.h> 0034 0035 namespace DOM 0036 { 0037 class HTMLGenericElementImpl; 0038 class HTMLAnchorElementImpl; 0039 class DOMString; 0040 0041 /** 0042 * The anchor element. See the <a 0043 * href="https://www.w3.org/TR/REC-html40/struct/links.html#edef-A"> A 0044 * element definition </a> in HTML 4.0. 0045 * 0046 */ 0047 class KHTML_EXPORT HTMLAnchorElement : public HTMLElement 0048 { 0049 public: 0050 HTMLAnchorElement(); 0051 HTMLAnchorElement(const HTMLAnchorElement &other); 0052 HTMLAnchorElement(const Node &other) : HTMLElement() 0053 { 0054 (*this) = other; 0055 } 0056 protected: 0057 HTMLAnchorElement(HTMLAnchorElementImpl *impl); 0058 public: 0059 0060 HTMLAnchorElement &operator = (const HTMLAnchorElement &other); 0061 HTMLAnchorElement &operator = (const Node &other); 0062 0063 ~HTMLAnchorElement(); 0064 0065 /** 0066 * A single character access key to give access to the form 0067 * control. See the <a 0068 * href="https://www.w3.org/TR/REC-html40/interact/forms.html#adef-accesskey"> 0069 * accesskey attribute definition </a> in HTML 4.0. 0070 * 0071 */ 0072 DOMString accessKey() const; 0073 0074 /** 0075 * see accessKey 0076 */ 0077 void setAccessKey(const DOMString &); 0078 0079 /** 0080 * The character encoding of the linked resource. See the <a 0081 * href="https://www.w3.org/TR/REC-html40/struct/links.html#adef-charset"> 0082 * charset attribute definition </a> in HTML 4.0. 0083 * 0084 */ 0085 DOMString charset() const; 0086 0087 /** 0088 * see charset 0089 */ 0090 void setCharset(const DOMString &); 0091 0092 /** 0093 * Comma-separated list of lengths, defining an active region 0094 * geometry. See also \c shape for the shape of the 0095 * region. See the <a 0096 * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-coords"> 0097 * coords attribute definition </a> in HTML 4.0. 0098 * 0099 */ 0100 DOMString coords() const; 0101 0102 /** 0103 * see coords 0104 */ 0105 void setCoords(const DOMString &); 0106 0107 /** 0108 * The URI of the linked resource. See the <a 0109 * href="https://www.w3.org/TR/REC-html40/struct/links.html#adef-href"> 0110 * href attribute definition </a> in HTML 4.0. 0111 * 0112 */ 0113 DOMString href() const; 0114 0115 /** 0116 * see href 0117 */ 0118 void setHref(const DOMString &); 0119 0120 /** 0121 * Language code of the linked resource. See the <a 0122 * href="https://www.w3.org/TR/REC-html40/struct/links.html#adef-hreflang"> 0123 * hreflang attribute definition </a> in HTML 4.0. 0124 * 0125 */ 0126 DOMString hreflang() const; 0127 0128 /** 0129 * see hreflang 0130 */ 0131 void setHreflang(const DOMString &); 0132 0133 /** 0134 * Anchor name. See the <a 0135 * href="https://www.w3.org/TR/REC-html40/struct/links.html#adef-name-A"> 0136 * name attribute definition </a> in HTML 4.0. 0137 * 0138 */ 0139 DOMString name() const; 0140 0141 /** 0142 * see name 0143 */ 0144 void setName(const DOMString &); 0145 0146 /** 0147 * Forward link type. See the <a 0148 * href="https://www.w3.org/TR/REC-html40/struct/links.html#adef-rel"> 0149 * rel attribute definition </a> in HTML 4.0. 0150 * 0151 */ 0152 DOMString rel() const; 0153 0154 /** 0155 * see rel 0156 */ 0157 void setRel(const DOMString &); 0158 0159 /** 0160 * Reverse link type. See the <a 0161 * href="https://www.w3.org/TR/REC-html40/struct/links.html#adef-rev"> 0162 * rev attribute definition </a> in HTML 4.0. 0163 * 0164 */ 0165 DOMString rev() const; 0166 0167 /** 0168 * see rev 0169 */ 0170 void setRev(const DOMString &); 0171 0172 /** 0173 * The shape of the active area. The coordinates are given by 0174 * \c coords . See the <a 0175 * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-shape"> 0176 * shape attribute definition </a> in HTML 4.0. 0177 * 0178 */ 0179 DOMString shape() const; 0180 0181 /** 0182 * see shape 0183 */ 0184 void setShape(const DOMString &); 0185 0186 /** 0187 * Index that represents the element's position in the tabbing 0188 * order. See the <a 0189 * href="https://www.w3.org/TR/REC-html40/interact/forms.html#adef-tabindex"> 0190 * tabindex attribute definition </a> in HTML 4.0. 0191 * 0192 */ 0193 long tabIndex() const; 0194 0195 /** 0196 * see tabIndex 0197 */ 0198 void setTabIndex(long); 0199 0200 /** 0201 * Frame to render the resource in. See the <a 0202 * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-target"> 0203 * target attribute definition </a> in HTML 4.0. 0204 * 0205 */ 0206 DOMString target() const; 0207 0208 /** 0209 * see target 0210 */ 0211 void setTarget(const DOMString &); 0212 0213 /** 0214 * Advisory content type. See the <a 0215 * href="https://www.w3.org/TR/REC-html40/struct/links.html#adef-type-A"> 0216 * type attribute definition </a> in HTML 4.0. 0217 * 0218 */ 0219 DOMString type() const; 0220 0221 /** 0222 * see type 0223 */ 0224 void setType(const DOMString &); 0225 0226 /** 0227 * Removes keyboard focus from this element. 0228 * 0229 * @return 0230 * 0231 */ 0232 void blur(); 0233 0234 /** 0235 * Gives keyboard focus to this element. 0236 * 0237 * @return 0238 * 0239 */ 0240 void focus(); 0241 }; 0242 0243 // -------------------------------------------------------------------------- 0244 0245 class HTMLBRElementImpl; 0246 0247 /** 0248 * Force a line break. See the <a 0249 * href="https://www.w3.org/TR/REC-html40/struct/text.html#edef-BR"> BR 0250 * element definition </a> in HTML 4.0. 0251 * 0252 */ 0253 class KHTML_EXPORT HTMLBRElement : public HTMLElement 0254 { 0255 public: 0256 HTMLBRElement(); 0257 HTMLBRElement(const HTMLBRElement &other); 0258 HTMLBRElement(const Node &other) : HTMLElement() 0259 { 0260 (*this) = other; 0261 } 0262 protected: 0263 HTMLBRElement(HTMLBRElementImpl *impl); 0264 public: 0265 0266 HTMLBRElement &operator = (const HTMLBRElement &other); 0267 HTMLBRElement &operator = (const Node &other); 0268 0269 ~HTMLBRElement(); 0270 0271 /** 0272 * Control flow of text around floats. See the <a 0273 * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-clear"> 0274 * clear attribute definition </a> in HTML 4.0. This attribute is 0275 * deprecated in HTML 4.0. 0276 * 0277 */ 0278 DOMString clear() const; 0279 0280 /** 0281 * see clear 0282 */ 0283 void setClear(const DOMString &); 0284 }; 0285 0286 // -------------------------------------------------------------------------- 0287 0288 class HTMLFontElementImpl; 0289 class DOMString; 0290 0291 /** 0292 * Local change to font. See the <a 0293 * href="https://www.w3.org/TR/REC-html40/present/graphics.html#edef-FONT"> 0294 * FONT element definition </a> in HTML 4.0. This element is 0295 * deprecated in HTML 4.0. 0296 * 0297 */ 0298 class KHTML_EXPORT HTMLFontElement : public HTMLElement 0299 { 0300 public: 0301 HTMLFontElement(); 0302 HTMLFontElement(const HTMLFontElement &other); 0303 HTMLFontElement(const Node &other) : HTMLElement() 0304 { 0305 (*this) = other; 0306 } 0307 protected: 0308 HTMLFontElement(HTMLFontElementImpl *impl); 0309 public: 0310 0311 HTMLFontElement &operator = (const HTMLFontElement &other); 0312 HTMLFontElement &operator = (const Node &other); 0313 0314 ~HTMLFontElement(); 0315 0316 /** 0317 * Font color. See the <a 0318 * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-color-FONT"> 0319 * color attribute definition </a> in HTML 4.0. This attribute is 0320 * deprecated in HTML 4.0. 0321 * 0322 */ 0323 DOMString color() const; 0324 0325 /** 0326 * see color 0327 */ 0328 void setColor(const DOMString &); 0329 0330 /** 0331 * Font face identifier. See the <a 0332 * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-face-FONT"> 0333 * face attribute definition </a> in HTML 4.0. This attribute is 0334 * deprecated in HTML 4.0. 0335 * 0336 */ 0337 DOMString face() const; 0338 0339 /** 0340 * see face 0341 */ 0342 void setFace(const DOMString &); 0343 0344 /** 0345 * Font size. See the <a 0346 * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-size-FONT"> 0347 * size attribute definition </a> in HTML 4.0. This attribute is 0348 * deprecated in HTML 4.0. 0349 * 0350 */ 0351 DOMString size() const; 0352 0353 /** 0354 * see size 0355 */ 0356 void setSize(const DOMString &); 0357 }; 0358 0359 class DOMString; 0360 0361 /** 0362 * Notice of modification to part of a document. See the <a 0363 * href="https://www.w3.org/TR/REC-html40/struct/text.html#edef-ins"> 0364 * INS </a> and <a 0365 * href="https://www.w3.org/TR/REC-html40/struct/text.html#edef-del"> 0366 * DEL </a> element definitions in HTML 4.0. 0367 * 0368 */ 0369 class KHTML_EXPORT HTMLModElement : public HTMLElement 0370 { 0371 public: 0372 HTMLModElement(); 0373 HTMLModElement(const HTMLModElement &other); 0374 HTMLModElement(const Node &other) : HTMLElement() 0375 { 0376 (*this) = other; 0377 } 0378 protected: 0379 HTMLModElement(HTMLElementImpl *impl); 0380 public: 0381 0382 HTMLModElement &operator = (const HTMLModElement &other); 0383 HTMLModElement &operator = (const Node &other); 0384 0385 ~HTMLModElement(); 0386 0387 /** 0388 * A URI designating a document that describes the reason for the 0389 * change. See the <a href="https://www.w3.org/TR/REC-html40/"> 0390 * cite attribute definition </a> in HTML 4.0. 0391 * 0392 */ 0393 DOMString cite() const; 0394 0395 /** 0396 * see cite 0397 */ 0398 void setCite(const DOMString &); 0399 0400 /** 0401 * The date and time of the change. See the <a 0402 * href="https://www.w3.org/TR/REC-html40/struct/text.html#adef-datetime"> 0403 * datetime attribute definition </a> in HTML 4.0. 0404 * 0405 */ 0406 DOMString dateTime() const; 0407 0408 /** 0409 * see dateTime 0410 */ 0411 void setDateTime(const DOMString &); 0412 }; 0413 0414 // -------------------------------------------------------------------------- 0415 0416 /** 0417 * For the \c Q and \c BLOCKQUOTE elements. 0418 * See the <a 0419 * href="https://www.w3.org/TR/REC-html40/struct/text.html#edef-Q"> Q 0420 * element definition </a> in HTML 4.0. 0421 * 0422 * Note: The DOM is not quite consistent here. They also define the 0423 * HTMLBlockQuoteElement interface, to represent the \c BLOCKQUOTE 0424 * element. To resolve ambiquities, we use this one for the \c Q 0425 * element only. 0426 */ 0427 class KHTML_EXPORT HTMLQuoteElement : public HTMLElement 0428 { 0429 public: 0430 HTMLQuoteElement(); 0431 HTMLQuoteElement(const HTMLQuoteElement &other); 0432 HTMLQuoteElement(const Node &other) : HTMLElement() 0433 { 0434 (*this) = other; 0435 } 0436 protected: 0437 HTMLQuoteElement(HTMLGenericElementImpl *impl); 0438 public: 0439 0440 HTMLQuoteElement &operator = (const HTMLQuoteElement &other); 0441 HTMLQuoteElement &operator = (const Node &other); 0442 0443 ~HTMLQuoteElement(); 0444 0445 /** 0446 * A URI designating a document that designates a source document 0447 * or message. See the <a 0448 * href="https://www.w3.org/TR/REC-html40/struct/text.html#adef-cite-Q"> 0449 * cite attribute definition </a> in HTML 4.0. 0450 * 0451 */ 0452 DOMString cite() const; 0453 0454 /** 0455 * see cite 0456 */ 0457 void setCite(const DOMString &); 0458 }; 0459 0460 } //namespace 0461 0462 #endif