00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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 KHTMLViewBar;
00046 class KHTMLSettings;
00047 class KJavaAppletContext;
00048 class KJSErrorDlg;
00049
00050 namespace DOM
00051 {
00052 class HTMLDocument;
00053 class HTMLDocumentImpl;
00054 class DocumentImpl;
00055 class Document;
00056 class XMLDocumentImpl;
00057 class HTMLTitleElementImpl;
00058 class HTMLFrameElementImpl;
00059 class HTMLIFrameElementImpl;
00060 class HTMLObjectElementImpl;
00061 class HTMLFormElementImpl;
00062 class HTMLAnchorElementImpl;
00063 class HTMLMetaElementImpl;
00064 class NodeImpl;
00065 class ElementImpl;
00066 class Node;
00067 class HTMLEventListener;
00068 class EventListener;
00069 class HTMLPartContainerElementImpl;
00070 class HTMLObjectBaseElementImpl;
00071 class Position;
00072 class Selection;
00073 class Range;
00074 class Editor;
00075 }
00076
00077 namespace WebCore
00078 {
00079 class SVGDocumentExtensions;
00080 }
00081
00082 namespace KJS
00083 {
00084 class Interpreter;
00085 class HTMLElement;
00086 }
00087
00088 namespace khtml
00089 {
00090 class DocLoader;
00091 class RenderPart;
00092 class ChildFrame;
00093 class MousePressEvent;
00094 class MouseDoubleClickEvent;
00095 class MouseMoveEvent;
00096 class MouseReleaseEvent;
00097 class DrawContentsEvent;
00098 class CachedObject;
00099 class RenderWidget;
00100 class RenderBlock;
00101 class CSSStyleSelector;
00102 class HTMLTokenizer;
00103 class XMLTokenizer;
00104 struct EditorContext;
00105 class EditCommandImpl;
00106 class KHTMLPartAccessor;
00107 }
00108
00109 namespace KJS {
00110 class Window;
00111 class WindowFunc;
00112 class ExternalFunc;
00113 class JSEventListener;
00114 class JSLazyEventListener;
00115 class JSNodeFilter;
00116 class DOMDocument;
00117 class SourceFile;
00118 class ScheduledAction;
00119
00120 }
00121
00122 namespace KParts
00123 {
00124 class PartManager;
00125 class LiveConnectExtension;
00126 }
00127
00128 namespace KWallet
00129 {
00130 class Wallet;
00131 }
00132
00203 class KHTML_EXPORT KHTMLPart : public KParts::ReadOnlyPart
00204 {
00205 Q_OBJECT
00206 friend class KHTMLView;
00207 friend class DOM::HTMLTitleElementImpl;
00208 friend class DOM::HTMLFrameElementImpl;
00209 friend class DOM::HTMLIFrameElementImpl;
00210 friend class DOM::HTMLObjectBaseElementImpl;
00211 friend class DOM::HTMLObjectElementImpl;
00212 friend class DOM::HTMLAnchorElementImpl;
00213 friend class DOM::HTMLMetaElementImpl;
00214 friend class DOM::NodeImpl;
00215 friend class DOM::ElementImpl;
00216 friend class KHTMLRun;
00217 friend class DOM::HTMLFormElementImpl;
00218 friend class KJS::Window;
00219 friend class KJS::ScheduledAction;
00220 friend class KJS::JSNodeFilter;
00221 friend class KJS::WindowFunc;
00222 friend class KJS::ExternalFunc;
00223 friend class KJS::JSEventListener;
00224 friend class KJS::JSLazyEventListener;
00225 friend class KJS::DOMDocument;
00226 friend class KJS::HTMLElement;
00227 friend class KJS::SourceFile;
00228
00229 friend class KJSProxy;
00230 friend class KHTMLPartBrowserExtension;
00231 friend class DOM::DocumentImpl;
00232 friend class DOM::HTMLDocumentImpl;
00233 friend class DOM::Selection;
00234 friend class DOM::Editor;
00235 friend class KHTMLPartBrowserHostExtension;
00236 friend class khtml::HTMLTokenizer;
00237 friend class khtml::XMLTokenizer;
00238 friend class khtml::RenderWidget;
00239 friend class khtml::RenderBlock;
00240 friend class khtml::CSSStyleSelector;
00241 friend class khtml::EditCommandImpl;
00242 friend class khtml::KHTMLPartAccessor;
00243 friend class KHTMLPartIface;
00244 friend class KHTMLPartFunction;
00245 friend class KHTMLPopupGUIClient;
00246 friend class KHTMLFind;
00247 friend class WebCore::SVGDocumentExtensions;
00248
00249 Q_PROPERTY( bool javaScriptEnabled READ jScriptEnabled WRITE setJScriptEnabled )
00250 Q_PROPERTY( bool javaEnabled READ javaEnabled WRITE setJavaEnabled )
00251 Q_PROPERTY( bool dndEnabled READ dndEnabled WRITE setDNDEnabled )
00252 Q_PROPERTY( bool pluginsEnabled READ pluginsEnabled WRITE setPluginsEnabled )
00253 Q_PROPERTY( DNSPrefetch dnsPrefetch READ dnsPrefetch WRITE setDNSPrefetch )
00254
00255
00256
00257
00258
00259
00260 Q_PROPERTY( bool modified READ isModified )
00261 Q_PROPERTY( QString encoding READ encoding WRITE setEncoding )
00262 Q_PROPERTY( QString lastModified READ lastModified )
00263 Q_PROPERTY( bool metaRefreshEnabled READ metaRefreshEnabled WRITE setMetaRefreshEnabled )
00264
00265 public:
00266 enum GUIProfile { DefaultGUI, BrowserViewGUI };
00267
00275 enum DNSPrefetch {
00276 DNSPrefetchDisabled=0,
00277 DNSPrefetchEnabled,
00278 DNSPrefetchOnlyWWWAndSLD
00279 };
00280
00293 KHTMLPart( QWidget *parentWidget = 0,
00294 QObject *parent = 0, GUIProfile prof = DefaultGUI );
00313 KHTMLPart( KHTMLView *view, QObject *parent = 0, GUIProfile prof = DefaultGUI );
00314
00318 virtual ~KHTMLPart();
00319
00325 virtual bool openUrl( const KUrl &url );
00326
00330 virtual bool closeUrl();
00331
00338 virtual void showError( KJob* job );
00339
00343 DOM::HTMLDocument htmlDocument() const;
00344
00348 DOM::Document document() const;
00349
00353 QString documentSource() const;
00354
00358 DOM::Node activeNode() const;
00359
00363 KParts::BrowserExtension *browserExtension() const;
00364 KParts::BrowserHostExtension *browserHostExtension() const;
00365
00369 KHTMLView *view() const;
00370
00377 void setJScriptEnabled( bool enable );
00378
00383 bool jScriptEnabled() const;
00384
00402 KJS::Interpreter *jScriptInterpreter();
00403
00415 void setStatusMessagesEnabled( bool enable );
00416
00420 bool statusMessagesEnabled() const;
00421
00425 void setMetaRefreshEnabled( bool enable );
00426
00430 bool metaRefreshEnabled() const;
00431
00436 QVariant executeScript( const DOM::Node &n, const QString &script );
00437
00442 void setDNDEnabled( bool b );
00443
00447 bool dndEnabled() const;
00448
00455 void setJavaEnabled( bool enable );
00456
00460 bool javaEnabled() const;
00461
00465 void setPluginsEnabled( bool enable );
00466
00470 bool pluginsEnabled() const;
00471
00478 void setAutoloadImages( bool enable );
00485 bool autoloadImages() const;
00486
00503 void setOnlyLocalReferences( bool enable );
00504
00517 void setDNSPrefetch( DNSPrefetch pmode );
00518
00527 DNSPrefetch dnsPrefetch() const;
00528
00533 bool onlyLocalReferences() const;
00534
00537 bool isCaretMode() const;
00538
00542 bool isEditable() const;
00543
00556 void setCaretPosition(DOM::Node node, long offset, bool extendSelection = false);
00557
00561 enum CaretDisplayPolicy {
00562 CaretVisible,
00563 CaretInvisible,
00564 CaretBlink
00565 };
00566
00570 CaretDisplayPolicy caretDisplayPolicyNonFocused() const;
00571
00581 void setCaretDisplayPolicyNonFocused(CaretDisplayPolicy policy);
00582
00583 #ifndef KDE_NO_COMPAT
00584 KUrl baseURL() const;
00585 #endif
00586
00590 KUrl backgroundURL() const;
00591
00595 void scheduleRedirection( int delay, const QString &url, bool lockHistory = true );
00596
00619 virtual void begin( const KUrl &url = KUrl(), int xOffset = 0, int yOffset = 0 );
00620
00641 virtual void write( const char *str, int len = -1 );
00642
00654
00655 virtual void write( const QString &str );
00656
00660 virtual void end();
00661
00662
00663
00664
00665
00666
00667
00668
00672 void paint( QPainter *, const QRect &, int = 0, bool * = 0 );
00673
00680 bool setEncoding( const QString &name, bool override = false );
00681
00687 QString encoding() const;
00688
00698 void setUserStyleSheet( const KUrl &url );
00699
00709 void setUserStyleSheet( const QString &styleSheet );
00710
00711 public:
00712
00718 void setStandardFont( const QString &name );
00719
00726 void setFixedFont( const QString &name );
00727
00735 bool gotoAnchor( const QString &name );
00736
00742 bool nextAnchor();
00743
00747 bool prevAnchor();
00748
00752 void setURLCursor( const QCursor &c );
00753
00757 QCursor urlCursor() const;
00758
00762 enum FindOptions
00763 {
00764 FindLinksOnly = 1 * KFind::MinimumUserOption,
00765 FindNoPopups = 2 * KFind::MinimumUserOption
00766
00767 };
00768
00773 void findText();
00774
00782 void findText( const QString &str, long options, QWidget *parent = 0,
00783 KFindDialog *findDialog = 0 );
00784
00788 void findTextBegin();
00789
00795 bool findTextNext( bool reverse = false );
00796
00806 void setZoomFactor(int percent);
00807
00811 int zoomFactor() const;
00812
00822 void setFontScaleFactor(int percent);
00823
00827 int fontScaleFactor() const;
00828
00832 virtual QString selectedText() const;
00833
00840 QString selectedTextAsHTML() const;
00841
00845 DOM::Range selection() const;
00846
00857 void selection(DOM::Node &startNode, long &startOffset,
00858 DOM::Node &endNode, long &endOffset) const;
00859
00863 void setSelection( const DOM::Range & );
00864
00873 bool hasSelection() const;
00874
00879 DOM::Editor *editor() const;
00880
00884 void selectAll();
00885
00891 void show();
00892
00898 void hide();
00899
00904 KParts::PartManager *partManager();
00905
00913 virtual void saveState( QDataStream &stream );
00923 virtual void restoreState( QDataStream &stream );
00924
00931 DOM::Node nodeUnderMouse() const;
00932
00940 DOM::Node nonSharedNodeUnderMouse() const;
00941
00945 const KHTMLSettings *settings() const;
00946
00953
00954 KHTMLPart *parentPart();
00955
00961 QStringList frameNames() const;
00962
00963 QList<KParts::ReadOnlyPart*> frames() const;
00964
00968 KHTMLPart *findFrame( const QString &f );
00969
00977 KHTMLPart *findFrameParent( KParts::ReadOnlyPart *callingPart, const QString &f, khtml::ChildFrame **childFrame=0 );
00978
00984 KParts::ReadOnlyPart *currentFrame() const;
00985
00992 bool frameExists( const QString &frameName );
00993
00997 KJSProxy *framejScript(KParts::ReadOnlyPart *framePart);
00998
01002 KParts::ReadOnlyPart *findFramePart( const QString &f );
01008 void setJSStatusBarText( const QString &text );
01009
01015 void setJSDefaultStatusBarText( const QString &text );
01016
01022 QString jsStatusBarText() const;
01023
01029 QString jsDefaultStatusBarText() const;
01030
01034 QString referrer() const;
01035
01039 QString pageReferrer() const;
01040
01044 QString lastModified() const;
01045
01049 void preloadStyleSheet( const QString &url, const QString &stylesheet );
01050
01054 void preloadScript( const QString &url, const QString &script );
01055
01061 bool isPointInsideSelection(int x, int y);
01062
01066 bool restored() const;
01067
01077
01078 void setAlwaysHonourDoctype( bool b = true );
01079
01080
01081 enum FormNotification { NoNotification = 0, Before, Only, Unused=255 };
01087 void setFormNotification(FormNotification fn);
01088
01094 FormNotification formNotification() const;
01095
01102 KUrl toplevelURL();
01103
01109 bool isModified() const;
01110
01114 void setSuppressedPopupIndicator( bool enable, KHTMLPart *originPart = 0 );
01115
01119 bool inProgress() const;
01120
01121 Q_SIGNALS:
01125 void onURL( const QString &url );
01126
01132 void popupMenu( const QString &url, const QPoint &point );
01133
01137 void selectionChanged();
01138
01146 void nodeActivated( const DOM::Node & );
01147
01150 void docCreated();
01151
01162 void caretPositionChanged(const DOM::Node &node, long offset);
01163
01164
01170 void formSubmitNotification(const char *action, const QString& url,
01171 const QByteArray& formData, const QString& target,
01172 const QString& contentType, const QString& boundary);
01173
01177 void configurationChanged();
01178
01179
01180 protected:
01181
01186 KUrl completeURL( const QString &url );
01187
01194 void htmlError( int errorCode, const QString& text, const KUrl& reqUrl );
01195
01196 virtual void customEvent( QEvent *event );
01197
01201 virtual void khtmlMousePressEvent( khtml::MousePressEvent *event );
01205 virtual void khtmlMouseDoubleClickEvent( khtml::MouseDoubleClickEvent * );
01209 virtual void khtmlMouseMoveEvent( khtml::MouseMoveEvent *event );
01213 virtual void khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event );
01217 virtual void khtmlDrawContentsEvent( khtml::DrawContentsEvent * );
01218
01222 virtual void guiActivateEvent( KParts::GUIActivateEvent *event );
01223
01227 virtual bool openFile();
01228
01229 virtual bool urlSelected( const QString &url, int button, int state,
01230 const QString &_target,
01231 const KParts::OpenUrlArguments& args = KParts::OpenUrlArguments(),
01232 const KParts::BrowserArguments& browserArgs = KParts::BrowserArguments() );
01233
01242 virtual KParts::ReadOnlyPart *createPart( QWidget *parentWidget,
01243 QObject *parent,
01244 const QString &mimetype, QString &serviceName,
01245 QStringList &serviceTypes, const QStringList ¶ms);
01246
01247
01248
01249 bool pluginPageQuestionAsked( const QString& mimetype ) const;
01250 void setPluginPageQuestionAsked( const QString& mimetype );
01251
01252 enum PageSecurity { NotCrypted, Encrypted, Mixed };
01253 void setPageSecurity( PageSecurity sec );
01254
01258 virtual bool doOpenStream( const QString& mimeType );
01259
01263 virtual bool doWriteStream( const QByteArray& data );
01264
01268 virtual bool doCloseStream();
01269
01273 virtual void timerEvent(QTimerEvent *);
01274
01281 bool mayPrefetchHostname( const QString& name );
01282
01283 public Q_SLOTS:
01284
01294 void setActiveNode( const DOM::Node &node );
01295
01299 void stopAnimations();
01300
01308 QVariant executeScript( const QString &script );
01309
01319 void setCaretMode(bool enable);
01320
01331 void setEditable(bool enable);
01332
01348 void setCaretVisible(bool show);
01349
01350
01351
01352
01353 void submitFormProxy( const char *action, const QString &url,
01354 const QByteArray &formData,
01355 const QString &target,
01356 const QString& contentType = QString(),
01357 const QString& boundary = QString() );
01358
01359 protected Q_SLOTS:
01360
01366 virtual void slotFinished( KJob* );
01367
01368 protected:
01374 virtual void startingJob( KIO::Job * ) {}
01375
01376 private Q_SLOTS:
01377
01381 void reparseConfiguration();
01382
01386 void slotData( KIO::Job*, const QByteArray &data );
01390 void slotInfoMessage( KJob*, const QString& msg );
01394 void slotRestoreData( const QByteArray &data );
01398 void slotFinishedParsing();
01402 void slotRedirect();
01406 void slotRedirection( KIO::Job*, const KUrl& );
01410 void slotDebugScript();
01414 void slotDebugDOMTree();
01418 void slotDebugRenderTree();
01422 void slotStopAnimations();
01426 virtual void slotViewDocumentSource();
01430 virtual void slotViewFrameSource();
01434 void slotViewPageInfo();
01438 virtual void slotSaveBackground();
01442 virtual void slotSaveDocument();
01446 virtual void slotSaveFrame();
01450 virtual void slotSecurity();
01454 virtual void slotSetEncoding(const QString &);
01455
01459 virtual void slotUseStylesheet();
01460
01461 virtual void slotFind();
01462 virtual void slotFindDone();
01463 virtual void slotFindDialogDestroyed();
01464 void slotFindNext();
01465 void slotFindPrev();
01466 void slotFindAheadText();
01467 void slotFindAheadLink();
01468
01469 void slotIncZoom();
01470 void slotDecZoom();
01471 void slotIncZoomFast();
01472 void slotDecZoomFast();
01473
01474 void slotIncFontSize();
01475 void slotDecFontSize();
01476 void slotIncFontSizeFast();
01477 void slotDecFontSizeFast();
01478
01479 void slotLoadImages();
01480 void slotWalletClosed();
01481 void launchWalletManager();
01482 void walletMenu();
01483
01487 void submitFormAgain();
01488
01492 void updateActions();
01496 void slotPartRemoved( KParts::Part *part );
01500 void slotActiveFrameChanged( KParts::Part *part );
01504 void slotChildStarted( KIO::Job *job );
01508 void slotChildCompleted();
01512 void slotChildCompleted( bool );
01516 void slotParentCompleted();
01520 void slotChildURLRequest( const KUrl &url, const KParts::OpenUrlArguments&, const KParts::BrowserArguments &args );
01524 void slotChildDocCreated();
01528 void slotRequestFocus( KParts::ReadOnlyPart * );
01529 void slotLoaderRequestStarted( khtml::DocLoader*, khtml::CachedObject* obj);
01530 void slotLoaderRequestDone( khtml::DocLoader*, khtml::CachedObject *obj );
01531 void checkCompleted();
01532
01536 void slotAutoScroll();
01537
01538 void slotPrintFrame();
01539
01540 void slotSelectAll();
01541
01545 void slotProgressUpdate();
01546
01547
01548
01549
01550 void slotJobPercent( KJob*, unsigned long );
01551
01552
01553
01554
01555 void slotJobDone( KJob* );
01556
01557
01558
01559
01560 void slotUserSheetStatDone( KJob* );
01561
01562
01563
01564
01565 void slotJobSpeed( KJob*, unsigned long );
01566
01570 void slotClearSelection();
01571
01575 void slotZoomView( int );
01576
01580 void slotAutomaticDetectionLanguage(KEncodingDetector::AutoDetectScript scri);
01581
01585 void slotToggleCaretMode();
01586
01590 void suppressedPopupMenu();
01591
01595 void togglePopupPassivePopup();
01596
01600 void showSuppressedPopups();
01601
01605 void launchJSConfigDialog();
01606
01610 void launchJSErrorDialog();
01611
01615 void removeJSErrorExtension();
01616
01620 void disableJSErrorExtension();
01621
01625 void jsErrorDialogContextMenu();
01626
01632 void restoreScrollPosition();
01633
01634 void walletOpened(KWallet::Wallet*);
01635
01636 private:
01637
01638 KJSErrorDlg *jsErrorExtension();
01639
01640 enum StatusBarPriority { BarDefaultText, BarHoverText, BarOverrideText };
01641 void setStatusBarText( const QString& text, StatusBarPriority p);
01642
01643 bool restoreURL( const KUrl &url );
01644 void clearCaretRectIfNeeded();
01645 void setFocusNodeIfNeeded(const DOM::Selection &);
01646 void selectionLayoutChanged();
01647 void notifySelectionChanged(bool closeTyping=true);
01648 void resetFromScript();
01649 void emitSelectionChanged();
01650 void onFirstData();
01651
01652 bool checkFrameAccess(KHTMLPart *callingHtmlPart);
01653 bool openUrlInFrame(const KUrl &url, const KParts::OpenUrlArguments& arguments, const KParts::BrowserArguments &browserArguments);
01654 void startAutoScroll();
01655 void stopAutoScroll();
01656 void overURL( const QString &url, const QString &target, bool shiftPressed = false );
01657 void resetHoverText();
01658
01659 bool processObjectRequest( khtml::ChildFrame *child, const KUrl &url, const QString &mimetype );
01660 KParts::LiveConnectExtension *liveConnectExtension( const DOM::NodeImpl *);
01661
01662 KWallet::Wallet* wallet();
01663
01664 void openWallet(DOM::HTMLFormElementImpl*);
01665 void saveToWallet(const QString& key, const QMap<QString,QString>& data);
01666 void dequeueWallet(DOM::HTMLFormElementImpl*);
01667
01668 void enableFindAheadActions(bool);
01669
01673 KHTMLViewBar *pTopViewBar() const;
01674
01678 KHTMLViewBar *pBottomViewBar() const;
01679
01683
01684
01685
01686
01687
01688
01689
01690 void submitForm( const char *action, const QString &url, const QByteArray &formData,
01691 const QString &target, const QString& contentType = QString(),
01692 const QString& boundary = QString() );
01693
01694 void popupMenu( const QString &url );
01695
01696 void init( KHTMLView *view, GUIProfile prof );
01697
01698
01699 void clear();
01700
01701 QVariant crossFrameExecuteScript(const QString& target, const QString& script);
01702
01703 bool requestFrame( DOM::HTMLPartContainerElementImpl *frame, const QString &url, const QString &frameName,
01704 const QStringList &args = QStringList(), bool isIFrame = false );
01705
01713 QString requestFrameName();
01714
01715 bool requestObject( DOM::HTMLPartContainerElementImpl *frame, const QString &url, const QString &serviceType,
01716 const QStringList &args = QStringList() );
01717
01718 bool requestObject( khtml::ChildFrame *child, const KUrl &url,
01719 const KParts::OpenUrlArguments &args = KParts::OpenUrlArguments(),
01720 const KParts::BrowserArguments& browserArgs = KParts::BrowserArguments() );
01721
01722
01723 void childLoadFailure( khtml::ChildFrame *child );
01724
01725 DOM::EventListener *createHTMLEventListener( QString code, QString name, DOM::NodeImpl *node, bool svg = false );
01726
01727 DOM::HTMLDocumentImpl *docImpl() const;
01728 DOM::DocumentImpl *xmlDocImpl() const;
01729 khtml::ChildFrame *frame( const QObject *obj );
01730
01731 khtml::ChildFrame *recursiveFrameRequest( KHTMLPart *callingHtmlPart, const KUrl &url,
01732 const KParts::OpenUrlArguments& args, const KParts::BrowserArguments &browserArgs,
01733 bool callParent = true );
01734
01735 bool checkLinkSecurity( const KUrl &linkURL,const KLocalizedString &message = KLocalizedString(), const QString &button = QString() );
01736 QVariant executeScript( const QString& filename, int baseLine, const DOM::Node &n, const QString& script );
01737
01738 KJSProxy *jScript();
01739
01740 KHTMLPart *opener();
01741 long cacheId() const;
01742 void setOpener( KHTMLPart *_opener );
01743 bool openedByJS();
01744 void setOpenedByJS( bool _openedByJS );
01745
01746 void checkEmitLoadEvent();
01747 void emitLoadEvent();
01748
01749 bool initFindNode( bool selection, bool reverse, bool fromCursor );
01750
01760 void extendSelectionTo(int x, int y, const DOM::Node &innerNode);
01764 bool isExtendingSelection() const;
01765 KEncodingDetector *createDecoder();
01766 QString defaultEncoding() const;
01767
01769 QString defaultExtension() const;
01770
01774 void zoomIn(const int stepping[], int count);
01778 void zoomOut(const int stepping[], int count);
01779
01780 void incFontSize(const int stepping[], int count);
01781
01782 void decFontSize(const int stepping[], int count);
01783
01784 void emitCaretPositionChanged(const DOM::Position &pos);
01785
01786 void setDebugScript( bool enable );
01787
01788 void runAdFilter();
01789
01790 khtml::EditorContext *editorContext() const;
01791
01796 void initCaret();
01797
01801 const DOM::Selection &caret() const;
01802
01806 const DOM::Selection &dragCaret() const;
01807
01811 void setCaret(const DOM::Selection &, bool closeTyping=true);
01812
01816 void setDragCaret(const DOM::Selection &);
01817
01821 void clearSelection();
01822
01826 void invalidateSelection();
01827
01831 void setSelectionVisible(bool flag=true);
01832
01836 void paintCaret(QPainter *p, const QRect &rect) const;
01837
01841 void paintDragCaret(QPainter *p, const QRect &rect) const;
01842
01850 QString simplifiedSelectedText() const;
01851
01852 bool handleMouseMoveEventDrag(khtml::MouseMoveEvent *event);
01853 bool handleMouseMoveEventOver(khtml::MouseMoveEvent *event);
01854 void handleMouseMoveEventSelection(khtml::MouseMoveEvent *event);
01855
01856 void handleMousePressEventSingleClick(khtml::MousePressEvent *event);
01857 void handleMousePressEventDoubleClick(khtml::MouseDoubleClickEvent *event);
01858 void handleMousePressEventTripleClick(khtml::MouseDoubleClickEvent *event);
01859
01860 KHTMLPartPrivate *d;
01861 friend class KHTMLPartPrivate;
01862 };
01863
01864
01865 #endif