• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KHTML

khtml_part.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 2 -*-
00002 /* This file is part of the KDE project
00003  *
00004  * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
00005  *                     1999-2001 Lars Knoll <knoll@kde.org>
00006  *                     1999-2001 Antti Koivisto <koivisto@kde.org>
00007  *                     2000-2001 Simon Hausmann <hausmann@kde.org>
00008  *                     2000-2001 Dirk Mueller <mueller@kde.org>
00009  *                     2000 Stefan Schimanski <1Stein@gmx.de>
00010  *
00011  * This library is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU Library General Public
00013  * License as published by the Free Software Foundation; either
00014  * version 2 of the License, or (at your option) any later version.
00015  *
00016  * This library is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * Library General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Library General Public License
00022  * along with this library; see the file COPYING.LIB.  If not, write to
00023  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00024  * Boston, MA 02110-1301, USA.
00025  */
00026 #ifndef __khtml_part_h__
00027 #define __khtml_part_h__
00028 
00029 #include "dom/dom_doc.h"
00030 #include "dom/dom2_range.h"
00031 
00032 #include <kparts/part.h>
00033 #include <kparts/browserextension.h>
00034 #include <kdemacros.h>
00035 #include <kfind.h>
00036 #include <kfinddialog.h>
00037 #include <klocalizedstring.h>
00038 #include <kencodingdetector.h>
00039 #include <QtCore/QRegExp>
00040 
00041 class KHTMLPartPrivate;
00042 class KHTMLPartBrowserExtension;
00043 class KJSProxy;
00044 class KHTMLView;
00045 class KHTMLSettings;
00046 class KJavaAppletContext;
00047 class KJSErrorDlg;
00048 
00049 namespace DOM
00050 {
00051   class HTMLDocument;
00052   class HTMLDocumentImpl;
00053   class DocumentImpl;
00054   class Document;
00055   class HTMLTitleElementImpl;
00056   class HTMLFrameElementImpl;
00057   class HTMLIFrameElementImpl;
00058   class HTMLObjectElementImpl;
00059   class HTMLFormElementImpl;
00060   class HTMLAnchorElementImpl;
00061   class HTMLMetaElementImpl;
00062   class NodeImpl;
00063   class Node;
00064   class HTMLEventListener;
00065   class EventListener;
00066   class HTMLPartContainerElementImpl;
00067   class HTMLObjectBaseElementImpl;
00068   class Position;
00069   class Selection;
00070   class Range;
00071   class Editor;
00072 }
00073 
00074 namespace KJS
00075 {
00076   class Interpreter;
00077   class HTMLElement;
00078 }
00079 
00080 namespace khtml
00081 {
00082   class DocLoader;
00083   class RenderPart;
00084   class ChildFrame;
00085   class MousePressEvent;
00086   class MouseDoubleClickEvent;
00087   class MouseMoveEvent;
00088   class MouseReleaseEvent;
00089   class DrawContentsEvent;
00090   class CachedObject;
00091   class RenderWidget;
00092   class RenderBlock;
00093   class CSSStyleSelector;
00094   class HTMLTokenizer;
00095   class XMLTokenizer;
00096   struct EditorContext;
00097   class EditCommandImpl;
00098   class KHTMLPartAccessor;
00099 }
00100 
00101 namespace KJS {
00102     class Window;
00103     class WindowFunc;
00104     class ExternalFunc;
00105     class JSEventListener;
00106     class JSLazyEventListener;
00107     class JSNodeFilter;
00108     class DOMDocument;
00109     class SourceFile;
00110     class ScheduledAction;
00111 //    class DebugDocument;
00112 }
00113 
00114 namespace KParts
00115 {
00116   class PartManager;
00117   class LiveConnectExtension;
00118 }
00119 
00120 namespace KWallet
00121 {
00122   class Wallet;
00123 }
00124 
00195 class KHTML_EXPORT KHTMLPart : public KParts::ReadOnlyPart
00196 {
00197   Q_OBJECT
00198   friend class KHTMLView;
00199   friend class DOM::HTMLTitleElementImpl;
00200   friend class DOM::HTMLFrameElementImpl;
00201   friend class DOM::HTMLIFrameElementImpl;
00202   friend class DOM::HTMLObjectBaseElementImpl;
00203   friend class DOM::HTMLObjectElementImpl;
00204   friend class DOM::HTMLAnchorElementImpl;
00205   friend class DOM::HTMLMetaElementImpl;
00206   friend class DOM::NodeImpl;
00207   friend class KHTMLRun;
00208   friend class DOM::HTMLFormElementImpl;
00209   friend class KJS::Window;
00210   friend class KJS::ScheduledAction;
00211   friend class KJS::JSNodeFilter;
00212   friend class KJS::WindowFunc;
00213   friend class KJS::ExternalFunc;
00214   friend class KJS::JSEventListener;
00215   friend class KJS::JSLazyEventListener;
00216   friend class KJS::DOMDocument;
00217   friend class KJS::HTMLElement;
00218   friend class KJS::SourceFile;
00219 //  friend class KJS::DebugDocument;
00220   friend class KJSProxy;
00221   friend class KHTMLPartBrowserExtension;
00222   friend class DOM::DocumentImpl;
00223   friend class DOM::HTMLDocumentImpl;
00224   friend class DOM::Selection;
00225   friend class DOM::Editor;
00226   friend class KHTMLPartBrowserHostExtension;
00227   friend class khtml::HTMLTokenizer;
00228   friend class khtml::XMLTokenizer;
00229   friend class khtml::RenderWidget;
00230   friend class khtml::RenderBlock;
00231   friend class khtml::CSSStyleSelector;
00232   friend class khtml::EditCommandImpl;
00233   friend class khtml::KHTMLPartAccessor;
00234   friend class KHTMLPartIface;
00235   friend class KHTMLPartFunction;
00236   friend class KHTMLPopupGUIClient;
00237 
00238   Q_PROPERTY( bool javaScriptEnabled READ jScriptEnabled WRITE setJScriptEnabled )
00239   Q_PROPERTY( bool javaEnabled READ javaEnabled WRITE setJavaEnabled )
00240   Q_PROPERTY( bool dndEnabled READ dndEnabled WRITE setDNDEnabled )
00241   Q_PROPERTY( bool pluginsEnabled READ pluginsEnabled WRITE setPluginsEnabled )
00242 
00243   /*
00244    *
00245    * Don't add setOnlyLocalReferences here. It shouldn't be accessible via DBus.
00246    *
00247    **/
00248   Q_PROPERTY( bool modified READ isModified )
00249   Q_PROPERTY( QString encoding READ encoding WRITE setEncoding )
00250   Q_PROPERTY( QString lastModified READ lastModified )
00251   Q_PROPERTY( bool metaRefreshEnabled READ metaRefreshEnabled WRITE setMetaRefreshEnabled )
00252 
00253 public:
00254   enum GUIProfile { DefaultGUI, BrowserViewGUI /* ... */ };
00255 
00268   KHTMLPart( QWidget *parentWidget = 0,
00269              QObject *parent = 0, GUIProfile prof = DefaultGUI );
00288   KHTMLPart( KHTMLView *view, QObject *parent = 0, GUIProfile prof = DefaultGUI );
00289 
00293   virtual ~KHTMLPart();
00294 
00300   virtual bool openUrl( const KUrl &url );
00301 
00305   virtual bool closeUrl();
00306 
00313   virtual void showError( KJob* job );
00314 
00318   DOM::HTMLDocument htmlDocument() const;
00319 
00323   DOM::Document document() const;
00324 
00328    QString documentSource() const;
00329 
00333   DOM::Node activeNode() const;
00334 
00338   KParts::BrowserExtension *browserExtension() const;
00339   KParts::BrowserHostExtension *browserHostExtension() const;
00340 
00344   KHTMLView *view() const;
00345 
00352   void setJScriptEnabled( bool enable );
00353 
00358   bool jScriptEnabled() const;
00359 
00377   KJS::Interpreter *jScriptInterpreter();
00378 
00390   void setStatusMessagesEnabled( bool enable );
00391 
00395   bool statusMessagesEnabled() const;
00396 
00400   void setMetaRefreshEnabled( bool enable );
00401 
00405   bool metaRefreshEnabled() const;
00406 
00411   QVariant executeScript( const DOM::Node &n, const QString &script );
00412 
00417   void setDNDEnabled( bool b );
00418 
00422   bool dndEnabled() const;
00423 
00430   void setJavaEnabled( bool enable );
00431 
00435   bool javaEnabled() const;
00436 
00440   void setPluginsEnabled( bool enable );
00441 
00445   bool pluginsEnabled() const;
00446 
00453   void setAutoloadImages( bool enable );
00460   bool autoloadImages() const;
00461 
00478   void setOnlyLocalReferences( bool enable );
00479 
00484   bool onlyLocalReferences() const;
00485 
00488   bool isCaretMode() const;
00489 
00493   bool isEditable() const;
00494 
00507   void setCaretPosition(DOM::Node node, long offset, bool extendSelection = false);
00508 
00512   enum CaretDisplayPolicy {
00513       CaretVisible, 
00514       CaretInvisible, 
00515       CaretBlink 
00516   };
00517 
00521   CaretDisplayPolicy caretDisplayPolicyNonFocused() const;
00522 
00532   void setCaretDisplayPolicyNonFocused(CaretDisplayPolicy policy);
00533 
00534 #ifndef KDE_NO_COMPAT
00535   KUrl baseURL() const;
00536 #endif
00537 
00541   KUrl backgroundURL() const;
00542 
00546   void scheduleRedirection( int delay, const QString &url, bool lockHistory = true );
00547 
00570   virtual void begin( const KUrl &url = KUrl(), int xOffset = 0, int yOffset = 0 );
00571 
00592   virtual void write( const char *str, int len = -1 );
00593 
00605    // FIXME KDE5: always honour doctype, remove setAlwaysHonourDoctype()
00606   virtual void write( const QString &str );
00607 
00611   virtual void end();
00612 
00613   /*
00614    * Prints the current HTML page laid out for the printer.
00615    *
00616    * (not implemented at the moment)
00617    */
00618   //    void print(QPainter *, int pageHeight, int pageWidth);
00619 
00623   void paint( QPainter *, const QRect &, int = 0, bool * = 0 );
00624 
00631   bool setEncoding( const QString &name, bool override = false );
00632 
00638   QString encoding() const;
00639 
00649   void setUserStyleSheet( const KUrl &url );
00650 
00660   void setUserStyleSheet( const QString &styleSheet );
00661 
00662 public:
00663 
00669   void setStandardFont( const QString &name );
00670 
00677   void setFixedFont( const QString &name );
00678 
00686   bool gotoAnchor( const QString &name );
00687 
00693   bool nextAnchor();
00694 
00698   bool prevAnchor();
00699 
00703   void setURLCursor( const QCursor &c );
00704 
00708   QCursor urlCursor() const;
00709 
00713   enum FindOptions
00714   {
00715     FindLinksOnly   = 1 * KFind::MinimumUserOption,
00716     FindNoPopups    = 2 * KFind::MinimumUserOption
00717     //FindIncremental = 4 * KFind::MinimumUserOption
00718   };
00719 
00724   void findText();
00725 
00733   void findText( const QString &str, long options, QWidget *parent = 0,
00734                  KFindDialog *findDialog = 0 );
00735 
00739   void findTextBegin();
00740 
00746   bool findTextNext( bool reverse = false );
00747 
00757   void setZoomFactor(int percent);
00758 
00762   int zoomFactor() const;
00763 
00773   void setFontScaleFactor(int percent);
00774 
00778   int fontScaleFactor() const;
00779 
00783   virtual QString selectedText() const;
00784 
00791   QString selectedTextAsHTML() const;
00792 
00796   DOM::Range selection() const;
00797 
00808   void selection(DOM::Node &startNode, long &startOffset,
00809         DOM::Node &endNode, long &endOffset) const;
00810 
00814   void setSelection( const DOM::Range & );
00815 
00824   bool hasSelection() const;
00825 
00830   DOM::Editor *editor() const;
00831 
00835   void selectAll();
00836 
00842   void show();
00843 
00849   void hide();
00850 
00855   KParts::PartManager *partManager();
00856 
00864   virtual void saveState( QDataStream &stream );
00874   virtual void restoreState( QDataStream &stream );
00875 
00882   DOM::Node nodeUnderMouse() const;
00883 
00891   DOM::Node nonSharedNodeUnderMouse() const;
00892 
00896   const KHTMLSettings *settings() const;
00897 
00904   KHTMLPart *parentPart();
00905 
00911   QStringList frameNames() const;
00912 
00913   QList<KParts::ReadOnlyPart*> frames() const;
00914 
00918   KHTMLPart *findFrame( const QString &f );
00919 
00927   KHTMLPart *findFrameParent( KParts::ReadOnlyPart *callingPart, const QString &f, khtml::ChildFrame **childFrame=0 );
00928 
00934   KParts::ReadOnlyPart *currentFrame() const;
00935 
00942   bool frameExists( const QString &frameName );
00943 
00947   KJSProxy *framejScript(KParts::ReadOnlyPart *framePart);
00948 
00952   KParts::ReadOnlyPart *findFramePart( const QString &f );
00958   void setJSStatusBarText( const QString &text );
00959 
00965   void setJSDefaultStatusBarText( const QString &text );
00966 
00972   QString jsStatusBarText() const;
00973 
00979   QString jsDefaultStatusBarText() const;
00980 
00984   QString referrer() const;
00985 
00989   QString pageReferrer() const;
00990 
00994   QString lastModified() const;
00995 
00999   void preloadStyleSheet( const QString &url, const QString &stylesheet );
01000 
01004   void preloadScript( const QString &url, const QString &script );
01005 
01011    bool isPointInsideSelection(int x, int y);
01012 
01016   bool restored() const;
01017 
01027    // ### KDE5 remove - fix write( const QString &str ) instead
01028   void setAlwaysHonourDoctype( bool b = true );
01029 
01030   // ### KDE5 remove me
01031   enum FormNotification { NoNotification = 0, Before, Only, Unused=255 };
01037   void setFormNotification(FormNotification fn);
01038 
01044   FormNotification formNotification() const;
01045 
01052   KUrl toplevelURL();
01053 
01059   bool isModified() const;
01060 
01064   void setSuppressedPopupIndicator( bool enable, KHTMLPart *originPart = 0 );
01065 
01069   bool inProgress() const;
01070 
01071 Q_SIGNALS:
01075   void onURL( const QString &url );
01076 
01082   void popupMenu( const QString &url, const QPoint &point );
01083 
01087   void selectionChanged();
01088 
01096   void nodeActivated( const DOM::Node & );
01097 
01100   void docCreated();
01101 
01112   void caretPositionChanged(const DOM::Node &node, long offset);
01113 
01114 
01120   void formSubmitNotification(const char *action, const QString& url,
01121                   const QByteArray& formData, const QString& target,
01122                   const QString& contentType, const QString& boundary);
01123 
01127   void configurationChanged();
01128 
01129 
01130 protected:
01131 
01136   KUrl completeURL( const QString &url );
01137 
01144   void htmlError( int errorCode, const QString& text, const KUrl& reqUrl );
01145 
01146   virtual void customEvent( QEvent *event );
01147 
01151   virtual void khtmlMousePressEvent( khtml::MousePressEvent *event );
01155   virtual void khtmlMouseDoubleClickEvent( khtml::MouseDoubleClickEvent * );
01159   virtual void khtmlMouseMoveEvent( khtml::MouseMoveEvent *event );
01163   virtual void khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event );
01167   virtual void khtmlDrawContentsEvent( khtml::DrawContentsEvent * );
01168 
01172   virtual void guiActivateEvent( KParts::GUIActivateEvent *event );
01173 
01177   virtual bool openFile();
01178 
01179   virtual bool urlSelected( const QString &url, int button, int state,
01180                             const QString &_target,
01181                             const KParts::OpenUrlArguments& args = KParts::OpenUrlArguments(),
01182                             const KParts::BrowserArguments& browserArgs = KParts::BrowserArguments() );
01183 
01192   virtual KParts::ReadOnlyPart *createPart( QWidget *parentWidget,
01193                                             QObject *parent,
01194                                             const QString &mimetype, QString &serviceName,
01195                                             QStringList &serviceTypes, const QStringList &params);
01196 
01197   // This is for RenderPartObject. We want to ask the 'download plugin?'
01198   // question only once per mimetype
01199   bool pluginPageQuestionAsked( const QString& mimetype ) const;
01200   void setPluginPageQuestionAsked( const QString& mimetype );
01201 
01202   enum PageSecurity { NotCrypted, Encrypted, Mixed };
01203   void setPageSecurity( PageSecurity sec );
01204 
01208   virtual bool doOpenStream( const QString& mimeType );
01209 
01213   virtual bool doWriteStream( const QByteArray& data );
01214 
01218   virtual bool doCloseStream();
01219 
01223   virtual void timerEvent(QTimerEvent *);
01224 
01225 public Q_SLOTS:
01226 
01236   void setActiveNode( const DOM::Node &node );
01237 
01241   void stopAnimations();
01242 
01250   QVariant executeScript( const QString &script );
01251 
01261   void setCaretMode(bool enable);
01262 
01273   void setEditable(bool enable);
01274 
01290   void setCaretVisible(bool show);
01291 
01292   // ### KDE4 FIXME:
01293   //          Remove this and make the one below protected+virtual slot.
01294   //          Warning: this is effectively "internal".  Be careful.
01295   void submitFormProxy( const char *action, const QString &url,
01296                         const QByteArray &formData,
01297                         const QString &target,
01298                         const QString& contentType = QString(),
01299                         const QString& boundary = QString() );
01300 
01301 protected Q_SLOTS:
01302 
01308   virtual void slotFinished( KJob* );
01309 
01310 protected:
01316   virtual void startingJob( KIO::Job * ) {}
01317 
01318 private Q_SLOTS:
01319 
01323   void reparseConfiguration();
01324 
01328   void slotData( KIO::Job*, const QByteArray &data );
01332   void slotInfoMessage( KJob*, const QString& msg );
01336   void slotRestoreData( const QByteArray &data );
01340   void slotFinishedParsing();
01344   void slotRedirect();
01348   void slotRedirection( KIO::Job*, const KUrl& );
01352   void slotDebugScript();
01356   void slotDebugDOMTree();
01360   void slotDebugRenderTree();
01364   void slotStopAnimations();
01368   virtual void slotViewDocumentSource();
01372   virtual void slotViewFrameSource();
01376   void slotViewPageInfo();
01380   virtual void slotSaveBackground();
01384   virtual void slotSaveDocument();
01388   virtual void slotSaveFrame();
01392   virtual void slotSecurity();
01396   virtual void slotSetEncoding(const QString &);
01397 
01401   virtual void slotUseStylesheet();
01402 
01403   virtual void slotFind();
01404   virtual void slotFindDone(); // ### remove me
01405   virtual void slotFindDialogDestroyed();
01406   void slotFindNext();
01407   void slotFindPrev();
01408   void slotFindAheadText();
01409   void slotFindAheadLink();
01410 
01411   void slotIncZoom();
01412   void slotDecZoom();
01413   void slotIncZoomFast();
01414   void slotDecZoomFast();
01415 
01416   void slotIncFontSize();
01417   void slotDecFontSize();
01418   void slotIncFontSizeFast();
01419   void slotDecFontSizeFast();
01420 
01421   void slotLoadImages();
01422   void slotWalletClosed();
01423   void launchWalletManager();
01424   void walletMenu();
01425 
01429   void submitFormAgain();
01430 
01434   void updateActions();
01438   void slotPartRemoved( KParts::Part *part );
01442   void slotActiveFrameChanged( KParts::Part *part );
01446   void slotChildStarted( KIO::Job *job );
01450   void slotChildCompleted();
01454   void slotChildCompleted( bool );
01458   void slotParentCompleted();
01462   void slotChildURLRequest( const KUrl &url, const KParts::OpenUrlArguments&, const KParts::BrowserArguments &args );
01466   void slotChildDocCreated();
01470   void slotRequestFocus( KParts::ReadOnlyPart * );
01471   void slotLoaderRequestStarted( khtml::DocLoader*, khtml::CachedObject* obj);
01472   void slotLoaderRequestDone( khtml::DocLoader*, khtml::CachedObject *obj );
01473   void checkCompleted();
01474 
01478   void slotAutoScroll();
01479 
01480   void slotPrintFrame();
01481 
01482   void slotSelectAll();
01483 
01487   void slotProgressUpdate();
01488 
01489   /*
01490    * @internal
01491    */
01492   void slotJobPercent( KJob*, unsigned long );
01493 
01494   /*
01495    * @internal
01496    */
01497   void slotJobDone( KJob* );
01498 
01499   /*
01500    * @internal
01501    */
01502   void slotUserSheetStatDone( KJob* );
01503 
01504   /*
01505    * @internal
01506    */
01507   void slotJobSpeed( KJob*, unsigned long );
01508 
01512   void slotClearSelection();
01513 
01517   void slotZoomView( int );
01518 
01522   void slotHighlight( const QString &, int index, int length );
01523 
01527   void slotAutomaticDetectionLanguage(KEncodingDetector::AutoDetectScript scri);
01528 
01532   void slotToggleCaretMode();
01533 
01537   void suppressedPopupMenu();
01538 
01542   void togglePopupPassivePopup();
01543 
01547   void showSuppressedPopups();
01548 
01552   void launchJSConfigDialog();
01553 
01557   void launchJSErrorDialog();
01558 
01562   void removeJSErrorExtension();
01563 
01567   void disableJSErrorExtension();
01568 
01572   void jsErrorDialogContextMenu();
01573 
01579   void restoreScrollPosition();
01580 
01581   void walletOpened(KWallet::Wallet*);
01582 
01583 private:
01584 
01585   KJSErrorDlg *jsErrorExtension();
01586 
01587   enum StatusBarPriority { BarDefaultText, BarHoverText, BarOverrideText };
01588   void setStatusBarText( const QString& text, StatusBarPriority p);
01589 
01590   bool restoreURL( const KUrl &url );
01591   void clearCaretRectIfNeeded();
01592   void setFocusNodeIfNeeded(const DOM::Selection &);
01593   void selectionLayoutChanged();
01594   void notifySelectionChanged(bool closeTyping=true);
01595   void resetFromScript();
01596   void emitSelectionChanged();
01597   void onFirstData();
01598   // Returns whether callingHtmlPart may access this part
01599   bool checkFrameAccess(KHTMLPart *callingHtmlPart);
01600   bool openUrlInFrame(const KUrl &url, const KParts::OpenUrlArguments& arguments, const KParts::BrowserArguments &browserArguments);
01601   void startAutoScroll();
01602   void stopAutoScroll();
01603   void overURL( const QString &url, const QString &target, bool shiftPressed = false );
01604   void resetHoverText(); // Undo overURL and reset HoverText
01605 
01606   bool processObjectRequest( khtml::ChildFrame *child, const KUrl &url, const QString &mimetype );
01607   KParts::LiveConnectExtension *liveConnectExtension( const DOM::NodeImpl *);
01608 
01609   KWallet::Wallet* wallet();
01610 
01611   void openWallet(DOM::HTMLFormElementImpl*);
01612   void saveToWallet(const QString& key, const QMap<QString,QString>& data);
01613   void dequeueWallet(DOM::HTMLFormElementImpl*);
01614 
01615   void enableFindAheadActions(bool);
01616 
01620   // ### KDE4 FIXME:
01621   //          It is desirable to be able to filter form submissions as well.
01622   //          For instance, forms can have a target and an inheriting class
01623   //          might want to filter based on the target.  Make this protected
01624   //          and virtual, or provide a better solution.
01625   //          See the web_module for the sidebar for an example where this is
01626   //          necessary.
01627   void submitForm( const char *action, const QString &url, const QByteArray &formData,
01628                    const QString &target, const QString& contentType = QString(),
01629                    const QString& boundary = QString() );
01630 
01631   void popupMenu( const QString &url );
01632 
01633   void init( KHTMLView *view, GUIProfile prof );
01634 
01635 
01636   void clear();
01637 
01638   QVariant crossFrameExecuteScript(const QString& target, const QString& script);
01639 
01640   bool requestFrame( DOM::HTMLPartContainerElementImpl *frame, const QString &url, const QString &frameName,
01641                      const QStringList &args = QStringList(), bool isIFrame = false );
01642 
01650   QString requestFrameName();
01651 
01652   bool requestObject(  DOM::HTMLPartContainerElementImpl *frame, const QString &url, const QString &serviceType,
01653                       const QStringList &args = QStringList() );
01654 
01655   bool requestObject( khtml::ChildFrame *child, const KUrl &url,
01656                       const KParts::OpenUrlArguments &args = KParts::OpenUrlArguments(),
01657                       const KParts::BrowserArguments& browserArgs = KParts::BrowserArguments() );
01658 
01659   // Called when a child could not be loaded.
01660   void childLoadFailure( khtml::ChildFrame *child );
01661 
01662   DOM::EventListener *createHTMLEventListener( QString code, QString name, DOM::NodeImpl *node );
01663 
01664   DOM::HTMLDocumentImpl *docImpl() const;
01665   DOM::DocumentImpl *xmlDocImpl() const;
01666   khtml::ChildFrame *frame( const QObject *obj );
01667 
01668   khtml::ChildFrame *recursiveFrameRequest( KHTMLPart *callingHtmlPart, const KUrl &url,
01669                                             const KParts::OpenUrlArguments& args, const KParts::BrowserArguments &browserArgs,
01670                                             bool callParent = true );
01671 
01672   bool checkLinkSecurity( const KUrl &linkURL,const KLocalizedString &message = KLocalizedString(), const QString &button = QString() );
01673   QVariant executeScript( const QString& filename, int baseLine, const DOM::Node &n, const QString& script );
01674 
01675   KJSProxy *jScript();
01676 
01677   KHTMLPart *opener();
01678   long cacheId() const;
01679   void setOpener( KHTMLPart *_opener );
01680   bool openedByJS();
01681   void setOpenedByJS( bool _openedByJS );
01682 
01683   void checkEmitLoadEvent();
01684   void emitLoadEvent();
01685 
01686   bool initFindNode( bool selection, bool reverse, bool fromCursor );
01687 
01697   void extendSelectionTo(int x, int y, const DOM::Node &innerNode);
01701   bool isExtendingSelection() const;
01702   KEncodingDetector *createDecoder();
01703   QString defaultEncoding() const;
01704 
01706   QString defaultExtension() const;
01707 
01711   void zoomIn(const int stepping[], int count);
01715   void zoomOut(const int stepping[], int count);
01716 
01717   void incFontSize(const int stepping[], int count);
01718 
01719   void decFontSize(const int stepping[], int count);
01720 
01721   void emitCaretPositionChanged(const DOM::Position &pos);
01722 
01723   void setDebugScript( bool enable );
01724 
01725   void runAdFilter();
01726 
01727   khtml::EditorContext *editorContext() const;
01728 
01733   void initCaret();
01734 
01738   const DOM::Selection &caret() const;
01739 
01743   const DOM::Selection &dragCaret() const;
01744 
01748   void setCaret(const DOM::Selection &, bool closeTyping=true);
01749 
01753   void setDragCaret(const DOM::Selection &);
01754 
01758   void clearSelection();
01759 
01763   void invalidateSelection();
01764 
01768   void setSelectionVisible(bool flag=true);
01769 
01773   void paintCaret(QPainter *p, const QRect &rect) const;
01774 
01778   void paintDragCaret(QPainter *p, const QRect &rect) const;
01779 
01787   QString simplifiedSelectedText() const;
01788 
01789   bool handleMouseMoveEventDrag(khtml::MouseMoveEvent *event);
01790   bool handleMouseMoveEventOver(khtml::MouseMoveEvent *event);
01791   void handleMouseMoveEventSelection(khtml::MouseMoveEvent *event);
01792 
01793   void handleMousePressEventSingleClick(khtml::MousePressEvent *event);
01794   void handleMousePressEventDoubleClick(khtml::MouseDoubleClickEvent *event);
01795   void handleMousePressEventTripleClick(khtml::MouseDoubleClickEvent *event);
01796 
01797   KHTMLPartPrivate *d;
01798   friend class KHTMLPartPrivate;
01799 };
01800 
01801 
01802 #endif

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal