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

KHTML

dom_doc.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of the DOM implementation for KDE.
00003  *
00004  * Copyright 1999 Lars Knoll (knoll@kde.org)
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public License
00017  * along with this library; see the file COPYING.LIB.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  *
00021  * This file includes excerpts from the Document Object Model (DOM)
00022  * Level 1 Specification (Recommendation)
00023  * http://www.w3.org/TR/REC-DOM-Level-1/
00024  * Copyright © World Wide Web Consortium , (Massachusetts Institute of
00025  * Technology , Institut National de Recherche en Informatique et en
00026  * Automatique , Keio University ). All Rights Reserved.
00027  */
00028 
00029 #ifndef _DOM_Document_h_
00030 #define _DOM_Document_h_
00031 
00032 #include <dom/dom_node.h>
00033 #include <dom/css_stylesheet.h>
00034 
00035 class KHTMLView;
00036 class KHTMLPart;
00037 
00038 namespace DOM {
00039 
00040 class DOMString;
00041 class DocumentType;
00042 class NodeList;
00043 class CDATASection;
00044 class Comment;
00045 class DocumentFragment;
00046 class Text;
00047 class DOMImplementation;
00048 class Element;
00049 class Attr;
00050 class EntityReference;
00051 class ProcessingInstruction;
00052 class DocumentImpl;
00053 class Range;
00054 class NodeIterator;
00055 class TreeWalker;
00056 class NodeFilter;
00057 class DOMImplementationImpl;
00058 class DocumentTypeImpl;
00059 class Event;
00060 class AbstractView;
00061 class CSSStyleDeclaration;
00062 class HTMLElementImpl;
00063 class HTMLFrameElement;
00064 class HTMLElementImpl;
00065 class HTMLIFrameElement;
00066 class HTMLObjectElement;
00067 class HTMLDocument;
00068 
00077 class KHTML_EXPORT DOMImplementation
00078 {
00079    friend class Document;
00080 public:
00081     DOMImplementation();
00082     DOMImplementation(const DOMImplementation &other);
00083 
00084     DOMImplementation & operator = (const DOMImplementation &other);
00085     ~DOMImplementation();
00086 
00103     bool hasFeature ( const DOMString &feature, const DOMString &version );
00104 
00130     DocumentType createDocumentType ( const DOMString &qualifiedName,
00131                                       const DOMString &publicId,
00132                                       const DOMString &systemId );
00133 
00164     Document createDocument ( const DOMString &namespaceURI,
00165                               const DOMString &qualifiedName,
00166                               const DocumentType &doctype );
00167 
00182     DOMImplementation getInterface(const DOMString &feature) const;
00183 
00200     CSSStyleSheet createCSSStyleSheet(const DOMString &title, const DOMString &media);
00201 
00217     HTMLDocument createHTMLDocument(const DOMString& title);
00218 
00223     DOMImplementationImpl *handle() const;
00224     bool isNull() const;
00225 
00226 protected:
00227     DOMImplementation(DOMImplementationImpl *i);
00228     DOMImplementationImpl *impl;
00229 };
00230 
00245 class KHTML_EXPORT Document : public Node
00246 {
00247     friend class ::KHTMLView;
00248     friend class ::KHTMLPart;
00249     friend class AbstractView;
00250     friend class DOMImplementation;
00251     friend class HTMLFrameElement;
00252     friend class HTMLIFrameElement;
00253     friend class HTMLObjectElement;
00254 
00255 public:
00256     Document();
00261     Document(bool);
00262     Document(const Document &other);
00263     Document(const Node &other) : Node()
00264          {(*this)=other;}
00265 
00266     Document & operator = (const Node &other);
00267     Document & operator = (const Document &other);
00268 
00269     ~Document();
00270 
00280     DocumentType doctype() const;
00281 
00288     DOMImplementation implementation() const;
00289 
00296     Element documentElement() const;
00297 
00316     Element createElement ( const DOMString &tagName );
00317 
00336     Element createElementNS( const DOMString &namespaceURI,
00337                              const DOMString &qualifiedName );
00338 
00345     DocumentFragment createDocumentFragment (  );
00346 
00355     Text createTextNode ( const DOMString &data );
00356 
00366     Comment createComment ( const DOMString &data );
00367 
00381     CDATASection createCDATASection ( const DOMString &data );
00382 
00401     ProcessingInstruction createProcessingInstruction ( const DOMString &target,
00402                                                         const DOMString &data );
00403 
00418     Attr createAttribute ( const DOMString &name );
00419 
00448     Attr createAttributeNS( const DOMString &namespaceURI,
00449                             const DOMString &qualifiedName );
00450 
00466     EntityReference createEntityReference ( const DOMString &name );
00467 
00481     Element getElementById ( const DOMString &elementId ) const;
00482 
00498     NodeList getElementsByTagName ( const DOMString &tagname );
00499 
00516     NodeList getElementsByTagNameNS( const DOMString &namespaceURI,
00517                                      const DOMString &localName );
00518 
00536     NodeList getElementsByClassName ( const DOMString &className );
00537 
00631     Node importNode( const Node & importedNode, bool deep );
00632 
00637     bool isHTMLDocument() const;
00638 
00650     Range createRange();
00651 
00679     NodeIterator createNodeIterator(Node root, unsigned long whatToShow,
00680                                     NodeFilter filter,
00681                                     bool entityReferenceExpansion);
00682 
00713     TreeWalker createTreeWalker(Node root, unsigned long whatToShow,
00714                                 NodeFilter filter,
00715                                 bool entityReferenceExpansion);
00716 
00744     Event createEvent(const DOMString &eventType);
00745 
00752     AbstractView defaultView() const;
00753 
00764     StyleSheetList styleSheets() const;
00765 
00771     DOMString preferredStylesheetSet();
00772     DOMString selectedStylesheetSet();
00773     void setSelectedStylesheetSet(const DOMString& aString);
00774 
00789     void addStyleSheet(const StyleSheet &sheet);
00790     
00803     void removeStyleSheet(const StyleSheet &sheet);
00804     
00808     KHTMLView *view() const;
00809 
00824     CSSStyleDeclaration getOverrideStyle(const Element &elt,
00825                                          const DOMString &pseudoElt);
00826 
00836     bool async() const;
00837 
00848     void setAsync( bool );
00849 
00850 
00860     void abort();
00861 
00898     void load( const DOMString &uri );
00899 
00919     void loadXML( const DOMString &source );
00920 
00929     Element querySelector(const DOMString& query) const;
00930 
00941     NodeList querySelectorAll(const DOMString& query) const;
00942 
00951     bool designMode() const;
00952 
00959     void setDesignMode(bool enable);
00960 
00966     DOMString completeURL(const DOMString& url);
00967 
00968     DOMString toString() const;
00969     
00970 
00976     bool execCommand(const DOMString &command, bool userInterface, const DOMString &value);
00977     bool queryCommandEnabled(const DOMString &command);
00978     bool queryCommandIndeterm(const DOMString &command);
00979     bool queryCommandState(const DOMString &command);
00980     bool queryCommandSupported(const DOMString &command);
00981     DOMString queryCommandValue(const DOMString &command);
00982     
00989     void updateRendering();
00990 
00991     Document( DocumentImpl *i);
00992 protected:
00993 
00994     friend class Node;
00995 };
00996 
00997 class DocumentFragmentImpl;
00998 
01041 class KHTML_EXPORT DocumentFragment : public Node
01042 {
01043     friend class Document;
01044     friend class HTMLElementImpl;
01045     friend class Range;
01046 
01047 public:
01048     DocumentFragment();
01049     DocumentFragment(const DocumentFragment &other);
01050     DocumentFragment(const Node &other) : Node()
01051          {(*this)=other;}
01052 
01053     DocumentFragment & operator = (const Node &other);
01054     DocumentFragment & operator = (const DocumentFragment &other);
01055 
01056     ~DocumentFragment();
01057 
01066     Element querySelector(const DOMString& query) const;
01067 
01078     NodeList querySelectorAll(const DOMString& query) const;
01079 protected:
01080     DocumentFragment(DocumentFragmentImpl *i);
01081 };
01082 
01083 class NamedNodeMap;
01084 class DOMString;
01085 
01099 class KHTML_EXPORT DocumentType : public Node
01100 {
01101     friend class Document;
01102     friend class DOMImplementation;
01103 public:
01104     DocumentType();
01105     DocumentType(const DocumentType &other);
01106 
01107     DocumentType(const Node &other) : Node()
01108          {(*this)=other;}
01109     DocumentType & operator = (const Node &other);
01110     DocumentType & operator = (const DocumentType &other);
01111 
01112     ~DocumentType();
01113 
01119     DOMString name() const;
01120 
01135     NamedNodeMap entities() const;
01136 
01146     NamedNodeMap notations() const;
01147 
01153     DOMString publicId() const;
01154 
01160     DOMString systemId() const;
01161 
01171     DOMString internalSubset() const;
01172 
01173 protected:
01174     DocumentType(DocumentTypeImpl *impl);
01175 };
01176 
01177 } //namespace
01178 #endif

KHTML

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • 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
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal