KHtml

html_document.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_DOCUMENT_H
31 #define HTML_DOCUMENT_H
32 
33 #include <khtml_export.h>
34 
35 #include <dom/dom_doc.h>
36 #include <dom/dom_string.h>
37 
38 class KHTMLView;
39 class KHTMLPart;
40 
41 namespace DOM
42 {
43 
44 class HTMLDocumentImpl;
45 class DOMImplementation;
46 class HTMLCollection;
47 class NodeList;
48 class Element;
49 class HTMLElement;
50 
74 class KHTML_EXPORT HTMLDocument : public Document
75 {
76  friend class ::KHTMLView;
77  friend class ::KHTMLPart;
78  friend class DOMImplementation;
79 public:
80  HTMLDocument();
86  HTMLDocument(KHTMLView *parent);
87  HTMLDocument(const HTMLDocument &other);
88  HTMLDocument(const Node &other) : Document(false)
89  {
90  (*this) = other;
91  }
92 protected:
93  HTMLDocument(HTMLDocumentImpl *impl);
94 public:
95 
96  HTMLDocument &operator = (const HTMLDocument &other);
97  HTMLDocument &operator = (const Node &other);
98 
99  ~HTMLDocument();
100 
106  DOMString title() const;
107 
111  void setTitle(const DOMString &);
112 
118  DOMString referrer() const;
119 
126  DOMString domain() const;
127 
131  DOMString URL() const;
132 
140  HTMLElement body() const;
141 
145  void setBody(const HTMLElement &);
146 
153  HTMLCollection images() const;
154 
161  HTMLCollection applets() const;
162 
169  HTMLCollection links() const;
170 
175  HTMLCollection forms() const;
176 
181  HTMLCollection layers() const;
182 
187  HTMLCollection scripts() const;
188 
198  HTMLCollection anchors() const;
199 
208  DOMString cookie() const;
209 
213  void setCookie(const DOMString &);
214 
230  void open();
231 
239  void close();
240 
252  void write(const DOMString &text);
253 
265  void writeln(const DOMString &text);
266 
277  NodeList getElementsByName(const DOMString &elementName);
278 
286  DOMString completeURL(const DOMString &url) const;
287 
293  DOMString lastModified() const;
294 
302  HTMLCollection all() const;
303 };
304 
305 } //namespace
306 
307 #endif
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:278
An HTMLDocument is the root of the HTML hierarchy and holds the entire content.
Definition: html_document.h:74
This class is khtml&#39;s main class.
Definition: khtml_part.h:208
The DOMImplementation interface provides a number of methods for performing operations that are indep...
Definition: dom_doc.h:78
Renders and displays HTML in a QScrollArea.
Definition: khtmlview.h:97
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
The Document interface represents the entire HTML or XML document.
Definition: dom_doc.h:246
The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented.
Definition: dom_node.h:976
This library provides a full-featured HTML parser and widget.
All HTML element interfaces derive from this class.
Definition: html_element.h:70
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jul 9 2020 22:45:25 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.