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.1 2003/01/13 22:04:48 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     virtual void detach();
00055 
00056 protected slots:
00057     void liveConnectEvent(const unsigned long, const QString&, const KParts::LiveConnectExtension::ArgList&);
00058 
00059 protected:
00060     void setLiveConnect(KParts::LiveConnectExtension * lc);
00061 
00062 private slots:
00063     void timerDone();
00064 
00065 private:
00066     KParts::LiveConnectExtension *liveconnect;
00067     QTimer *timer;
00068     QString script;
00069 };
00070 
00071 // -------------------------------------------------------------------------
00072 
00073 class HTMLAppletElementImpl : public LiveConnectElementImpl
00074 {
00075 public:
00076     HTMLAppletElementImpl(DocumentPtr *doc);
00077 
00078     ~HTMLAppletElementImpl();
00079 
00080     virtual Id id() const;
00081 
00082     virtual void parseAttribute(AttributeImpl *token);
00083     virtual void attach();
00084 
00085     KJavaApplet* applet() const;
00086 protected:
00087     khtml::VAlign valign;
00088 };
00089 
00090 // -------------------------------------------------------------------------
00091 
00092 class HTMLEmbedElementImpl : public LiveConnectElementImpl
00093 {
00094 public:
00095     HTMLEmbedElementImpl(DocumentPtr *doc);
00096     ~HTMLEmbedElementImpl();
00097 
00098     virtual Id id() const;
00099 
00100     virtual void parseAttribute(AttributeImpl *attr);
00101     virtual void attach();
00102 
00103     QString url;
00104     QString pluginPage;
00105     QString serviceType;
00106     bool hidden;
00107 };
00108 
00109 // -------------------------------------------------------------------------
00110 
00111 class HTMLObjectElementImpl : public HTMLElementImpl
00112 {
00113 public:
00114     HTMLObjectElementImpl(DocumentPtr *doc);
00115 
00116     ~HTMLObjectElementImpl();
00117 
00118     virtual Id id() const;
00119 
00120     HTMLFormElementImpl *form() const;
00121 
00122     virtual void parseAttribute(AttributeImpl *token);
00123 
00124     virtual void attach();
00125     virtual void detach();
00126 
00127     virtual void recalcStyle( StyleChange ch );
00128 
00129     DocumentImpl* contentDocument() const;
00130 
00131     void renderAlternative();
00132 
00133     QString serviceType;
00134     QString url;
00135     QString classId;
00136     bool needWidgetUpdate;
00137     bool m_renderAlternative;
00138 };
00139 
00140 // -------------------------------------------------------------------------
00141 
00142 class HTMLParamElementImpl : public HTMLElementImpl
00143 {
00144     friend class HTMLAppletElementImpl;
00145 public:
00146     HTMLParamElementImpl(DocumentPtr* _doc) : HTMLElementImpl(_doc) {}
00147 
00148     virtual Id id() const;
00149 
00150     virtual void parseAttribute(AttributeImpl *token);
00151 
00152     QString name() const { return m_name; }
00153     QString value() const { return m_value; }
00154 
00155  protected:
00156     QString m_name;
00157     QString m_value;
00158 };
00159 
00160 };
00161 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:22:37 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001