# khtml Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# dom_doc.h

    00001 /*
    00002  * This file is part of the DOM implementation for KDE.
    00003  *
    00004  * (C) 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., 59 Temple Place - Suite 330,
    00019  * Boston, MA 02111-1307, 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  * $Id: dom_doc.h,v 1.28.2.1 2003/05/18 12:34:37 mueller Exp $
    00029  */
    00030 #ifndef _DOM_Document_h_
    00031 #define _DOM_Document_h_
    00032
    00033 #include <dom/dom_node.h>
    00034 #include <dom/css_stylesheet.h>
    00035
    00036 class KHTMLView;
    00037 class KHTMLPart;
    00038
    00039 namespace DOM {
    00040
    00041 class DOMString;
    00042 class DocumentType;
    00043 class NodeList;
    00044 class CDATASection;
    00045 class Comment;
    00046 class DocumentFragment;
    00047 class Text;
    00048 class DOMImplementation;
    00049 class Element;
    00050 class Attr;
    00051 class EntityReference;
    00052 class ProcessingInstruction;
    00053 class DocumentImpl;
    00054 class Range;
    00055 class NodeIterator;
    00056 class TreeWalker;
    00057 class NodeFilter;
    00058 class DOMImplementationImpl;
    00059 class DocumentTypeImpl;
    00060 class Event;
    00061 class AbstractView;
    00062 class CSSStyleDeclaration;
    00063 class HTMLFrameElement;
    00064 class HTMLIFrameElement;
    00065 class HTMLObjectElement;
    00066 class HTMLDocument;
    00067
    00076 class DOMImplementation
    00077 {
    00078    friend class Document;
    00079 public:
    00080     DOMImplementation();
    00081     DOMImplementation(const DOMImplementation &other);
    00082
    00083     DOMImplementation & operator = (const DOMImplementation &other);
    00084     ~DOMImplementation();
    00085
    00102     bool hasFeature ( const DOMString &feature, const DOMString &version );
    00103
    00129     DocumentType createDocumentType ( const DOMString &qualifiedName,
    00130                                       const DOMString &publicId,
    00131                                       const DOMString &systemId );
    00132
    00163     Document createDocument ( const DOMString &namespaceURI,
    00164                               const DOMString &qualifiedName,
    00165                               const DocumentType &doctype );
    00166
    00181     DOMImplementation getInterface(const DOMString &feature) const;
    00182
    00199     CSSStyleSheet createCSSStyleSheet(const DOMString &title, const DOMString &media);
    00200
    00216     HTMLDocument createHTMLDocument(const DOMString& title);
    00217
    00222     DOMImplementationImpl *handle() const;
    00223     bool isNull() const;
    00224
    00225 protected:
    00226     DOMImplementation(DOMImplementationImpl *i);
    00227     DOMImplementationImpl *impl;
    00228 };
    00229
    00244 class Document : public Node
    00245 {
    00246     friend class ::KHTMLView;
    00247     friend class ::KHTMLPart;
    00248     friend class AbstractView;
    00249     friend class DOMImplementation;
    00250     friend class HTMLFrameElement;
    00251     friend class HTMLIFrameElement;
    00252     friend class HTMLObjectElement;
    00253
    00254 public:
    00255     Document();
    00260     Document(bool);
    00261     Document(const Document &other);
    00262     Document(const Node &other) : Node()
    00263              {(*this)=other;}
    00264
    00265     Document & operator = (const Node &other);
    00266     Document & operator = (const Document &other);
    00267
    00268     ~Document();
    00269
    00279     DocumentType doctype() const;
    00280
    00287     DOMImplementation implementation() const;
    00288
    00295     Element documentElement() const;
    00296
    00315     Element createElement ( const DOMString &tagName );
    00316
    00335     Element createElementNS( const DOMString &namespaceURI,
    00336                              const DOMString &qualifiedName );
    00337
    00344     DocumentFragment createDocumentFragment (  );
    00345
    00354     Text createTextNode ( const DOMString &data );
    00355
    00365     Comment createComment ( const DOMString &data );
    00366
    00380     CDATASection createCDATASection ( const DOMString &data );
    00381
    00400     ProcessingInstruction createProcessingInstruction ( const DOMString &target,
    00401                                                         const DOMString &data );
    00402
    00417     Attr createAttribute ( const DOMString &name );
    00418
    00447     Attr createAttributeNS( const DOMString &namespaceURI,
    00448                             const DOMString &qualifiedName );
    00449
    00465     EntityReference createEntityReference ( const DOMString &name );
    00466
    00480     Element getElementById ( const DOMString &elementId ) const;
    00481
    00497     NodeList getElementsByTagName ( const DOMString &tagname );
    00498
    00515     NodeList getElementsByTagNameNS( const DOMString &namespaceURI,
    00516                                      const DOMString &localName );
    00517
    00611     Node importNode( const Node & importedNode, bool deep );
    00612
    00617     bool isHTMLDocument() const;
    00618
    00630     Range createRange();
    00631
    00659     NodeIterator createNodeIterator(Node root, unsigned long whatToShow,
    00660                                     NodeFilter filter,
    00661                                     bool entityReferenceExpansion);
    00662
    00693     TreeWalker createTreeWalker(Node root, unsigned long whatToShow,
    00694                                 NodeFilter filter,
    00695                                 bool entityReferenceExpansion);
    00696
    00724     Event createEvent(const DOMString &eventType);
    00725
    00732     AbstractView defaultView() const;
    00733
    00744     StyleSheetList styleSheets() const;
    00745
    00749     KHTMLView *view() const;
    00750
    00765     CSSStyleDeclaration getOverrideStyle(const Element &elt,
    00766                                          const DOMString &pseudoElt);
    00767
    00773     DOMString completeURL(const DOMString& url);
    00774
    00775 protected:
    00776     Document( DocumentImpl *i);
    00777
    00778     friend class Node;
    00779 };
    00780
    00781 class DocumentFragmentImpl;
    00782
    00825 class DocumentFragment : public Node
    00826 {
    00827     friend class Document;
    00828     friend class Range;
    00829
    00830 public:
    00831     DocumentFragment();
    00832     DocumentFragment(const DocumentFragment &other);
    00833     DocumentFragment(const Node &other) : Node()
    00834          {(*this)=other;}
    00835
    00836     DocumentFragment & operator = (const Node &other);
    00837     DocumentFragment & operator = (const DocumentFragment &other);
    00838
    00839     ~DocumentFragment();
    00840
    00841 protected:
    00842     DocumentFragment(DocumentFragmentImpl *i);
    00843 };
    00844
    00845 class NamedNodeMap;
    00846 class DOMString;
    00847
    00861 class DocumentType : public Node
    00862 {
    00863     friend class Document;
    00864     friend class DOMImplementation;
    00865 public:
    00866     DocumentType();
    00867     DocumentType(const DocumentType &other);
    00868
    00869     DocumentType(const Node &other) : Node()
    00870          {(*this)=other;}
    00871     DocumentType & operator = (const Node &other);
    00872     DocumentType & operator = (const DocumentType &other);
    00873
    00874     ~DocumentType();
    00875
    00881     DOMString name() const;
    00882
    00897     NamedNodeMap entities() const;
    00898
    00908     NamedNodeMap notations() const;
    00909
    00915     DOMString publicId() const;
    00916
    00922     DOMString systemId() const;
    00923
    00933     DOMString internalSubset() const;
    00934
    00935 protected:
    00936     DocumentType(DocumentTypeImpl *impl);
    00937 };
    00938
    00939 } //namespace
    00940 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:33:39 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001