File indexing completed on 2024-04-28 15:22:59
0001 /* 0002 * This file is part of the DOM implementation for KDE. 0003 * 0004 * Copyright 1999 Lars Knoll (knoll@kde.org) 0005 * Copyright 2004 Allan Sandfeld Jensen (kde@carewolf.com) 0006 * 0007 * This library is free software; you can redistribute it and/or 0008 * modify it under the terms of the GNU Library General Public 0009 * License as published by the Free Software Foundation; either 0010 * version 2 of the License, or (at your option) any later version. 0011 * 0012 * This library is distributed in the hope that it will be useful, 0013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0015 * Library General Public License for more details. 0016 * 0017 * You should have received a copy of the GNU Library General Public License 0018 * along with this library; see the file COPYING.LIB. If not, write to 0019 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0020 * Boston, MA 02110-1301, USA. 0021 * 0022 * This file includes excerpts from the Document Object Model (DOM) 0023 * Level 1 Specification (Recommendation) 0024 * https://www.w3.org/TR/REC-DOM-Level-1/ 0025 * Copyright © World Wide Web Consortium , (Massachusetts Institute of 0026 * Technology , Institut National de Recherche en Informatique et en 0027 * Automatique , Keio University ). All Rights Reserved. 0028 * 0029 */ 0030 // -------------------------------------------------------------------------- 0031 0032 #ifndef HTML_BLOCK_H 0033 #define HTML_BLOCK_H 0034 0035 #include <khtml_export.h> 0036 #include <dom/html_element.h> 0037 0038 namespace DOM 0039 { 0040 0041 class HTMLElementImpl; 0042 class DOMString; 0043 0044 /** 0045 * ??? See the <a 0046 * href="https://www.w3.org/TR/REC-html40/struct/text.html#edef-BLOCKQUOTE"> 0047 * BLOCKQUOTE element definition </a> in HTML 4.0. 0048 * 0049 */ 0050 class KHTML_EXPORT HTMLBlockquoteElement : public HTMLElement 0051 { 0052 public: 0053 HTMLBlockquoteElement(); 0054 HTMLBlockquoteElement(const HTMLBlockquoteElement &other); 0055 HTMLBlockquoteElement(const Node &other) : HTMLElement() 0056 { 0057 (*this) = other; 0058 } 0059 protected: 0060 HTMLBlockquoteElement(HTMLElementImpl *impl); 0061 public: 0062 0063 HTMLBlockquoteElement &operator = (const HTMLBlockquoteElement &other); 0064 HTMLBlockquoteElement &operator = (const Node &other); 0065 0066 ~HTMLBlockquoteElement(); 0067 0068 /** 0069 * A URI designating a document that describes the reason for the 0070 * change. See the <a href="https://www.w3.org/TR/REC-html40/"> 0071 * cite attribute definition </a> in HTML 4.0. 0072 * 0073 */ 0074 DOMString cite() const; 0075 0076 /** 0077 * see cite 0078 */ 0079 void setCite(const DOMString &); 0080 }; 0081 0082 // -------------------------------------------------------------------------- 0083 0084 class HTMLDivElementImpl; 0085 class DOMString; 0086 0087 /** 0088 * Generic block container. See the <a 0089 * href="https://www.w3.org/TR/REC-html40/struct/global.html#edef-DIV"> 0090 * DIV element definition </a> in HTML 4.0. 0091 * 0092 */ 0093 class KHTML_EXPORT HTMLDivElement : public HTMLElement 0094 { 0095 public: 0096 HTMLDivElement(); 0097 HTMLDivElement(const HTMLDivElement &other); 0098 HTMLDivElement(const Node &other) : HTMLElement() 0099 { 0100 (*this) = other; 0101 } 0102 protected: 0103 HTMLDivElement(HTMLDivElementImpl *impl); 0104 public: 0105 0106 HTMLDivElement &operator = (const HTMLDivElement &other); 0107 HTMLDivElement &operator = (const Node &other); 0108 0109 ~HTMLDivElement(); 0110 0111 /** 0112 * Horizontal text alignment. See the <a 0113 * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-align"> 0114 * align attribute definition </a> in HTML 4.0. This attribute is 0115 * deprecated in HTML 4.0. 0116 * 0117 */ 0118 DOMString align() const; 0119 0120 /** 0121 * see align 0122 */ 0123 void setAlign(const DOMString &); 0124 }; 0125 0126 // -------------------------------------------------------------------------- 0127 0128 class HTMLHRElementImpl; 0129 class DOMString; 0130 0131 /** 0132 * Create a horizontal rule. See the <a 0133 * href="https://www.w3.org/TR/REC-html40/present/graphics.html#edef-HR"> 0134 * HR element definition </a> in HTML 4.0. 0135 * 0136 */ 0137 class KHTML_EXPORT HTMLHRElement : public HTMLElement 0138 { 0139 public: 0140 HTMLHRElement(); 0141 HTMLHRElement(const HTMLHRElement &other); 0142 HTMLHRElement(const Node &other) : HTMLElement() 0143 { 0144 (*this) = other; 0145 } 0146 protected: 0147 HTMLHRElement(HTMLHRElementImpl *impl); 0148 public: 0149 0150 HTMLHRElement &operator = (const HTMLHRElement &other); 0151 HTMLHRElement &operator = (const Node &other); 0152 0153 ~HTMLHRElement(); 0154 0155 /** 0156 * Align the rule on the page. See the <a 0157 * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-align-HR"> 0158 * align attribute definition </a> in HTML 4.0. This attribute is 0159 * deprecated in HTML 4.0. 0160 * 0161 */ 0162 DOMString align() const; 0163 0164 /** 0165 * see align 0166 */ 0167 void setAlign(const DOMString &); 0168 0169 /** 0170 * Indicates to the user agent that there should be no shading in 0171 * the rendering of this element. See the <a 0172 * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-noshade"> 0173 * noshade attribute definition </a> in HTML 4.0. This attribute 0174 * is deprecated in HTML 4.0. 0175 * 0176 */ 0177 bool noShade() const; 0178 0179 /** 0180 * see noShade 0181 */ 0182 void setNoShade(bool); 0183 0184 /** 0185 * The height of the rule. See the <a 0186 * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-size-HR"> 0187 * size attribute definition </a> in HTML 4.0. This attribute is 0188 * deprecated in HTML 4.0. 0189 * 0190 */ 0191 DOMString size() const; 0192 0193 /** 0194 * see size 0195 */ 0196 void setSize(const DOMString &); 0197 0198 /** 0199 * The width of the rule. See the <a 0200 * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-width-HR"> 0201 * width attribute definition </a> in HTML 4.0. This attribute is 0202 * deprecated in HTML 4.0. 0203 * 0204 */ 0205 DOMString width() const; 0206 0207 /** 0208 * see width 0209 */ 0210 void setWidth(const DOMString &); 0211 }; 0212 0213 // -------------------------------------------------------------------------- 0214 0215 class DOMString; 0216 0217 /** 0218 * For the \c H1 to \c H6 elements. See the <a 0219 * href="https://www.w3.org/TR/REC-html40/struct/global.html#edef-H1"> 0220 * H1 element definition </a> in HTML 4.0. 0221 * 0222 */ 0223 class KHTML_EXPORT HTMLHeadingElement : public HTMLElement 0224 { 0225 public: 0226 HTMLHeadingElement(); 0227 HTMLHeadingElement(const HTMLHeadingElement &other); 0228 HTMLHeadingElement(const Node &other) : HTMLElement() 0229 { 0230 (*this) = other; 0231 } 0232 protected: 0233 HTMLHeadingElement(HTMLElementImpl *impl); 0234 public: 0235 0236 HTMLHeadingElement &operator = (const HTMLHeadingElement &other); 0237 HTMLHeadingElement &operator = (const Node &other); 0238 0239 ~HTMLHeadingElement(); 0240 0241 /** 0242 * Horizontal text alignment. See the <a 0243 * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-align"> 0244 * align attribute definition </a> in HTML 4.0. This attribute is 0245 * deprecated in HTML 4.0. 0246 * 0247 */ 0248 DOMString align() const; 0249 0250 /** 0251 * see align 0252 */ 0253 void setAlign(const DOMString &); 0254 }; 0255 0256 // -------------------------------------------------------------------------- 0257 0258 class DOMString; 0259 0260 /** 0261 * Paragraphs. See the <a 0262 * href="https://www.w3.org/TR/REC-html40/struct/text.html#edef-P"> P 0263 * element definition </a> in HTML 4.0. 0264 * 0265 */ 0266 class KHTML_EXPORT HTMLParagraphElement : public HTMLElement 0267 { 0268 public: 0269 HTMLParagraphElement(); 0270 HTMLParagraphElement(const HTMLParagraphElement &other); 0271 HTMLParagraphElement(const Node &other) : HTMLElement() 0272 { 0273 (*this) = other; 0274 } 0275 protected: 0276 HTMLParagraphElement(HTMLElementImpl *impl); 0277 public: 0278 0279 HTMLParagraphElement &operator = (const HTMLParagraphElement &other); 0280 HTMLParagraphElement &operator = (const Node &other); 0281 0282 ~HTMLParagraphElement(); 0283 0284 /** 0285 * Horizontal text alignment. See the <a 0286 * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-align"> 0287 * align attribute definition </a> in HTML 4.0. This attribute is 0288 * deprecated in HTML 4.0. 0289 * 0290 */ 0291 DOMString align() const; 0292 0293 /** 0294 * see align 0295 */ 0296 void setAlign(const DOMString &); 0297 }; 0298 0299 // -------------------------------------------------------------------------- 0300 0301 class HTMLPreElementImpl; 0302 0303 /** 0304 * Preformatted text. See the <a 0305 * href="https://www.w3.org/TR/REC-html40/struct/text.html#edef-PRE"> 0306 * PRE element definition </a> in HTML 4.0. 0307 * 0308 */ 0309 class KHTML_EXPORT HTMLPreElement : public HTMLElement 0310 { 0311 public: 0312 HTMLPreElement(); 0313 HTMLPreElement(const HTMLPreElement &other); 0314 HTMLPreElement(const Node &other) : HTMLElement() 0315 { 0316 (*this) = other; 0317 } 0318 protected: 0319 HTMLPreElement(HTMLPreElementImpl *impl); 0320 public: 0321 0322 HTMLPreElement &operator = (const HTMLPreElement &other); 0323 HTMLPreElement &operator = (const Node &other); 0324 0325 ~HTMLPreElement(); 0326 0327 /** 0328 * Fixed width for content. See the <a 0329 * href="https://www.w3.org/TR/REC-html40/struct/text.html#adef-width-PRE"> 0330 * width attribute definition </a> in HTML 4.0. This attribute is 0331 * deprecated in HTML 4.0. 0332 * 0333 */ 0334 long width() const; 0335 0336 /** 0337 * see width 0338 */ 0339 void setWidth(long); 0340 }; 0341 0342 class HTMLLayerElementImpl; 0343 0344 /** 0345 * Layer container for Netscape 4.x compatibility. 0346 * Behaves mostly like absolute positioned DIV-blocks. 0347 * 0348 */ 0349 class KHTML_EXPORT HTMLLayerElement : public HTMLElement 0350 { 0351 public: 0352 HTMLLayerElement(); 0353 HTMLLayerElement(const HTMLLayerElement &other); 0354 HTMLLayerElement(const Node &other) : HTMLElement() 0355 { 0356 (*this) = other; 0357 } 0358 protected: 0359 HTMLLayerElement(HTMLLayerElementImpl *impl); 0360 public: 0361 0362 HTMLLayerElement &operator = (const HTMLLayerElement &other); 0363 HTMLLayerElement &operator = (const Node &other); 0364 0365 ~HTMLLayerElement(); 0366 0367 /** 0368 * The absolute position of the layer from the top. 0369 * 0370 */ 0371 long top() const; 0372 0373 /** 0374 * see top 0375 */ 0376 void setTop(long); 0377 0378 /** 0379 * The absolute position of the layer from the left. 0380 * 0381 */ 0382 long left() const; 0383 0384 /** 0385 * see left 0386 */ 0387 void setLeft(long); 0388 0389 /** 0390 * The visibility of layers is either "show" or "hide" 0391 * 0392 */ 0393 DOMString visibility() const; 0394 0395 /** 0396 * see visibility 0397 */ 0398 void setVisibility(const DOMString &); 0399 0400 /** 0401 * The background color of the layer. 0402 * 0403 */ 0404 DOMString bgColor() const; 0405 0406 /** 0407 * see bgColor 0408 */ 0409 void setBgColor(const DOMString &); 0410 0411 /** 0412 * The collection of sub-layers 0413 * 0414 */ 0415 HTMLCollection layers() const; 0416 }; 0417 0418 } //namespace 0419 0420 #endif