khtml_ext.h Source File (khtml Library)

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

# khtml_ext.h

    00001 #ifndef __khtml_ext_h__
    00002 #define __khtml_ext_h__
    00003
    00004 #include "khtml_part.h"
    00005
    00006
    00007 #include <kaction.h>
    00008 #include <kio/global.h>
    00009
    00014 class KHTMLPartBrowserExtension : public KParts::BrowserExtension
    00015 {
    00016   Q_OBJECT
    00017   friend class KHTMLPart;
    00018   friend class KHTMLView;
    00019 public:
    00020   KHTMLPartBrowserExtension( KHTMLPart *parent, const char *name = 0L );
    00021
    00022   virtual int xOffset();
    00023   virtual int yOffset();
    00024
    00025   virtual void saveState( QDataStream &stream );
    00026   virtual void restoreState( QDataStream &stream );
    00027
    00028     // internal
    00029     void editableWidgetFocused( QWidget *widget );
    00030     void editableWidgetBlurred( QWidget *widget );
    00031
    00032     void setExtensionProxy( KParts::BrowserExtension *proxyExtension );
    00033
    00034 public slots:
    00035     void cut();
    00036     void copy();
    00037     void paste();
    00038     void reparseConfiguration();
    00039     void print();
    00040
    00041     // internal . updates the state of the cut/copt/paste action based
    00042     // on whether data is available in the clipboard
    00043     void updateEditActions();
    00044
    00045 private slots:
    00046     // connected to a frame's browserextensions enableAction signal
    00047     void extensionProxyActionEnabled( const char *action, bool enable );
    00048
    00049 private:
    00050     void callExtensionProxyMethod( const char *method );
    00051
    00052     KHTMLPart *m_part;
    00053     QGuardedPtr<QWidget> m_editableFormWidget;
    00054     QGuardedPtr<KParts::BrowserExtension> m_extensionProxy;
    00055     bool m_connectedToClipboard;
    00056 };
    00057
    00058 class KHTMLPartBrowserHostExtension : public KParts::BrowserHostExtension
    00059 {
    00060 public:
    00061   KHTMLPartBrowserHostExtension( KHTMLPart *part );
    00062   virtual ~KHTMLPartBrowserHostExtension();
    00063
    00064   virtual QStringList frameNames() const;
    00065
    00066   virtual const QPtrList<KParts::ReadOnlyPart> frames() const;
    00067
    00068   virtual bool openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs );
    00069 private:
    00070   KHTMLPart *m_part;
    00071 };
    00072
    00077 class KHTMLPopupGUIClient : public QObject, public KXMLGUIClient
    00078 {
    00079   Q_OBJECT
    00080 public:
    00081   KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc, const KURL &url );
    00082   virtual ~KHTMLPopupGUIClient();
    00083
    00084   static void saveURL( QWidget *parent, const QString &caption, const KURL &url,
    00085                        const QMap<QString, QString> &metaData = KIO::MetaData(),
    00086                        const QString &filter = QString::null, long cacheId = 0,
    00087                        const QString &suggestedFilename = QString::null );
    00088
    00089   static void saveURL( const KURL &url, const KURL &destination,
    00090                        const QMap<QString, QString> &metaData = KIO::MetaData(),
    00091                        long cacheId = 0 );
    00092 private slots:
    00093   void slotSaveLinkAs();
    00094   void slotSaveImageAs();
    00095   void slotCopyLinkLocation();
    00096   void slotStopAnimations();
    00097   void slotCopyImageLocation();
    00098   void slotViewImage();
    00099   void slotReloadFrame();
    00100 private:
    00101   class KHTMLPopupGUIClientPrivate;
    00102   KHTMLPopupGUIClientPrivate *d;
    00103 };
    00104
    00105 class KHTMLZoomFactorAction : public KAction
    00106 {
    00107     Q_OBJECT
    00108 public:
    00109     KHTMLZoomFactorAction( KHTMLPart *part, bool direction, const QString &text, const QString &icon, const QObject *receiver, const char *slot, QObject *parent, const char *name );
    00110     virtual ~KHTMLZoomFactorAction();
    00111
    00112     virtual int plug( QWidget *w, int index );
    00113
    00114 private slots:
    00115     void slotActivated( int );
    00116 protected slots:
    00117     void slotActivated() { KAction::slotActivated(); }
    00118 private:
    00119     QPopupMenu *m_popup;
    00120     bool m_direction;
    00121     KHTMLPart *m_part;
    00122 };
    00123
    00124 #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:34:01 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001