KHtml

html_block.h
1 /*
2  * This file is part of the DOM implementation for KDE.
3  *
4  * Copyright 1999 Lars Knoll ([email protected])
5  * Copyright 2004 Allan Sandfeld Jensen ([email protected])
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public License
18  * along with this library; see the file COPYING.LIB. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  *
22  * This file includes excerpts from the Document Object Model (DOM)
23  * Level 1 Specification (Recommendation)
24  * https://www.w3.org/TR/REC-DOM-Level-1/
25  * Copyright © World Wide Web Consortium , (Massachusetts Institute of
26  * Technology , Institut National de Recherche en Informatique et en
27  * Automatique , Keio University ). All Rights Reserved.
28  *
29  */
30 // --------------------------------------------------------------------------
31 
32 #ifndef HTML_BLOCK_H
33 #define HTML_BLOCK_H
34 
35 #include <khtml_export.h>
36 #include <dom/html_element.h>
37 
38 namespace DOM
39 {
40 
41 class HTMLElementImpl;
42 class DOMString;
43 
44 /**
45  * ??? See the <a
46  * href="https://www.w3.org/TR/REC-html40/struct/text.html#edef-BLOCKQUOTE">
47  * BLOCKQUOTE element definition </a> in HTML 4.0.
48  *
49  */
50 class KHTML_EXPORT HTMLBlockquoteElement : public HTMLElement
51 {
52 public:
55  HTMLBlockquoteElement(const Node &other) : HTMLElement()
56  {
57  (*this) = other;
58  }
59 protected:
60  HTMLBlockquoteElement(HTMLElementImpl *impl);
61 public:
62 
63  HTMLBlockquoteElement &operator = (const HTMLBlockquoteElement &other);
64  HTMLBlockquoteElement &operator = (const Node &other);
65 
67 
68  /**
69  * A URI designating a document that describes the reason for the
70  * change. See the <a href="https://www.w3.org/TR/REC-html40/">
71  * cite attribute definition </a> in HTML 4.0.
72  *
73  */
74  DOMString cite() const;
75 
76  /**
77  * see cite
78  */
79  void setCite(const DOMString &);
80 };
81 
82 // --------------------------------------------------------------------------
83 
84 class HTMLDivElementImpl;
85 class DOMString;
86 
87 /**
88  * Generic block container. See the <a
89  * href="https://www.w3.org/TR/REC-html40/struct/global.html#edef-DIV">
90  * DIV element definition </a> in HTML 4.0.
91  *
92  */
93 class KHTML_EXPORT HTMLDivElement : public HTMLElement
94 {
95 public:
97  HTMLDivElement(const HTMLDivElement &other);
98  HTMLDivElement(const Node &other) : HTMLElement()
99  {
100  (*this) = other;
101  }
102 protected:
103  HTMLDivElement(HTMLDivElementImpl *impl);
104 public:
105 
106  HTMLDivElement &operator = (const HTMLDivElement &other);
107  HTMLDivElement &operator = (const Node &other);
108 
109  ~HTMLDivElement();
110 
111  /**
112  * Horizontal text alignment. See the <a
113  * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-align">
114  * align attribute definition </a> in HTML 4.0. This attribute is
115  * deprecated in HTML 4.0.
116  *
117  */
118  DOMString align() const;
119 
120  /**
121  * see align
122  */
123  void setAlign(const DOMString &);
124 };
125 
126 // --------------------------------------------------------------------------
127 
128 class HTMLHRElementImpl;
129 class DOMString;
130 
131 /**
132  * Create a horizontal rule. See the <a
133  * href="https://www.w3.org/TR/REC-html40/present/graphics.html#edef-HR">
134  * HR element definition </a> in HTML 4.0.
135  *
136  */
137 class KHTML_EXPORT HTMLHRElement : public HTMLElement
138 {
139 public:
140  HTMLHRElement();
141  HTMLHRElement(const HTMLHRElement &other);
142  HTMLHRElement(const Node &other) : HTMLElement()
143  {
144  (*this) = other;
145  }
146 protected:
147  HTMLHRElement(HTMLHRElementImpl *impl);
148 public:
149 
150  HTMLHRElement &operator = (const HTMLHRElement &other);
151  HTMLHRElement &operator = (const Node &other);
152 
153  ~HTMLHRElement();
154 
155  /**
156  * Align the rule on the page. See the <a
157  * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-align-HR">
158  * align attribute definition </a> in HTML 4.0. This attribute is
159  * deprecated in HTML 4.0.
160  *
161  */
162  DOMString align() const;
163 
164  /**
165  * see align
166  */
167  void setAlign(const DOMString &);
168 
169  /**
170  * Indicates to the user agent that there should be no shading in
171  * the rendering of this element. See the <a
172  * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-noshade">
173  * noshade attribute definition </a> in HTML 4.0. This attribute
174  * is deprecated in HTML 4.0.
175  *
176  */
177  bool noShade() const;
178 
179  /**
180  * see noShade
181  */
182  void setNoShade(bool);
183 
184  /**
185  * The height of the rule. See the <a
186  * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-size-HR">
187  * size attribute definition </a> in HTML 4.0. This attribute is
188  * deprecated in HTML 4.0.
189  *
190  */
191  DOMString size() const;
192 
193  /**
194  * see size
195  */
196  void setSize(const DOMString &);
197 
198  /**
199  * The width of the rule. See the <a
200  * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-width-HR">
201  * width attribute definition </a> in HTML 4.0. This attribute is
202  * deprecated in HTML 4.0.
203  *
204  */
205  DOMString width() const;
206 
207  /**
208  * see width
209  */
210  void setWidth(const DOMString &);
211 };
212 
213 // --------------------------------------------------------------------------
214 
215 class DOMString;
216 
217 /**
218  * For the \c H1 to \c H6 elements. See the <a
219  * href="https://www.w3.org/TR/REC-html40/struct/global.html#edef-H1">
220  * H1 element definition </a> in HTML 4.0.
221  *
222  */
223 class KHTML_EXPORT HTMLHeadingElement : public HTMLElement
224 {
225 public:
228  HTMLHeadingElement(const Node &other) : HTMLElement()
229  {
230  (*this) = other;
231  }
232 protected:
233  HTMLHeadingElement(HTMLElementImpl *impl);
234 public:
235 
236  HTMLHeadingElement &operator = (const HTMLHeadingElement &other);
237  HTMLHeadingElement &operator = (const Node &other);
238 
240 
241  /**
242  * Horizontal text alignment. See the <a
243  * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-align">
244  * align attribute definition </a> in HTML 4.0. This attribute is
245  * deprecated in HTML 4.0.
246  *
247  */
248  DOMString align() const;
249 
250  /**
251  * see align
252  */
253  void setAlign(const DOMString &);
254 };
255 
256 // --------------------------------------------------------------------------
257 
258 class DOMString;
259 
260 /**
261  * Paragraphs. See the <a
262  * href="https://www.w3.org/TR/REC-html40/struct/text.html#edef-P"> P
263  * element definition </a> in HTML 4.0.
264  *
265  */
266 class KHTML_EXPORT HTMLParagraphElement : public HTMLElement
267 {
268 public:
271  HTMLParagraphElement(const Node &other) : HTMLElement()
272  {
273  (*this) = other;
274  }
275 protected:
276  HTMLParagraphElement(HTMLElementImpl *impl);
277 public:
278 
279  HTMLParagraphElement &operator = (const HTMLParagraphElement &other);
280  HTMLParagraphElement &operator = (const Node &other);
281 
283 
284  /**
285  * Horizontal text alignment. See the <a
286  * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-align">
287  * align attribute definition </a> in HTML 4.0. This attribute is
288  * deprecated in HTML 4.0.
289  *
290  */
291  DOMString align() const;
292 
293  /**
294  * see align
295  */
296  void setAlign(const DOMString &);
297 };
298 
299 // --------------------------------------------------------------------------
300 
301 class HTMLPreElementImpl;
302 
303 /**
304  * Preformatted text. See the <a
305  * href="https://www.w3.org/TR/REC-html40/struct/text.html#edef-PRE">
306  * PRE element definition </a> in HTML 4.0.
307  *
308  */
309 class KHTML_EXPORT HTMLPreElement : public HTMLElement
310 {
311 public:
312  HTMLPreElement();
313  HTMLPreElement(const HTMLPreElement &other);
314  HTMLPreElement(const Node &other) : HTMLElement()
315  {
316  (*this) = other;
317  }
318 protected:
319  HTMLPreElement(HTMLPreElementImpl *impl);
320 public:
321 
322  HTMLPreElement &operator = (const HTMLPreElement &other);
323  HTMLPreElement &operator = (const Node &other);
324 
325  ~HTMLPreElement();
326 
327  /**
328  * Fixed width for content. See the <a
329  * href="https://www.w3.org/TR/REC-html40/struct/text.html#adef-width-PRE">
330  * width attribute definition </a> in HTML 4.0. This attribute is
331  * deprecated in HTML 4.0.
332  *
333  */
334  long width() const;
335 
336  /**
337  * see width
338  */
339  void setWidth(long);
340 };
341 
342 class HTMLLayerElementImpl;
343 
344 /**
345  * Layer container for Netscape 4.x compatibility.
346  * Behaves mostly like absolute positioned DIV-blocks.
347  *
348  */
349 class KHTML_EXPORT HTMLLayerElement : public HTMLElement
350 {
351 public:
353  HTMLLayerElement(const HTMLLayerElement &other);
354  HTMLLayerElement(const Node &other) : HTMLElement()
355  {
356  (*this) = other;
357  }
358 protected:
359  HTMLLayerElement(HTMLLayerElementImpl *impl);
360 public:
361 
362  HTMLLayerElement &operator = (const HTMLLayerElement &other);
363  HTMLLayerElement &operator = (const Node &other);
364 
365  ~HTMLLayerElement();
366 
367  /**
368  * The absolute position of the layer from the top.
369  *
370  */
371  long top() const;
372 
373  /**
374  * see top
375  */
376  void setTop(long);
377 
378  /**
379  * The absolute position of the layer from the left.
380  *
381  */
382  long left() const;
383 
384  /**
385  * see left
386  */
387  void setLeft(long);
388 
389  /**
390  * The visibility of layers is either "show" or "hide"
391  *
392  */
393  DOMString visibility() const;
394 
395  /**
396  * see visibility
397  */
398  void setVisibility(const DOMString &);
399 
400  /**
401  * The background color of the layer.
402  *
403  */
404  DOMString bgColor() const;
405 
406  /**
407  * see bgColor
408  */
409  void setBgColor(const DOMString &);
410 
411  /**
412  * The collection of sub-layers
413  *
414  */
415  HTMLCollection layers() const;
416 };
417 
418 } //namespace
419 
420 #endif
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:278
Layer container for Netscape 4.x compatibility.
Definition: html_block.h:349
An HTMLCollection is a list of nodes.
Definition: html_misc.h:133
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
For the H1 to H6 elements.
Definition: html_block.h:223
??? See the BLOCKQUOTE element definition in HTML 4.0.
Definition: html_block.h:50
Preformatted text.
Definition: html_block.h:309
This library provides a full-featured HTML parser and widget.
Generic block container.
Definition: html_block.h:93
All HTML element interfaces derive from this class.
Definition: html_element.h:70
Create a horizontal rule.
Definition: html_block.h:137
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Oct 24 2021 22:48:01 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.