dom_doc.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
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 }
00940 #endif
This file is part of the documentation for kdelibs Version 3.1.4.