KHtml

html_base.h
1 /*
2  * This file is part of the DOM implementation for KDE.
3  *
4  * Copyright 1999 Lars Knoll ([email protected])
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  * https://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 
30 #ifndef HTML_BASE_H
31 #define HTML_BASE_H
32 
33 #include <khtml_export.h>
34 #include <dom/html_element.h>
35 
36 namespace DOM
37 {
38 
39 class HTMLBodyElementImpl;
40 class DOMString;
41 
42 /**
43  * The HTML document body. This element is always present in the DOM
44  * API, even if the tags are not present in the source document. See
45  * the <a
46  * href="https://www.w3.org/TR/REC-html40/struct/global.html#edef-BODY">
47  * BODY element definition </a> in HTML 4.0.
48  *
49  */
50 class KHTML_EXPORT HTMLBodyElement : public HTMLElement
51 {
52 public:
54  HTMLBodyElement(const HTMLBodyElement &other);
55  HTMLBodyElement(const Node &other) : HTMLElement()
56  {
57  (*this) = other;
58  }
59 protected:
60  HTMLBodyElement(HTMLBodyElementImpl *impl);
61 public:
62 
63  HTMLBodyElement &operator = (const HTMLBodyElement &other);
64  HTMLBodyElement &operator = (const Node &other);
65 
66  ~HTMLBodyElement();
67 
68  /**
69  * Color of active links (after mouse-button down, but before
70  * mouse-button up). See the <a
71  * href="https://www.w3.org/TR/REC-html40/struct/global.html#adef-alink">
72  * alink attribute definition </a> in HTML 4.0. This attribute is
73  * deprecated in HTML 4.0.
74  *
75  */
76  DOMString aLink() const;
77 
78  /**
79  * see aLink
80  */
81  void setALink(const DOMString &);
82 
83  /**
84  * URI of the background texture tile image. See the <a
85  * href="https://www.w3.org/TR/REC-html40/struct/global.html#adef-background">
86  * background attribute definition </a> in HTML 4.0. This
87  * attribute is deprecated in HTML 4.0.
88  *
89  */
90  DOMString background() const;
91 
92  /**
93  * see background
94  */
95  void setBackground(const DOMString &);
96 
97  /**
98  * Document background color. See the <a
99  * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-bgcolor">
100  * bgcolor attribute definition </a> in HTML 4.0. This attribute
101  * is deprecated in HTML 4.0.
102  *
103  */
104  DOMString bgColor() const;
105 
106  /**
107  * see bgColor
108  */
109  void setBgColor(const DOMString &);
110 
111  /**
112  * Color of links that are not active and unvisited. See the <a
113  * href="https://www.w3.org/TR/REC-html40/struct/global.html#adef-link">
114  * link attribute definition </a> in HTML 4.0. This attribute is
115  * deprecated in HTML 4.0.
116  *
117  */
118  DOMString link() const;
119 
120  /**
121  * see link
122  */
123  void setLink(const DOMString &);
124 
125  /**
126  * Document text color. See the <a
127  * href="https://www.w3.org/TR/REC-html40/struct/global.html#adef-text">
128  * text attribute definition </a> in HTML 4.0. This attribute is
129  * deprecated in HTML 4.0.
130  *
131  */
132  DOMString text() const;
133 
134  /**
135  * see text
136  */
137  void setText(const DOMString &);
138 
139  /**
140  * Color of links that have been visited by the user. See the <a
141  * href="https://www.w3.org/TR/REC-html40/struct/global.html#adef-vlink">
142  * vlink attribute definition </a> in HTML 4.0. This attribute is
143  * deprecated in HTML 4.0.
144  *
145  */
146  DOMString vLink() const;
147 
148  /**
149  * see vLink
150  */
151  void setVLink(const DOMString &);
152 };
153 
154 // --------------------------------------------------------------------------
155 
156 class HTMLFrameElementImpl;
157 class DOMString;
158 
159 /**
160  * Create a frame. See the <a
161  * href="https://www.w3.org/TR/REC-html40/present/frames.html#edef-FRAME">
162  * FRAME element definition </a> in HTML 4.0.
163  *
164  */
165 class KHTML_EXPORT HTMLFrameElement : public HTMLElement
166 {
167 public:
169  HTMLFrameElement(const HTMLFrameElement &other);
170  HTMLFrameElement(const Node &other) : HTMLElement()
171  {
172  (*this) = other;
173  }
174 protected:
175  HTMLFrameElement(HTMLFrameElementImpl *impl);
176 public:
177 
178  HTMLFrameElement &operator = (const HTMLFrameElement &other);
179  HTMLFrameElement &operator = (const Node &other);
180 
181  ~HTMLFrameElement();
182 
183  /**
184  * Request frame borders. See the <a
185  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-frameborder">
186  * frameborder attribute definition </a> in HTML 4.0.
187  *
188  */
189  DOMString frameBorder() const;
190 
191  /**
192  * see frameBorder
193  */
194  void setFrameBorder(const DOMString &);
195 
196  /**
197  * URI designating a long description of this image or frame. See
198  * the <a
199  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-longdesc-FRAME">
200  * longdesc attribute definition </a> in HTML 4.0.
201  *
202  */
203  DOMString longDesc() const;
204 
205  /**
206  * see longDesc
207  */
208  void setLongDesc(const DOMString &);
209 
210  /**
211  * Frame margin height, in pixels. See the <a
212  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-marginheight">
213  * marginheight attribute definition </a> in HTML 4.0.
214  *
215  */
216  DOMString marginHeight() const;
217 
218  /**
219  * see marginHeight
220  */
221  void setMarginHeight(const DOMString &);
222 
223  /**
224  * Frame margin width, in pixels. See the <a
225  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-marginwidth">
226  * marginwidth attribute definition </a> in HTML 4.0.
227  *
228  */
229  DOMString marginWidth() const;
230 
231  /**
232  * see marginWidth
233  */
234  void setMarginWidth(const DOMString &);
235 
236  /**
237  * The frame name (object of the \c target attribute).
238  * See the <a
239  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-name-FRAME">
240  * name attribute definition </a> in HTML 4.0.
241  *
242  */
243  DOMString name() const;
244 
245  /**
246  * see name
247  */
248  void setName(const DOMString &);
249 
250  /**
251  * When true, forbid user from resizing frame. See the <a
252  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-noresize">
253  * noresize attribute definition </a> in HTML 4.0.
254  *
255  */
256  bool noResize() const;
257 
258  /**
259  * see noResize
260  */
261  void setNoResize(bool);
262 
263  /**
264  * Specify whether or not the frame should have scrollbars. See
265  * the <a
266  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-scrolling">
267  * scrolling attribute definition </a> in HTML 4.0.
268  *
269  */
270  DOMString scrolling() const;
271 
272  /**
273  * see scrolling
274  */
275  void setScrolling(const DOMString &);
276 
277  /**
278  * A URI designating the initial frame contents. See the <a
279  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-src-FRAME">
280  * src attribute definition </a> in HTML 4.0.
281  *
282  */
283  DOMString src() const;
284 
285  /**
286  * see src
287  */
288  void setSrc(const DOMString &);
289 
290  /**
291  * Introduced in DOM Level 2
292  *
293  * Returns the document this frame contains, if there is any and
294  * it is available, a Null document otherwise. The attribute is
295  * read-only.
296  *
297  * @return The content Document if available.
298  */
299  Document contentDocument() const;
300 };
301 
302 // --------------------------------------------------------------------------
303 
304 class HTMLFrameSetElementImpl;
305 class DOMString;
306 
307 /**
308  * Create a grid of frames. See the <a
309  * href="https://www.w3.org/TR/REC-html40/present/frames.html#edef-FRAMESET">
310  * FRAMESET element definition </a> in HTML 4.0.
311  *
312  */
313 class KHTML_EXPORT HTMLFrameSetElement : public HTMLElement
314 {
315 public:
318  HTMLFrameSetElement(const Node &other) : HTMLElement()
319  {
320  (*this) = other;
321  }
322 protected:
323  HTMLFrameSetElement(HTMLFrameSetElementImpl *impl);
324 public:
325 
326  HTMLFrameSetElement &operator = (const HTMLFrameSetElement &other);
327  HTMLFrameSetElement &operator = (const Node &other);
328 
330 
331  /**
332  * The number of columns of frames in the frameset. See the <a
333  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-cols-FRAMESET">
334  * cols attribute definition </a> in HTML 4.0.
335  *
336  */
337  DOMString cols() const;
338 
339  /**
340  * see cols
341  */
342  void setCols(const DOMString &);
343 
344  /**
345  * The number of rows of frames in the frameset. See the <a
346  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-rows-FRAMESET">
347  * rows attribute definition </a> in HTML 4.0.
348  *
349  */
350  DOMString rows() const;
351 
352  /**
353  * see rows
354  */
355  void setRows(const DOMString &);
356 };
357 
358 // --------------------------------------------------------------------------
359 
360 class HTMLIFrameElementImpl;
361 
362 /**
363  * Inline subwindows. See the <a
364  * href="https://www.w3.org/TR/REC-html40/present/frames.html#edef-IFRAME">
365  * IFRAME element definition </a> in HTML 4.0.
366  *
367  */
368 class KHTML_EXPORT HTMLIFrameElement : public HTMLElement
369 {
370 public:
372  HTMLIFrameElement(const HTMLIFrameElement &other);
373  HTMLIFrameElement(const Node &other) : HTMLElement()
374  {
375  (*this) = other;
376  }
377 protected:
378  HTMLIFrameElement(HTMLIFrameElementImpl *impl);
379 public:
380 
381  HTMLIFrameElement &operator = (const HTMLIFrameElement &other);
382  HTMLIFrameElement &operator = (const Node &other);
383 
385 
386  /**
387  * Aligns this object (vertically or horizontally) with respect to
388  * its surrounding text. See the <a
389  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-align-IMG">
390  * align attribute definition </a> in HTML 4.0. This attribute is
391  * deprecated in HTML 4.0.
392  *
393  */
394  DOMString align() const;
395 
396  /**
397  * see align
398  */
399  void setAlign(const DOMString &);
400 
401  /**
402  * Request frame borders. See the <a
403  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-frameborder">
404  * frameborder attribute definition </a> in HTML 4.0.
405  *
406  */
407  DOMString frameBorder() const;
408 
409  /**
410  * see frameBorder
411  */
412  void setFrameBorder(const DOMString &);
413 
414  /**
415  * Frame height. See the <a
416  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-height-IFRAME">
417  * height attribute definition </a> in HTML 4.0.
418  *
419  */
420  DOMString height() const;
421 
422  /**
423  * see height
424  */
425  void setHeight(const DOMString &);
426 
427  /**
428  * URI designating a long description of this image or frame. See
429  * the <a
430  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-longdesc-IFRAME">
431  * longdesc attribute definition </a> in HTML 4.0.
432  *
433  */
434  DOMString longDesc() const;
435 
436  /**
437  * see longDesc
438  */
439  void setLongDesc(const DOMString &);
440 
441  /**
442  * Frame margin height, in pixels. See the <a
443  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-marginheight">
444  * marginheight attribute definition </a> in HTML 4.0.
445  *
446  */
447  DOMString marginHeight() const;
448 
449  /**
450  * see marginHeight
451  */
452  void setMarginHeight(const DOMString &);
453 
454  /**
455  * Frame margin width, in pixels. See the <a
456  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-marginwidth">
457  * marginwidth attribute definition </a> in HTML 4.0.
458  *
459  */
460  DOMString marginWidth() const;
461 
462  /**
463  * see marginWidth
464  */
465  void setMarginWidth(const DOMString &);
466 
467  /**
468  * The frame name (object of the \c target attribute).
469  * See the <a
470  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-name-IFRAME">
471  * name attribute definition </a> in HTML 4.0.
472  *
473  */
474  DOMString name() const;
475 
476  /**
477  * see name
478  */
479  void setName(const DOMString &);
480 
481  /**
482  * Specify whether or not the frame should have scrollbars. See
483  * the <a
484  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-scrolling">
485  * scrolling attribute definition </a> in HTML 4.0.
486  *
487  */
488  DOMString scrolling() const;
489 
490  /**
491  * see scrolling
492  */
493  void setScrolling(const DOMString &);
494 
495  /**
496  * A URI designating the initial frame contents. See the <a
497  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-src-FRAME">
498  * src attribute definition </a> in HTML 4.0.
499  *
500  */
501  DOMString src() const;
502 
503  /**
504  * see src
505  */
506  void setSrc(const DOMString &);
507 
508  /**
509  * Frame width. See the <a
510  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-width-IFRAME">
511  * width attribute definition </a> in HTML 4.0.
512  *
513  */
514  DOMString width() const;
515 
516  /**
517  * see width
518  */
519  void setWidth(const DOMString &);
520 
521  /**
522  * Introduced in DOM Level 2
523  *
524  * Returns the document this iframe contains, if there is any and
525  * it is available, a Null document otherwise. The attribute is
526  * read-only.
527  *
528  * @return The content Document if available.
529  */
530  Document contentDocument() const;
531 };
532 
533 // --------------------------------------------------------------------------
534 
535 class HTMLHeadElementImpl;
536 class DOMString;
537 
538 /**
539  * Document head information. See the <a
540  * href="https://www.w3.org/TR/REC-html40/struct/global.html#edef-HEAD">
541  * HEAD element definition </a> in HTML 4.0.
542  *
543  */
544 class KHTML_EXPORT HTMLHeadElement : public HTMLElement
545 {
546 public:
547  HTMLHeadElement();
548  HTMLHeadElement(const HTMLHeadElement &other);
549  HTMLHeadElement(const Node &other) : HTMLElement()
550  {
551  (*this) = other;
552  }
553 protected:
554  HTMLHeadElement(HTMLHeadElementImpl *impl);
555 public:
556 
557  HTMLHeadElement &operator = (const HTMLHeadElement &other);
558  HTMLHeadElement &operator = (const Node &other);
559 
560  ~HTMLHeadElement();
561 
562  /**
563  * URI designating a metadata profile. See the <a
564  * href="https://www.w3.org/TR/REC-html40/struct/global.html#adef-profile">
565  * profile attribute definition </a> in HTML 4.0.
566  *
567  */
568  DOMString profile() const;
569 
570  /**
571  * see profile
572  */
573  void setProfile(const DOMString &);
574 };
575 
576 // --------------------------------------------------------------------------
577 
578 class HTMLHtmlElementImpl;
579 class DOMString;
580 
581 /**
582  * Root of an HTML document. See the <a
583  * href="https://www.w3.org/TR/REC-html40/struct/global.html#edef-HTML">
584  * HTML element definition </a> in HTML 4.0.
585  *
586  */
587 class KHTML_EXPORT HTMLHtmlElement : public HTMLElement
588 {
589 public:
590  HTMLHtmlElement();
591  HTMLHtmlElement(const HTMLHtmlElement &other);
592  HTMLHtmlElement(const Node &other) : HTMLElement()
593  {
594  (*this) = other;
595  }
596 protected:
597  HTMLHtmlElement(HTMLHtmlElementImpl *impl);
598 public:
599 
600  HTMLHtmlElement &operator = (const HTMLHtmlElement &other);
601  HTMLHtmlElement &operator = (const Node &other);
602 
603  ~HTMLHtmlElement();
604 
605  /**
606  * Version information about the document's DTD. See the <a
607  * href="https://www.w3.org/TR/REC-html40/struct/global.html#adef-version">
608  * version attribute definition </a> in HTML 4.0. This attribute
609  * is deprecated in HTML 4.0.
610  *
611  */
612  DOMString version() const;
613 
614  /**
615  * see version
616  */
617  void setVersion(const DOMString &);
618 };
619 
620 } //namespace
621 
622 #endif
The HTML document body.
Definition: html_base.h:50
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:278
Create a frame.
Definition: html_base.h:165
const QLatin1String name
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
The Document interface represents the entire HTML or XML document.
Definition: dom_doc.h:246
This library provides a full-featured HTML parser and widget.
Create a grid of frames.
Definition: html_base.h:313
Inline subwindows.
Definition: html_base.h:368
Root of an HTML document.
Definition: html_base.h:587
Document head information.
Definition: html_base.h:544
All HTML element interfaces derive from this class.
Definition: html_element.h:70
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Dec 2 2021 22:43:02 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.