html_headimpl.h Source File (khtml Library)

| # khtml Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# html_headimpl.h

    00001 /*
    00002  * This file is part of the DOM implementation for KDE.
    00003  *
    00004  * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
    00005  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
    00006  *
    00007  * This library is free software; you can redistribute it and/or
    00008  * modify it under the terms of the GNU Library General Public
    00009  * License as published by the Free Software Foundation; either
    00010  * version 2 of the License, or (at your option) any later version.
    00011  *
    00012  * This library is distributed in the hope that it will be useful,
    00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00015  * Library General Public License for more details.
    00016  *
    00017  * You should have received a copy of the GNU Library General Public License
    00018  * along with this library; see the file COPYING.LIB.  If not, write to
    00019  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00020  * Boston, MA 02111-1307, USA.
    00021  *
    00022  * $Id: html_headimpl.h,v 1.37.2.2 2003/05/18 12:34:39 mueller Exp $
    00023  */
    00024 #ifndef HTML_HEADIMPL_H
    00025 #define HTML_HEADIMPL_H
    00026
    00027 #include "html/html_elementimpl.h"
    00028 #include "misc/loader_client.h"
    00029 #include "css/css_stylesheetimpl.h"
    00030
    00031 class KHTMLView;
    00032
    00033 namespace khtml {
    00034     class CachedCSSStyleSheet;
    00035 }
    00036
    00037
    00038 namespace DOM {
    00039
    00040 class DOMString;
    00041 class HTMLFormElementImpl;
    00042 class StyleSheetImpl;
    00043 class CSSStyleSheetImpl;
    00044
    00045 class HTMLBaseElementImpl : public HTMLElementImpl
    00046 {
    00047 public:
    00048     HTMLBaseElementImpl(DocumentPtr *doc)
    00049         : HTMLElementImpl(doc) {}
    00050
    00051     DOMString href() const { return m_href; }
    00052     DOMString target() const { return m_target; }
    00053
    00054     virtual Id id() const;
    00055     virtual void parseAttribute(AttributeImpl *attr);
    00056     virtual void insertedIntoDocument();
    00057     virtual void removedFromDocument();
    00058
    00059     void process();
    00060
    00061 protected:
    00062     DOMString m_href;
    00063     DOMString m_target;
    00064 };
    00065
    00066
    00067
    00068 // -------------------------------------------------------------------------
    00069
    00070 class HTMLLinkElementImpl : public khtml::CachedObjectClient, public HTMLElementImpl
    00071 {
    00072 public:
    00073     HTMLLinkElementImpl(DocumentPtr *doc)
    00074         : HTMLElementImpl(doc), m_cachedSheet(0), m_sheet(0), m_loading(false) {}
    00075
    00076     ~HTMLLinkElementImpl();
    00077
    00078     virtual Id id() const;
    00079
    00080     StyleSheetImpl* sheet() const { return m_sheet; }
    00081
    00082     // overload from HTMLElementImpl
    00083     virtual void parseAttribute(AttributeImpl *attr);
    00084
    00085     void process();
    00086
    00087     virtual void insertedIntoDocument();
    00088     virtual void removedFromDocument();
    00089
    00090     // from CachedObjectClient
    00091     virtual void setStyleSheet(const DOM::DOMString &url, const DOM::DOMString &sheet);
    00092     bool isLoading() const;
    00093     void sheetLoaded();
    00094
    00095
    00096 protected:
    00097     khtml::CachedCSSStyleSheet *m_cachedSheet;
    00098     CSSStyleSheetImpl *m_sheet;
    00099     DOMString m_url;
    00100     DOMString m_type;
    00101     QString m_media;
    00102     DOMString m_rel;
    00103     bool m_loading;
    00104     QString m_data; // needed for temporarily storing the loaded style sheet data
    00105 };
    00106
    00107 // -------------------------------------------------------------------------
    00108
    00109 class HTMLMetaElementImpl : public HTMLElementImpl
    00110 {
    00111 public:
    00112     HTMLMetaElementImpl(DocumentPtr *doc)
    00113         : HTMLElementImpl(doc) {}
    00114
    00115     virtual Id id() const;
    00116     virtual void parseAttribute(AttributeImpl *attr);
    00117     virtual void insertedIntoDocument();
    00118
    00119     void process();
    00120
    00121 protected:
    00122     DOMString m_equiv;
    00123     DOMString m_content;
    00124 };
    00125
    00126 // -------------------------------------------------------------------------
    00127
    00128 class HTMLScriptElementImpl : public HTMLElementImpl
    00129 {
    00130 public:
    00131     HTMLScriptElementImpl(DocumentPtr *doc)
    00132         : HTMLElementImpl(doc) {}
    00133
    00134     virtual Id id() const;
    00135
    00136     DOMString text() const;
    00137     void setText( const DOMString& str );
    00138 };
    00139
    00140 // -------------------------------------------------------------------------
    00141
    00142 class HTMLStyleElementImpl : public HTMLElementImpl
    00143 {
    00144 public:
    00145     HTMLStyleElementImpl(DocumentPtr *doc)
    00146         : HTMLElementImpl(doc), m_sheet(0) {}
    00147     ~HTMLStyleElementImpl();
    00148
    00149     virtual Id id() const;
    00150
    00151     StyleSheetImpl *sheet() const { return m_sheet; }
    00152
    00153     // overload from HTMLElementImpl
    00154     virtual void parseAttribute(AttributeImpl *attr);
    00155     virtual void insertedIntoDocument();
    00156     virtual void removedFromDocument();
    00157     virtual void childrenChanged();
    00158
    00159     bool isLoading() const;
    00160     void sheetLoaded();
    00161
    00162 protected:
    00163     StyleSheetImpl *m_sheet;
    00164 };
    00165
    00166 // -------------------------------------------------------------------------
    00167
    00168 class HTMLTitleElementImpl : public HTMLElementImpl
    00169 {
    00170 public:
    00171     HTMLTitleElementImpl(DocumentPtr *doc)
    00172         : HTMLElementImpl(doc) {}
    00173
    00174     DOMString text();
    00175     void setText( const DOMString& str );
    00176
    00177     virtual Id id() const;
    00178
    00179     virtual void insertedIntoDocument();
    00180     virtual void removedFromDocument();
    00181     virtual void childrenChanged();
    00182
    00183 protected:
    00184     DOMString m_title;
    00185 };
    00186
    00187 } //namespace
    00188
    00189 #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:54 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001