html_document.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: html_document.h,v 1.22 2003/11/06 23:00:58 mueller Exp $ 00029 */ 00030 00031 #ifndef HTML_DOCUMENT_H 00032 #define HTML_DOCUMENT_H 00033 00034 #include <dom/dom_doc.h> 00035 #include <dom/dom_string.h> 00036 00037 class KHTMLView; 00038 class KHTMLPart; 00039 00040 namespace DOM { 00041 00042 class HTMLDocumentImpl; 00043 class DOMImplementation; 00044 class HTMLCollection; 00045 class NodeList; 00046 class Element; 00047 class HTMLElement; 00048 00072 class HTMLDocument : public Document 00073 { 00074 friend class ::KHTMLView; 00075 friend class ::KHTMLPart; 00076 friend class DOMImplementation; 00077 public: 00078 HTMLDocument(); 00084 HTMLDocument(KHTMLView *parent); 00085 HTMLDocument(const HTMLDocument &other); 00086 HTMLDocument(const Node &other) : Document(false) 00087 {(*this)=other;} 00088 protected: 00089 HTMLDocument(HTMLDocumentImpl *impl); 00090 public: 00091 00092 HTMLDocument & operator = (const HTMLDocument &other); 00093 HTMLDocument & operator = (const Node &other); 00094 00095 ~HTMLDocument(); 00096 00102 DOMString title() const; 00103 00107 void setTitle( const DOMString & ); 00108 00114 DOMString referrer() const; 00115 00122 DOMString domain() const; 00123 00127 DOMString URL() const; 00128 00136 HTMLElement body() const; 00137 00141 void setBody(const HTMLElement &); 00142 00149 HTMLCollection images() const; 00150 00157 HTMLCollection applets() const; 00158 00165 HTMLCollection links() const; 00166 00171 HTMLCollection forms() const; 00172 00182 HTMLCollection anchors() const; 00183 00192 DOMString cookie() const; 00193 00197 void setCookie( const DOMString & ); 00198 00214 void open ( ); 00215 00223 void close ( ); 00224 00236 void write ( const DOMString &text ); 00237 00249 void writeln ( const DOMString &text ); 00250 00261 NodeList getElementsByName ( const DOMString &elementName ); 00262 00270 DOMString completeURL( const DOMString& url) const; 00271 00277 DOMString lastModified() const; 00278 00286 HTMLCollection all() const; 00287 }; 00288 00289 } //namespace 00290 00291 #endif