• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.5 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 
35 class KHTMLView;
36 class KHTMLPart;
37 
38 namespace DOM {
39 
40 class DOMString;
41 class DocumentType;
42 class NodeList;
43 class CDATASection;
44 class Comment;
45 class DocumentFragment;
46 class Text;
47 class DOMImplementation;
48 class Element;
49 class Attr;
50 class EntityReference;
51 class ProcessingInstruction;
52 class DocumentImpl;
53 class Range;
54 class NodeIterator;
55 class TreeWalker;
56 class NodeFilter;
57 class DOMImplementationImpl;
58 class DocumentTypeImpl;
59 class Event;
60 class AbstractView;
61 class CSSStyleDeclaration;
62 class HTMLElementImpl;
63 class HTMLFrameElement;
64 class HTMLElementImpl;
65 class HTMLIFrameElement;
66 class HTMLObjectElement;
67 class HTMLDocument;
68 
77 class KHTML_EXPORT DOMImplementation
78 {
79  friend class Document;
80 public:
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 
226 protected:
227  DOMImplementation(DOMImplementationImpl *i);
228  DOMImplementationImpl *impl;
229 };
230 
245 class 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 
255 public:
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);
992 protected:
993 
994  friend class Node;
995 };
996 
997 class DocumentFragmentImpl;
998 
1041 class KHTML_EXPORT DocumentFragment : public Node
1042 {
1043  friend class Document;
1044  friend class HTMLElementImpl;
1045  friend class Range;
1046 
1047 public:
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;
1079 protected:
1080  DocumentFragment(DocumentFragmentImpl *i);
1081 };
1082 
1083 class NamedNodeMap;
1084 class DOMString;
1085 
1099 class KHTML_EXPORT DocumentType : public Node
1100 {
1101  friend class Document;
1102  friend class DOMImplementation;
1103 public:
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 
1173 protected:
1174  DocumentType(DocumentTypeImpl *impl);
1175 };
1176 
1177 } //namespace
1178 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 23 2013 22:03:40 by doxygen 1.8.1.1 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.10.5 API Reference

Skip menu "kdelibs-4.10.5 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