• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • khtml
  • dom
dom_doc.h
Go to the documentation of this file.
1/*
2 * This file is part of the DOM implementation for KDE.
3 *
4 * Copyright 1999 Lars Knoll (knoll@kde.org)
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 * http://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#ifndef _DOM_Document_h_
30#define _DOM_Document_h_
31
32#include <dom/dom_node.h>
33#include <dom/css_stylesheet.h>
34
35class KHTMLView;
36class KHTMLPart;
37
38namespace DOM {
39
40class DOMString;
41class DocumentType;
42class NodeList;
43class CDATASection;
44class Comment;
45class DocumentFragment;
46class Text;
47class DOMImplementation;
48class Element;
49class Attr;
50class EntityReference;
51class ProcessingInstruction;
52class DocumentImpl;
53class Range;
54class NodeIterator;
55class TreeWalker;
56class NodeFilter;
57class DOMImplementationImpl;
58class DocumentTypeImpl;
59class Event;
60class AbstractView;
61class CSSStyleDeclaration;
62class HTMLElementImpl;
63class HTMLFrameElement;
64class HTMLElementImpl;
65class HTMLIFrameElement;
66class HTMLObjectElement;
67class HTMLDocument;
68
77class KHTML_EXPORT DOMImplementation
78{
79 friend class Document;
80public:
81 DOMImplementation();
82 DOMImplementation(const DOMImplementation &other);
83
84 DOMImplementation & operator = (const DOMImplementation &other);
85 ~DOMImplementation();
86
103 bool hasFeature ( const DOMString &feature, const DOMString &version );
104
130 DocumentType createDocumentType ( const DOMString &qualifiedName,
131 const DOMString &publicId,
132 const DOMString &systemId );
133
164 Document createDocument ( const DOMString &namespaceURI,
165 const DOMString &qualifiedName,
166 const DocumentType &doctype );
167
182 DOMImplementation getInterface(const DOMString &feature) const;
183
200 CSSStyleSheet createCSSStyleSheet(const DOMString &title, const DOMString &media);
201
217 HTMLDocument createHTMLDocument(const DOMString& title);
218
223 DOMImplementationImpl *handle() const;
224 bool isNull() const;
225
226protected:
227 DOMImplementation(DOMImplementationImpl *i);
228 DOMImplementationImpl *impl;
229};
230
245class KHTML_EXPORT Document : public Node
246{
247 friend class ::KHTMLView;
248 friend class ::KHTMLPart;
249 friend class AbstractView;
250 friend class DOMImplementation;
251 friend class HTMLFrameElement;
252 friend class HTMLIFrameElement;
253 friend class HTMLObjectElement;
254
255public:
256 Document();
261 Document(bool);
262 Document(const Document &other);
263 Document(const Node &other) : Node()
264 {(*this)=other;}
265
266 Document & operator = (const Node &other);
267 Document & operator = (const Document &other);
268
269 ~Document();
270
280 DocumentType doctype() const;
281
288 DOMImplementation implementation() const;
289
296 Element documentElement() const;
297
316 Element createElement ( const DOMString &tagName );
317
336 Element createElementNS( const DOMString &namespaceURI,
337 const DOMString &qualifiedName );
338
345 DocumentFragment createDocumentFragment ( );
346
355 Text createTextNode ( const DOMString &data );
356
366 Comment createComment ( const DOMString &data );
367
381 CDATASection createCDATASection ( const DOMString &data );
382
401 ProcessingInstruction createProcessingInstruction ( const DOMString &target,
402 const DOMString &data );
403
418 Attr createAttribute ( const DOMString &name );
419
448 Attr createAttributeNS( const DOMString &namespaceURI,
449 const DOMString &qualifiedName );
450
466 EntityReference createEntityReference ( const DOMString &name );
467
481 Element getElementById ( const DOMString &elementId ) const;
482
498 NodeList getElementsByTagName ( const DOMString &tagname );
499
516 NodeList getElementsByTagNameNS( const DOMString &namespaceURI,
517 const DOMString &localName );
518
536 NodeList getElementsByClassName ( const DOMString &className );
537
631 Node importNode( const Node & importedNode, bool deep );
632
637 bool isHTMLDocument() const;
638
650 Range createRange();
651
679 NodeIterator createNodeIterator(Node root, unsigned long whatToShow,
680 NodeFilter filter,
681 bool entityReferenceExpansion);
682
713 TreeWalker createTreeWalker(Node root, unsigned long whatToShow,
714 NodeFilter filter,
715 bool entityReferenceExpansion);
716
744 Event createEvent(const DOMString &eventType);
745
752 AbstractView defaultView() const;
753
764 StyleSheetList styleSheets() const;
765
771 DOMString preferredStylesheetSet();
772 DOMString selectedStylesheetSet();
773 void setSelectedStylesheetSet(const DOMString& aString);
774
789 void addStyleSheet(const StyleSheet &sheet);
790
803 void removeStyleSheet(const StyleSheet &sheet);
804
808 KHTMLView *view() const;
809
824 CSSStyleDeclaration getOverrideStyle(const Element &elt,
825 const DOMString &pseudoElt);
826
836 bool async() const;
837
848 void setAsync( bool );
849
850
860 void abort();
861
898 void load( const DOMString &uri );
899
919 void loadXML( const DOMString &source );
920
929 Element querySelector(const DOMString& query) const;
930
941 NodeList querySelectorAll(const DOMString& query) const;
942
951 bool designMode() const;
952
959 void setDesignMode(bool enable);
960
966 DOMString completeURL(const DOMString& url);
967
968 DOMString toString() const;
969
970
976 bool execCommand(const DOMString &command, bool userInterface, const DOMString &value);
977 bool queryCommandEnabled(const DOMString &command);
978 bool queryCommandIndeterm(const DOMString &command);
979 bool queryCommandState(const DOMString &command);
980 bool queryCommandSupported(const DOMString &command);
981 DOMString queryCommandValue(const DOMString &command);
982
989 void updateRendering();
990
991 Document( DocumentImpl *i);
992protected:
993
994 friend class Node;
995};
996
997class DocumentFragmentImpl;
998
1041class KHTML_EXPORT DocumentFragment : public Node
1042{
1043 friend class Document;
1044 friend class HTMLElementImpl;
1045 friend class Range;
1046
1047public:
1048 DocumentFragment();
1049 DocumentFragment(const DocumentFragment &other);
1050 DocumentFragment(const Node &other) : Node()
1051 {(*this)=other;}
1052
1053 DocumentFragment & operator = (const Node &other);
1054 DocumentFragment & operator = (const DocumentFragment &other);
1055
1056 ~DocumentFragment();
1057
1066 Element querySelector(const DOMString& query) const;
1067
1078 NodeList querySelectorAll(const DOMString& query) const;
1079protected:
1080 DocumentFragment(DocumentFragmentImpl *i);
1081};
1082
1083class NamedNodeMap;
1084class DOMString;
1085
1099class KHTML_EXPORT DocumentType : public Node
1100{
1101 friend class Document;
1102 friend class DOMImplementation;
1103public:
1104 DocumentType();
1105 DocumentType(const DocumentType &other);
1106
1107 DocumentType(const Node &other) : Node()
1108 {(*this)=other;}
1109 DocumentType & operator = (const Node &other);
1110 DocumentType & operator = (const DocumentType &other);
1111
1112 ~DocumentType();
1113
1119 DOMString name() const;
1120
1135 NamedNodeMap entities() const;
1136
1146 NamedNodeMap notations() const;
1147
1153 DOMString publicId() const;
1154
1160 DOMString systemId() const;
1161
1171 DOMString internalSubset() const;
1172
1173protected:
1174 DocumentType(DocumentTypeImpl *impl);
1175};
1176
1177} //namespace
1178#endif
DOM::AbstractView
Introduced in DOM Level 2.
Definition: dom2_views.h:41
DOM::Attr
The Attr interface represents an attribute in an Element object.
Definition: dom_element.h:89
DOM::CDATASection
CDATA sections are used to escape blocks of text containing characters that would otherwise be regard...
Definition: dom_xml.h:67
DOM::CSSStyleDeclaration
The CSSStyleDeclaration interface represents a single CSS declaration block .
Definition: css_value.h:61
DOM::CSSStyleSheet
The CSSStyleSheet interface is a concrete interface used to represent a CSS style sheet i....
Definition: css_stylesheet.h:219
DOM::Comment
This represents the content of a comment, i.e., all the characters between the starting ' <!...
Definition: dom_text.h:224
DOM::DOMImplementation
The DOMImplementation interface provides a number of methods for performing operations that are indep...
Definition: dom_doc.h:78
DOM::DOMImplementation::impl
DOMImplementationImpl * impl
Definition: dom_doc.h:228
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
DOM::DocumentFragment
DocumentFragment is a "lightweight" or "minimal" Document object.
Definition: dom_doc.h:1042
DOM::DocumentFragment::DocumentFragment
DocumentFragment(const Node &other)
Definition: dom_doc.h:1050
DOM::DocumentType
Each Document has a doctype attribute whose value is either null or a DocumentType object.
Definition: dom_doc.h:1100
DOM::DocumentType::DocumentType
DocumentType(const Node &other)
Definition: dom_doc.h:1107
DOM::Document
The Document interface represents the entire HTML or XML document.
Definition: dom_doc.h:246
DOM::Document::Document
Document(const Node &other)
Definition: dom_doc.h:263
DOM::Element
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition: dom_element.h:210
DOM::EntityReference
EntityReference objects may be inserted into the structure model when an entity reference is in the s...
Definition: dom_xml.h:189
DOM::Event
Introduced in DOM Level 2.
Definition: dom2_events.h:117
DOM::HTMLDocument
An HTMLDocument is the root of the HTML hierarchy and holds the entire content.
Definition: html_document.h:74
DOM::HTMLFrameElement
Create a frame.
Definition: html_base.h:163
DOM::HTMLIFrameElement
Inline subwindows.
Definition: html_base.h:362
DOM::HTMLObjectElement
Generic embedded object.
Definition: html_object.h:267
DOM::NamedNodeMap
Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can b...
Definition: dom_node.h:63
DOM::NodeFilter
Filters are objects that know how to "filter out" nodes.
Definition: dom2_traversal.h:184
DOM::NodeIterator
NodeIterators are used to step through a set of nodes, e.g.
Definition: dom2_traversal.h:60
DOM::NodeList
The NodeList interface provides the abstraction of an ordered collection of nodes,...
Definition: dom_node.h:964
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:271
DOM::ProcessingInstruction
The ProcessingInstruction interface represents a "processing instruction", used in XML as a way to ke...
Definition: dom_xml.h:260
DOM::Range
Definition: dom2_range.h:80
DOM::StyleSheetList
The StyleSheetList interface provides the abstraction of an ordered collection of style sheets.
Definition: css_stylesheet.h:324
DOM::StyleSheet
The StyleSheet interface is the abstract base interface for any type of style sheet.
Definition: css_stylesheet.h:59
DOM::Text
The Text interface represents the textual content (termed character data in XML) of an Element or At...
Definition: dom_text.h:270
DOM::TreeWalker
TreeWalker objects are used to navigate a document tree or subtree using the view of the document def...
Definition: dom2_traversal.h:339
KHTMLPart
This class is khtml's main class.
Definition: khtml_part.h:207
KHTMLView
Renders and displays HTML in a QScrollArea.
Definition: khtmlview.h:93
css_stylesheet.h
dom_node.h
DOM
This library provides a full-featured HTML parser and widget.
Definition: design.h:55
name
const char * name(StandardAction id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal