2 * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
14 * its contributors may be used to endorse or promote products derived
15 * from this software without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #import <Cocoa/Cocoa.h>
31 @class DOMCSSStyleDeclaration;
38 @class WebBackForwardList;
42 @class WebHistoryItem;
43 @class WebPreferences;
44 @class WebScriptObject;
45 @class WebViewPrivate;
47 // Element dictionary keys
48 extern NSString *WebElementDOMNodeKey; // DOMNode of the element
49 extern NSString *WebElementFrameKey; // WebFrame of the element
50 extern NSString *WebElementImageAltStringKey; // NSString of the ALT attribute of the image element
51 extern NSString *WebElementImageKey; // NSImage of the image element
52 extern NSString *WebElementImageRectKey; // NSValue of an NSRect, the rect of the image element
53 extern NSString *WebElementImageURLKey; // NSURL of the image element
54 extern NSString *WebElementIsSelectedKey; // NSNumber of BOOL indicating whether the element is selected or not
55 extern NSString *WebElementLinkURLKey; // NSURL of the link if the element is within an anchor
56 extern NSString *WebElementLinkTargetFrameKey; // WebFrame of the target of the anchor
57 extern NSString *WebElementLinkTitleKey; // NSString of the title of the anchor
58 extern NSString *WebElementLinkLabelKey; // NSString of the text within the anchor
61 @discussion Notifications sent by WebView to mark the progress of loads.
62 @constant WebViewProgressStartedNotification Posted whenever a load begins in the WebView, including
63 a load that is initiated in a subframe. After receiving this notification zero or more
64 WebViewProgressEstimateChangedNotifications will be sent. The userInfo will be nil.
65 @constant WebViewProgressEstimateChangedNotification Posted whenever the value of
66 estimatedProgress changes. The userInfo will be nil.
67 @constant WebViewProgressFinishedNotification Posted when the load for a WebView has finished.
68 The userInfo will be nil.
70 extern NSString *WebViewProgressStartedNotification;
71 extern NSString *WebViewProgressEstimateChangedNotification;
72 extern NSString *WebViewProgressFinishedNotification;
76 WebView manages the interaction between WebFrameViews and WebDataSources. Modification
77 of the policies and behavior of the WebKit is largely managed by WebViews and their
87 webView = [[WebView alloc] initWithFrame: NSMakeRect (0,0,640,480)];
88 mainFrame = [webView mainFrame];
89 [mainFrame loadRequest:request];
92 WebViews have the following delegates: WebUIDelegate, WebResourceLoadDelegate,
93 WebFrameLoadDelegate, and WebPolicyDelegate.
95 WebKit depends on the WebView's WebUIDelegate for all window
96 related management, including opening new windows and controlling the user interface
97 elements in those windows.
99 WebResourceLoadDelegate is used to monitor the progress of resources as they are
100 loaded. This delegate may be used to present users with a progress monitor.
102 The WebFrameLoadDelegate receives messages when the URL in a WebFrame is
105 WebView's WebPolicyDelegate can make determinations about how
106 content should be handled, based on the resource's URL and MIME type.
108 @interface WebView : NSView
111 WebViewPrivate *_private;
115 @method canShowMIMEType:
116 @abstract Checks if the WebKit can show content of a certain MIME type.
117 @param MIMEType The MIME type to check.
118 @result YES if the WebKit can show content with MIMEtype.
120 + (BOOL)canShowMIMEType:(NSString *)MIMEType;
124 @method canShowMIMETypeAsHTML:
125 @abstract Checks if the the MIME type is a type that the WebKit will interpret as HTML.
126 @param MIMEType The MIME type to check.
127 @result YES if the MIMEtype in an HTML type.
129 + (BOOL)canShowMIMETypeAsHTML:(NSString *)MIMEType;
132 @method MIMETypesShownAsHTML
133 @result Returns an array of NSStrings that describe the MIME types
134 WebKit will attempt to render as HTML.
136 + (NSArray *)MIMETypesShownAsHTML;
139 @method setMIMETypesShownAsHTML:
140 @discussion Sets the array of NSString MIME types that WebKit will
141 attempt to render as HTML. Typically you will retrieve the built-in
142 array using MIMETypesShownAsHTML and add additional MIME types to that
145 + (void)setMIMETypesShownAsHTML:(NSArray *)MIMETypes;
148 @method URLFromPasteboard:
149 @abstract Returns a URL from a pasteboard
150 @param pasteboard The pasteboard with a URL
151 @result A URL if the pasteboard has one. Nil if it does not.
152 @discussion This method differs than NSURL's URLFromPasteboard method in that it tries multiple pasteboard types
153 including NSURLPboardType to find a URL on the pasteboard.
155 + (NSURL *)URLFromPasteboard:(NSPasteboard *)pasteboard;
158 @method URLTitleFromPasteboard:
159 @abstract Returns a URL title from a pasteboard
160 @param pasteboard The pasteboard with a URL title
161 @result A URL title if the pasteboard has one. Nil if it does not.
162 @discussion This method returns a title that refers a URL on the pasteboard. An example of this is the link label
163 which is the text inside the anchor tag.
165 + (NSString *)URLTitleFromPasteboard:(NSPasteboard *)pasteboard;
168 @method registerURLSchemeAsLocal:
169 @abstract Adds the scheme to the list of schemes to be treated as local.
170 @param scheme The scheme to register
172 + (void)registerURLSchemeAsLocal:(NSString *)scheme;
175 @method initWithFrame:frameName:groupName:
176 @abstract The designated initializer for WebView.
177 @discussion Initialize a WebView with the supplied parameters. This method will
178 create a main WebFrame with the view. Passing a top level frame name is useful if you
179 handle a targetted frame navigation that would normally open a window in some other
180 way that still ends up creating a new WebView.
181 @param frame The frame used to create the view.
182 @param frameName The name to use for the top level frame. May be nil.
183 @param groupName The name of the webView set to which this webView will be added. May be nil.
184 @result Returns an initialized WebView.
186 - (id)initWithFrame:(NSRect)frame frameName:(NSString *)frameName groupName:(NSString *)groupName;
190 @abstract Closes the receiver, unloading its web page and canceling any pending loads.
191 Once the receiver has closed, it will no longer respond to requests or fire delegate methods.
192 (However, the -close method itself may fire delegate methods.)
193 @discussion A garbage collected application is required to call close when the receiver is no longer needed.
194 The close method will be called automatically when the window or hostWindow closes and shouldCloseWithWindow returns YES.
195 A non-garbage collected application can still call close, providing a convenient way to prevent receiver
196 from doing any more loading and firing any future delegate methods.
201 @method setShouldCloseWithWindow:
202 @abstract Set whether the receiver closes when either it's window or hostWindow closes.
203 @param close YES if the receiver should close when either it's window or hostWindow closes, otherwise NO.
205 - (void)setShouldCloseWithWindow:(BOOL)close;
208 @method shouldCloseWithWindow
209 @abstract Returns whether the receiver closes when either it's window or hostWindow closes.
210 @discussion Defaults to YES in garbage collected applications, otherwise NO to maintain backwards compatibility.
211 @result YES if the receiver closes when either it's window or hostWindow closes, otherwise NO.
213 - (BOOL)shouldCloseWithWindow;
216 @method setUIDelegate:
217 @abstract Set the WebView's WebUIDelegate.
218 @param delegate The WebUIDelegate to set as the delegate.
220 - (void)setUIDelegate:(id)delegate;
224 @abstract Return the WebView's WebUIDelegate.
225 @result The WebView's WebUIDelegate.
230 @method setResourceLoadDelegate:
231 @abstract Set the WebView's WebResourceLoadDelegate load delegate.
232 @param delegate The WebResourceLoadDelegate to set as the load delegate.
234 - (void)setResourceLoadDelegate:(id)delegate;
237 @method resourceLoadDelegate
238 @result Return the WebView's WebResourceLoadDelegate.
240 - (id)resourceLoadDelegate;
243 @method setDownloadDelegate:
244 @abstract Set the WebView's WebDownloadDelegate.
245 @discussion The download delegate is retained by WebDownload when any downloads are in progress.
246 @param delegate The WebDownloadDelegate to set as the download delegate.
248 - (void)setDownloadDelegate:(id)delegate;
251 @method downloadDelegate
252 @abstract Return the WebView's WebDownloadDelegate.
253 @result The WebView's WebDownloadDelegate.
255 - (id)downloadDelegate;
258 @method setFrameLoadDelegate:
259 @abstract Set the WebView's WebFrameLoadDelegate delegate.
260 @param delegate The WebFrameLoadDelegate to set as the delegate.
262 - (void)setFrameLoadDelegate:(id)delegate;
265 @method frameLoadDelegate
266 @abstract Return the WebView's WebFrameLoadDelegate delegate.
267 @result The WebView's WebFrameLoadDelegate delegate.
269 - (id)frameLoadDelegate;
272 @method setPolicyDelegate:
273 @abstract Set the WebView's WebPolicyDelegate delegate.
274 @param delegate The WebPolicyDelegate to set as the delegate.
276 - (void)setPolicyDelegate:(id)delegate;
279 @method policyDelegate
280 @abstract Return the WebView's WebPolicyDelegate.
281 @result The WebView's WebPolicyDelegate.
283 - (id)policyDelegate;
287 @abstract Return the top level frame.
288 @discussion Note that even document that are not framesets will have a
290 @result The main frame.
292 - (WebFrame *)mainFrame;
295 @method selectedFrame
296 @abstract Return the frame that has the active selection.
297 @discussion Returns the frame that contains the first responder, if any. Otherwise returns the
298 frame that contains a non-zero-length selection, if any. Returns nil if no frame meets these criteria.
299 @result The selected frame.
301 - (WebFrame *)selectedFrame;
304 @method backForwardList
305 @result The backforward list for this webView.
307 - (WebBackForwardList *)backForwardList;
310 @method setMaintainsBackForwardList:
311 @abstract Enable or disable the use of a backforward list for this webView.
312 @param flag Turns use of the back forward list on or off
314 - (void)setMaintainsBackForwardList:(BOOL)flag;
318 @abstract Go back to the previous URL in the backforward list.
319 @result YES if able to go back in the backforward list, NO otherwise.
325 @abstract Go forward to the next URL in the backforward list.
326 @result YES if able to go forward in the backforward list, NO otherwise.
331 @method goToBackForwardItem:
332 @abstract Go back or forward to an item in the backforward list.
333 @result YES if able to go to the item, NO otherwise.
335 - (BOOL)goToBackForwardItem:(WebHistoryItem *)item;
338 @method setTextSizeMultiplier:
339 @abstract Change the size of the text rendering in views managed by this webView.
340 @param multiplier A fractional percentage value, 1.0 is 100%.
342 - (void)setTextSizeMultiplier:(float)multiplier;
345 @method textSizeMultiplier
346 @result The text size multipler.
348 - (float)textSizeMultiplier;
351 @method setApplicationNameForUserAgent:
352 @abstract Set the application name.
353 @discussion This name will be used in user-agent strings
354 that are chosen for best results in rendering web pages.
355 @param applicationName The application name
357 - (void)setApplicationNameForUserAgent:(NSString *)applicationName;
360 @method applicationNameForUserAgent
361 @result The name of the application as used in the user-agent string.
363 - (NSString *)applicationNameForUserAgent;
366 @method setCustomUserAgent:
367 @abstract Set the user agent.
368 @discussion Setting this means that the webView should use this user-agent string
369 instead of constructing a user-agent string for each URL. Setting it to nil
370 causes the webView to construct the user-agent string for each URL
371 for best results rendering web pages.
372 @param userAgentString The user agent description
374 - (void)setCustomUserAgent:(NSString *)userAgentString;
377 @method customUserAgent
378 @result The custom user-agent string or nil if no custom user-agent string has been set.
380 - (NSString *)customUserAgent;
383 @method userAgentForURL:
384 @abstract Get the appropriate user-agent string for a particular URL.
386 @result The user-agent string for the supplied URL.
388 - (NSString *)userAgentForURL:(NSURL *)URL;
392 @method supportsTextEncoding
393 @abstract Find out if the current web page supports text encodings.
394 @result YES if the document view of the current web page can
395 support different text encodings.
397 - (BOOL)supportsTextEncoding;
400 @method setCustomTextEncodingName:
401 @discussion Make the page display with a different text encoding; stops any load in progress.
402 The text encoding passed in overrides the normal text encoding smarts including
403 what's specified in a web page's header or HTTP response.
404 The text encoding automatically goes back to the default when the top level frame
405 changes to a new location.
406 Setting the text encoding name to nil makes the webView use default encoding rules.
407 @param encoding The text encoding name to use to display a page or nil.
409 - (void)setCustomTextEncodingName:(NSString *)encodingName;
412 @method customTextEncodingName
413 @result The custom text encoding name or nil if no custom text encoding name has been set.
415 - (NSString *)customTextEncodingName;
418 @method setMediaStyle:
419 @discussion Set the media style for the WebView. The mediaStyle will override the normal value
420 of the CSS media property. Setting the value to nil will restore the normal value.
421 @param mediaStyle The value to use for the CSS media property.
423 - (void)setMediaStyle:(NSString *)mediaStyle;
427 @result mediaStyle The value to use for the CSS media property, as set by setMediaStyle:. It
428 will be nil unless set by that method.
430 - (NSString *)mediaStyle;
433 @method stringByEvaluatingJavaScriptFromString:
434 @param script The text of the JavaScript.
435 @result The result of the script, converted to a string, or nil for failure.
437 - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script;
440 @method windowScriptObject
441 @discussion windowScriptObject return a WebScriptObject that represents the
442 window object from the script environment.
443 @result Returns the window object from the script environment.
445 - (WebScriptObject *)windowScriptObject;
448 @method setPreferences:
449 @param preferences The preferences to use for the webView.
450 @abstract Override the standard setting for the webView.
452 - (void)setPreferences: (WebPreferences *)prefs;
456 @result Returns the preferences used by this webView.
457 @discussion This method will return [WebPreferences standardPreferences] if no
458 other instance of WebPreferences has been set.
460 - (WebPreferences *)preferences;
463 @method setPreferencesIdentifier:
464 @param anIdentifier The string to use a prefix for storing values for this WebView in the user
466 @discussion If the WebPreferences for this WebView are stored in the user defaults database, the
467 string set in this method will be used a key prefix.
469 - (void)setPreferencesIdentifier:(NSString *)anIdentifier;
472 @method preferencesIdentifier
473 @result Returns the WebPreferences key prefix.
475 - (NSString *)preferencesIdentifier;
479 @method setHostWindow:
480 @param hostWindow The host window for the web view.
481 @discussion Parts of WebKit (such as plug-ins and JavaScript) depend on a window to function
482 properly. Set a host window so these parts continue to function even when the web view is
483 not in an actual window.
485 - (void)setHostWindow:(NSWindow *)hostWindow;
489 @result The host window for the web view.
491 - (NSWindow *)hostWindow;
494 @method searchFor:direction:caseSensitive:
495 @abstract Searches a document view for a string and highlights the string if it is found.
496 Starts the search from the current selection. Will search across all frames.
497 @param string The string to search for.
498 @param forward YES to search forward, NO to seach backwards.
499 @param caseFlag YES to for case-sensitive search, NO for case-insensitive search.
500 @result YES if found, NO if not found.
502 - (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag;
505 @method registerViewClass:representationClass:forMIMEType:
506 @discussion Register classes that implement WebDocumentView and WebDocumentRepresentation respectively.
507 A document class may register for a primary MIME type by excluding
508 a subtype, i.e. "video/" will match the document class with
509 all video types. More specific matching takes precedence
510 over general matching.
511 @param viewClass The WebDocumentView class to use to render data for a given MIME type.
512 @param representationClass The WebDocumentRepresentation class to use to represent data of the given MIME type.
513 @param MIMEType The MIME type to represent with an object of the given class.
515 + (void)registerViewClass:(Class)viewClass representationClass:(Class)representationClass forMIMEType:(NSString *)MIMEType;
519 @method setGroupName:
520 @param groupName The name of the group for this WebView.
521 @discussion JavaScript may access named frames within the same group.
523 - (void)setGroupName:(NSString *)groupName;
527 @discussion The group name for this WebView.
529 - (NSString *)groupName;
532 @method estimatedProgress
533 @discussion An estimate of the percent complete for a document load. This
534 value will range from 0 to 1.0 and, once a load completes, will remain at 1.0
535 until a new load starts, at which point it will be reset to 0. The value is an
536 estimate based on the total number of bytes expected to be received
537 for a document, including all it's possible subresources. For more accurate progress
538 indication it is recommended that you implement a WebFrameLoadDelegate and a
539 WebResourceLoadDelegate.
541 - (double)estimatedProgress;
545 @discussion Returns YES if there are any pending loads.
550 @method elementAtPoint:
551 @param point A point in the coordinates of the WebView
552 @result An element dictionary describing the point
554 - (NSDictionary *)elementAtPoint:(NSPoint)point;
557 @method pasteboardTypesForSelection
558 @abstract Returns the pasteboard types that WebView can use for the current selection
560 - (NSArray *)pasteboardTypesForSelection;
563 @method writeSelectionWithPasteboardTypes:toPasteboard:
564 @abstract Writes the current selection to the pasteboard
565 @param types The types that WebView will write to the pasteboard
566 @param pasteboard The pasteboard to write to
568 - (void)writeSelectionWithPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard;
571 @method pasteboardTypesForElement:
572 @abstract Returns the pasteboard types that WebView can use for an element
573 @param element The element
575 - (NSArray *)pasteboardTypesForElement:(NSDictionary *)element;
578 @method writeElement:withPasteboardTypes:toPasteboard:
579 @abstract Writes an element to the pasteboard
580 @param element The element to write to the pasteboard
581 @param types The types that WebView will write to the pasteboard
582 @param pasteboard The pasteboard to write to
584 - (void)writeElement:(NSDictionary *)element withPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard;
587 @method moveDragCaretToPoint:
588 @param point A point in the coordinates of the WebView
589 @discussion This method moves the caret that shows where something being dragged will be dropped. It may cause the WebView to scroll
590 to make the new position of the drag caret visible.
592 - (void)moveDragCaretToPoint:(NSPoint)point;
595 @method removeDragCaret
596 @abstract Removes the drag caret from the WebView
598 - (void)removeDragCaret;
601 @method setDrawsBackground:
602 @param drawsBackround YES to cause the receiver to draw a default white background, NO otherwise.
603 @abstract Sets whether the receiver draws a default white background when the loaded page has no background specified.
605 - (void)setDrawsBackground:(BOOL)drawsBackround;
608 @method drawsBackground
609 @result Returns YES if the receiver draws a default white background, NO otherwise.
611 - (BOOL)drawsBackground;
614 @method setShouldUpdateWhileOffscreen:
615 @abstract Sets whether the receiver must update even when it is not in a window that is currently visible.
616 @param updateWhileOffscreen whether the receiver is required to render updates to the web page when it is not in a visible window.
617 @abstract If set to NO, then whenever the web view is not in a visible window, updates to the web page will not necessarily be rendered in the view.
618 However, when the window is made visible, the view will be updated automatically. Not updating while hidden can improve performance. If set to is YES,
619 hidden web views are always updated. This is the default.
621 - (void)setShouldUpdateWhileOffscreen:(BOOL)updateWhileOffscreen;
624 @method shouldUpdateWhileOffscreen
625 @result Returns whether the web view is always updated even when it is not in a window that is currently visible.
627 - (BOOL)shouldUpdateWhileOffscreen;
630 @method setMainFrameURL:
631 @param URLString The URL to load in the mainFrame.
633 - (void)setMainFrameURL:(NSString *)URLString;
637 @result Returns the main frame's current URL.
639 - (NSString *)mainFrameURL;
642 @method mainFrameDocument
643 @result Returns the main frame's DOMDocument.
645 - (DOMDocument *)mainFrameDocument;
648 @method mainFrameTitle
649 @result Returns the main frame's title if any, otherwise an empty string.
651 - (NSString *)mainFrameTitle;
654 @method mainFrameIcon
655 @discussion The methods returns the site icon for the current page loaded in the mainFrame.
656 @result Returns the main frame's icon if any, otherwise nil.
658 - (NSImage *)mainFrameIcon;
663 @interface WebView (WebIBActions) <NSUserInterfaceValidations>
664 - (IBAction)takeStringURLFrom:(id)sender;
665 - (IBAction)stopLoading:(id)sender;
666 - (IBAction)reload:(id)sender;
667 - (IBAction)reloadFromOrigin:(id)sender;
669 - (IBAction)goBack:(id)sender;
670 - (BOOL)canGoForward;
671 - (IBAction)goForward:(id)sender;
672 - (BOOL)canMakeTextLarger;
673 - (IBAction)makeTextLarger:(id)sender;
674 - (BOOL)canMakeTextSmaller;
675 - (IBAction)makeTextSmaller:(id)sender;
676 - (BOOL)canMakeTextStandardSize;
677 - (IBAction)makeTextStandardSize:(id)sender;
678 - (IBAction)toggleContinuousSpellChecking:(id)sender;
679 - (IBAction)toggleSmartInsertDelete:(id)sender;
683 // WebView editing support
685 extern NSString * const WebViewDidBeginEditingNotification;
686 extern NSString * const WebViewDidChangeNotification;
687 extern NSString * const WebViewDidEndEditingNotification;
688 extern NSString * const WebViewDidChangeTypingStyleNotification;
689 extern NSString * const WebViewDidChangeSelectionNotification;
691 @interface WebView (WebViewCSS)
692 - (DOMCSSStyleDeclaration *)computedStyleForElement:(DOMElement *)element pseudoElement:(NSString *)pseudoElement;
695 @interface WebView (WebViewEditing)
696 - (DOMRange *)editableDOMRangeForPoint:(NSPoint)point;
697 - (void)setSelectedDOMRange:(DOMRange *)range affinity:(NSSelectionAffinity)selectionAffinity;
698 - (DOMRange *)selectedDOMRange;
699 - (NSSelectionAffinity)selectionAffinity;
700 - (BOOL)maintainsInactiveSelection;
701 - (void)setEditable:(BOOL)flag;
703 - (void)setTypingStyle:(DOMCSSStyleDeclaration *)style;
704 - (DOMCSSStyleDeclaration *)typingStyle;
705 - (void)setSmartInsertDeleteEnabled:(BOOL)flag;
706 - (BOOL)smartInsertDeleteEnabled;
707 - (void)setContinuousSpellCheckingEnabled:(BOOL)flag;
708 - (BOOL)isContinuousSpellCheckingEnabled;
709 - (NSInteger)spellCheckerDocumentTag;
710 - (NSUndoManager *)undoManager;
711 - (void)setEditingDelegate:(id)delegate;
712 - (id)editingDelegate;
713 - (DOMCSSStyleDeclaration *)styleDeclarationWithText:(NSString *)text;
716 @interface WebView (WebViewUndoableEditing)
717 - (void)replaceSelectionWithNode:(DOMNode *)node;
718 - (void)replaceSelectionWithText:(NSString *)text;
719 - (void)replaceSelectionWithMarkupString:(NSString *)markupString;
720 - (void)replaceSelectionWithArchive:(WebArchive *)archive;
721 - (void)deleteSelection;
722 - (void)applyStyle:(DOMCSSStyleDeclaration *)style;
725 @interface WebView (WebViewEditingActions)
727 - (void)copy:(id)sender;
728 - (void)cut:(id)sender;
729 - (void)paste:(id)sender;
730 - (void)copyFont:(id)sender;
731 - (void)pasteFont:(id)sender;
732 - (void)delete:(id)sender;
733 - (void)pasteAsPlainText:(id)sender;
734 - (void)pasteAsRichText:(id)sender;
736 - (void)changeFont:(id)sender;
737 - (void)changeAttributes:(id)sender;
738 - (void)changeDocumentBackgroundColor:(id)sender;
739 - (void)changeColor:(id)sender;
741 - (void)alignCenter:(id)sender;
742 - (void)alignJustified:(id)sender;
743 - (void)alignLeft:(id)sender;
744 - (void)alignRight:(id)sender;
746 - (void)checkSpelling:(id)sender;
747 - (void)showGuessPanel:(id)sender;
748 - (void)performFindPanelAction:(id)sender;
750 - (void)startSpeaking:(id)sender;
751 - (void)stopSpeaking:(id)sender;
753 - (void)moveToBeginningOfSentence:(id)sender;
754 - (void)moveToBeginningOfSentenceAndModifySelection:(id)sender;
755 - (void)moveToEndOfSentence:(id)sender;
756 - (void)moveToEndOfSentenceAndModifySelection:(id)sender;
757 - (void)selectSentence:(id)sender;
760 The following methods are declared in NSResponder.h.
761 WebView overrides each method in this list, providing
762 a custom implementation for each.
764 - (void)capitalizeWord:(id)sender;
765 - (void)centerSelectionInVisibleArea:(id)sender;
766 - (void)changeCaseOfLetter:(id)sender;
767 - (void)complete:(id)sender;
768 - (void)deleteBackward:(id)sender;
769 - (void)deleteBackwardByDecomposingPreviousCharacter:(id)sender;
770 - (void)deleteForward:(id)sender;
771 - (void)deleteToBeginningOfLine:(id)sender;
772 - (void)deleteToBeginningOfParagraph:(id)sender;
773 - (void)deleteToEndOfLine:(id)sender;
774 - (void)deleteToEndOfParagraph:(id)sender;
775 - (void)deleteWordBackward:(id)sender;
776 - (void)deleteWordForward:(id)sender;
777 - (void)indent:(id)sender;
778 - (void)insertBacktab:(id)sender;
779 - (void)insertNewline:(id)sender;
780 - (void)insertParagraphSeparator:(id)sender;
781 - (void)insertTab:(id)sender;
782 - (void)lowercaseWord:(id)sender;
783 - (void)moveBackward:(id)sender;
784 - (void)moveBackwardAndModifySelection:(id)sender;
785 - (void)moveDown:(id)sender;
786 - (void)moveDownAndModifySelection:(id)sender;
787 - (void)moveForward:(id)sender;
788 - (void)moveForwardAndModifySelection:(id)sender;
789 - (void)moveLeft:(id)sender;
790 - (void)moveLeftAndModifySelection:(id)sender;
791 - (void)moveRight:(id)sender;
792 - (void)moveRightAndModifySelection:(id)sender;
793 - (void)moveToBeginningOfDocument:(id)sender;
794 - (void)moveToBeginningOfDocumentAndModifySelection:(id)sender;
795 - (void)moveToBeginningOfLine:(id)sender;
796 - (void)moveToBeginningOfLineAndModifySelection:(id)sender;
797 - (void)moveToBeginningOfParagraph:(id)sender;
798 - (void)moveToBeginningOfParagraphAndModifySelection:(id)sender;
799 - (void)moveToEndOfDocument:(id)sender;
800 - (void)moveToEndOfDocumentAndModifySelection:(id)sender;
801 - (void)moveToEndOfLine:(id)sender;
802 - (void)moveToEndOfLineAndModifySelection:(id)sender;
803 - (void)moveToEndOfParagraph:(id)sender;
804 - (void)moveToEndOfParagraphAndModifySelection:(id)sender;
805 - (void)moveUp:(id)sender;
806 - (void)moveUpAndModifySelection:(id)sender;
807 - (void)moveWordBackward:(id)sender;
808 - (void)moveWordBackwardAndModifySelection:(id)sender;
809 - (void)moveWordForward:(id)sender;
810 - (void)moveWordForwardAndModifySelection:(id)sender;
811 - (void)moveWordLeft:(id)sender;
812 - (void)moveWordLeftAndModifySelection:(id)sender;
813 - (void)moveWordRight:(id)sender;
814 - (void)moveWordRightAndModifySelection:(id)sender;
815 - (void)pageDown:(id)sender;
816 - (void)pageUp:(id)sender;
817 - (void)scrollLineDown:(id)sender;
818 - (void)scrollLineUp:(id)sender;
819 - (void)scrollPageDown:(id)sender;
820 - (void)scrollPageUp:(id)sender;
821 - (void)selectAll:(id)sender;
822 - (void)selectLine:(id)sender;
823 - (void)selectParagraph:(id)sender;
824 - (void)selectWord:(id)sender;
825 - (void)uppercaseWord:(id)sender;