khtml Library API Documentation

html_objectimpl.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_objectimpl.h,v 1.46.2.3 2003/05/18 12:34:39 mueller Exp $
00023  */
00024 #ifndef HTML_OBJECTIMPL_H
00025 #define HTML_OBJECTIMPL_H
00026 
00027 #include "html_elementimpl.h"
00028 #include "xml/dom_stringimpl.h"
00029 #include "java/kjavaapplet.h"
00030 #include <kparts/browserextension.h>
00031 #include <qstringlist.h>
00032 
00033 class KHTMLView;
00034 class QTimer;
00035 class KJavaApplet;
00036 
00037 // -------------------------------------------------------------------------
00038 namespace DOM {
00039 
00040 class HTMLFormElementImpl;
00041 class DOMStringImpl;
00042 
00043 class LiveConnectElementImpl : public QObject, public HTMLElementImpl
00044 {
00045     Q_OBJECT
00046 public:
00047     LiveConnectElementImpl(DocumentPtr *doc);
00048 
00049     bool get(const unsigned long, const QString &, KParts::LiveConnectExtension::Type &, unsigned long &, QString &);
00050     bool put(const unsigned long, const QString &, const QString &);
00051     bool call(const unsigned long, const QString &, const QStringList &, KParts::LiveConnectExtension::Type &, unsigned long &, QString &);
00052     void unregister(const unsigned long);
00053 
00054     void setLiveConnect(KParts::LiveConnectExtension * lc);
00055 
00056     virtual void detach();
00057 
00058 protected slots:
00059     void liveConnectEvent(const unsigned long, const QString&, const KParts::LiveConnectExtension::ArgList&);
00060 
00061 private slots:
00062     void timerDone();
00063 
00064 private:
00065     KParts::LiveConnectExtension *liveconnect;
00066     QTimer *timer;
00067     QString script;
00068 };
00069 
00070 // -------------------------------------------------------------------------
00071 
00072 class HTMLAppletElementImpl : public LiveConnectElementImpl
00073 {
00074 public:
00075     HTMLAppletElementImpl(DocumentPtr *doc);
00076 
00077     ~HTMLAppletElementImpl();
00078 
00079     virtual Id id() const;
00080 
00081     virtual void parseAttribute(AttributeImpl *token);
00082     virtual void attach();
00083 
00084     KJavaApplet* applet() const;
00085 protected:
00086     khtml::VAlign valign;
00087 };
00088 
00089 // -------------------------------------------------------------------------
00090 
00091 class HTMLEmbedElementImpl : public LiveConnectElementImpl
00092 {
00093 public:
00094     HTMLEmbedElementImpl(DocumentPtr *doc);
00095     ~HTMLEmbedElementImpl();
00096 
00097     virtual Id id() const;
00098 
00099     virtual void parseAttribute(AttributeImpl *attr);
00100     virtual void attach();
00101 
00102     QString url;
00103     QString pluginPage;
00104     QString serviceType;
00105     bool hidden;
00106 };
00107 
00108 // -------------------------------------------------------------------------
00109 
00110 class HTMLObjectElementImpl : public LiveConnectElementImpl
00111 {
00112 public:
00113     HTMLObjectElementImpl(DocumentPtr *doc);
00114 
00115     ~HTMLObjectElementImpl();
00116 
00117     virtual Id id() const;
00118 
00119     HTMLFormElementImpl *form() const;
00120 
00121     virtual void parseAttribute(AttributeImpl *token);
00122 
00123     virtual void attach();
00124     virtual void detach();
00125 
00126     virtual void recalcStyle( StyleChange ch );
00127 
00128     DocumentImpl* contentDocument() const;
00129 
00130     void renderAlternative();
00131 
00132     QString serviceType;
00133     QString url;
00134     QString classId;
00135     bool needWidgetUpdate;
00136     bool m_renderAlternative;
00137 };
00138 
00139 // -------------------------------------------------------------------------
00140 
00141 class HTMLParamElementImpl : public HTMLElementImpl
00142 {
00143     friend class HTMLAppletElementImpl;
00144 public:
00145     HTMLParamElementImpl(DocumentPtr* _doc) : HTMLElementImpl(_doc) {}
00146 
00147     virtual Id id() const;
00148 
00149     virtual void parseAttribute(AttributeImpl *token);
00150 
00151     QString name() const { return m_name; }
00152     QString value() const { return m_value; }
00153 
00154  protected:
00155     QString m_name;
00156     QString m_value;
00157 };
00158 
00159 }
00160 #endif
KDE Logo
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:57 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001