WebUIDelegate Protocol Reference
(informal protocol)
| Framework | /System/Library/Frameworks/WebKit.framework |
| Availability | Available in OS X v10.2 with Safari 1.0 and later. Available in OS X v10.2.7 and later. |
| Companion guide | |
| Declared in | WebUIDelegate.h |
Overview
Web view user interface delegates implement this informal protocol to control the opening of new windows, augment the behavior of default menu items displayed when the user clicks elements, and perform other user interface–related tasks. These methods can be invoked as a result of handling JavaScript or other plug-in content. Delegates that display more than one web view per window, for example, need to implement some of these methods to handle that case. The default implementation assumes one window per web view, so non-conventional user interfaces might implement a user interface delegate.
Tasks
Creating and Closing Windows
-
– webView:createWebViewModalDialogWithRequest: -
– webViewRunModal: -
– webView:createWebViewWithRequest: -
– webViewClose:
Moving and Resizing Windows
Moving and Resizing Content Views
-
– webView:setContentRect:Deprecated in OS X v10.4.11 -
– webViewContentRect:Deprecated in OS X v10.4.11
Making Windows Key and Main
Ordering Windows
Working with the Responder Chain
Handling Mouse Events
-
– webView:mouseDidMoveOverElement:modifierFlags: -
– webView:contextMenuItemsForElement:defaultMenuItems:
Opening Panels
-
– webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame: -
– webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame: -
– webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame: -
– webView:runOpenPanelForFileButtonWithResultListener: -
– webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles: -
– webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame: -
– webView:runJavaScriptAlertPanelWithMessage:Deprecated in OS X v10.4.11 -
– webView:runJavaScriptConfirmPanelWithMessage:Deprecated in OS X v10.4.11 -
– webView:runJavaScriptTextInputPanelWithPrompt:defaultText:Deprecated in OS X v10.4.11
Displaying Status Messages
Managing Toolbars and the Status Bar
-
– webViewAreToolbarsVisible: -
– webView:setToolbarsVisible: -
– webViewIsStatusBarVisible: -
– webView:setStatusBarVisible:
Controlling Drag Behavior
-
– webView:dragDestinationActionMaskForDraggingInfo: -
– webView:dragSourceActionMaskForPoint: -
– webView:willPerformDragDestinationAction:forDraggingInfo: -
– webView:willPerformDragSourceAction:fromPoint:withPasteboard:
Controlling Other Behaviors
Printing
Instance Methods
webView:contextMenuItemsForElement:defaultMenuItems:
Returns menu items to display in an element's contextual menu.
Parameters
- sender
The web view that sent the message.
- element
A dictionary that describes the element that was clicked. See “Constants” in WebView Class Reference for information about the key-value pairs in this dictionary.
- defaultMenuItems
The menu items included by default in the element’s contextual menu. See “Menu Item Tags” for values you can use to differentiate among specific menu items.
Return Value
An array of menu items to display in the element’s contextual menu.
Discussion
This method is invoked every time the user clicks the right mouse button, or control-clicks, on an element to reveal a contextual menu. The receiver typically returns a modified copy of the default menu items dictionary, adding and removing menu items as appropriate for this type of element. You can use this mechanism to remove items that are not appropriate for a particular environment or task, such as saving files to the desktop in a web kiosk. You do not need to set the actions and targets of the default items.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
Declared In
WebUIDelegate.hwebView:createWebViewModalDialogWithRequest:
Creates a modal window containing a web view that loads the specified request.
Parameters
- sender
The web view that sent the message.
- request
The request to load.
Return Value
The web view that is loading the specified request.
Discussion
This method is invoked when JavaScript calls window.showModalDialog. It should create a new modal window containing the web view and initially hide the window. The webViewRunModal: message is sent to the delegate to display the web view.
Availability
- Available in OS X v10.4.11 and later.
Declared In
WebUIDelegate.hwebView:createWebViewWithRequest:
Creates a window containing a web view to load the specified request.
Parameters
- sender
The web view that sent the message.
- request
The request to load.
Return Value
The web view that is loading the request.
Discussion
This method should begin loading the content for the specified request by sending loadRequest: to its main frame. The new window should initially be hidden. Later, a webViewShow: message is sent to the delegate of the new web view. By default, this method returns nil.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
Declared In
WebUIDelegate.hwebView:dragDestinationActionMaskForDraggingInfo:
Returns a mask indicating which drag operations are allowed by the sender.
Parameters
- sender
The web view that sent the message.
- draggingInfo
The information object for the dragging operation.
Return Value
A mask that indicates which drag operations are allowed when content is dragged over the sending web view. (Note that the return value changed from an unsigned int to an NSUInteger in OS X v10.5.) See “Drag-Destination Actions” for a list of return values.
Discussion
This method can be invoked multiple times while content is dragged over the sending web view. When the content is dropped, the web view sends a notification (webView:willPerformDragDestinationAction:forDraggingInfo:) to the receiver.
If you do not implement this method, it returns WebDragDestinationActionAny by default.
Availability
- Available in OS X v10.3.9 and later.
Declared In
WebUIDelegate.hwebView:dragSourceActionMaskForPoint:
Returns a mask indicating which drag-source actions are allowed for a drag that begins at the specified location.
Parameters
- sender
The web view that sent the message.
- point
The point at which the drag began, specified in the coordinates of the web view.
Return Value
A mask indicating which drag-source actions are allowed. (Note that the return value changed from an unsigned int to an NSUInteger in OS X v10.5.) See “Drag-Source Actions” for a list of return values.
Discussion
This method is called after the user has begun a drag from a point in a web view. This method can be invoked multiple times while content is dragged from the sending web view. When the content is dropped, the sender sends webView:willPerformDragSourceAction:fromPoint:withPasteboard: to the receiver.
If you do not implement this method, it returns (WebDragSourceActionAny & ~WebDragSourceActionLink) if the cursor is in an editable part of the web view; otherwise, it returns WebDragDestinationActionAny.
Availability
- Available in OS X v10.3.9 and later.
Declared In
WebUIDelegate.hwebView:drawFooterInRect:
Draws the web view’s footer in the specified rectangle.
Parameters
- sender
The web view that sent the message.
- rect
The rectangle reserved for drawing the footer.
Availability
- Available in OS X v10.4.11 and later.
See Also
Declared In
WebUIDelegate.hwebView:drawHeaderInRect:
Draws the web view’s header in the specified rectangle.
Parameters
- sender
The web view that sent the message.
- rect
The rectangle reserved for drawing the header.
Availability
- Available in OS X v10.4.11 and later.
See Also
Declared In
WebUIDelegate.hwebView:makeFirstResponder:
Sets the first responder of a web view’s window to the specified view.
Parameters
- sender
The web view that sent the message.
- responder
A view in the web view’s hierarchy.
Discussion
You can ignore this message if sender is not yet attached to a window.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebUIDelegate.hwebView:mouseDidMoveOverElement:modifierFlags:
Updates information about the element the user is mousing over.
Parameters
- sender
The web view that sent the message.
- elementInformation
A dictionary that describes the element under the mouse, or
nil. See “Constants” in WebView Class Reference for information about the key-value pairs in this dictionary.- modifierFlags
An integer bit field that indicates the modifier keys in effect during the event. See “Modifier Flags” in NSEvent Class Reference for information about possible modifiers. Note that this parameter was changed from an
unsigned intto anNSUIntegerin OS X v10.5.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
Declared In
WebUIDelegate.hwebView:printFrameView:
Prints the contents of a web frame view.
Parameters
- sender
The web view that sent the message.
- frameView
The web frame view whose contents to print.
Discussion
This method is invoked when a script or a user wants to print a webpage. Typically, the delegate implements this method to prepare the web frame view content for printing. The web frame view can handle some content without intervention by the delegate. Send the documentViewShouldHandlePrint message to the web frame view to determine if it can handle printing. If this method returns YES, then the delegate can print the content by sending the printDocumentView message to the web frame view. Otherwise, the delegate can use printOperationWithPrintInfo: to get an NSPrintOperation object to print the web frame view.
Availability
- Available in OS X v10.4.11 and later.
Declared In
WebUIDelegate.hwebView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:
Displays a confirmation panel containing the specified message before a window closes.
Parameters
- sender
The web view that sent the message.
- message
The message to display in the panel.
- frame
The web frame whose JavaScript initiated this call.
Return Value
YES if the user clicked the OK button; otherwise, NO.
Discussion
Use this method to include a message in the confirmation panel in addition to the message supplied by the webpage. The confirmation panel should contain OK and Cancel buttons.
Availability
- Available in OS X v10.4.11 and later.
Declared In
WebUIDelegate.hwebView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:
Displays a JavaScript alert panel containing the specified message.
Parameters
- sender
The web view that sent the message.
- message
The message to display in the alert panel.
- frame
The web frame whose JavaScript initiated this call.
Discussion
This method displays an alert panel when JavaScript code calls alert. Delegates should visually indicate that this panel comes from JavaScript. The panel should contain a single OK button. No action is taken if you do not implement this method.
Availability
- Available in OS X v10.4.11 and later.
Declared In
WebUIDelegate.hwebView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:
Displays a JavaScript confirmation panel with the specified message.
Parameters
- sender
The web view that sent the message.
- message
The message to display in the confirmation panel.
- frame
The web frame whose JavaScript initiated this call.
Return Value
YES if the user clicks OK; otherwise, NO.
Discussion
This method displays a confirmation panel when JavaScript code calls confirm. Delegates should visually indicate that this panel comes from JavaScript. The panel should contain an OK and a Cancel button. No action is taken if you do not implement this method.
Availability
- Available in OS X v10.4.11 and later.
Declared In
WebUIDelegate.hwebView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:
Displays a JavaScript text input panel and returns the entered text.
Parameters
- sender
The web view that sent the message.
- prompt
The message to display in the text input panel.
- defaultText
Default placeholder text to display in the text field.
- frame
The web frame whose JavaScript initiated this call.
Return Value
The text entered by the user if the user clicks OK; otherwise, nil.
Discussion
This method is used to provide an alternate text input panel when JavaScript code calls prompt. Delegates should visually indicate that this panel comes from JavaScript. The panel should contain an OK and a Cancel button, and an editable text field. If you do not implement this method, a JavaScript text input panel is displayed.
Availability
- Available in OS X v10.4.11 and later.
Declared In
WebUIDelegate.hwebView:runOpenPanelForFileButtonWithResultListener:
Displays an open panel for a file input control.
Parameters
- sender
The web view that sent the message.
- resultListener
See the WebOpenPanelResultListener protocol for how to set these values.
Discussion
This method uses a listener object to set the results of the open panel, instead of returning the value directly. This approach allows delegates to implement the open panel as a modal dialog. No action is taken if you do not implement this method.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
Declared In
WebUIDelegate.hwebView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:
Displays an open panel for a file input control.
Parameters
- sender
The web view that sent the message.
- resultListener
See the WebOpenPanelResultListener protocol for how to set these values.
- allowMultipleFiles
If
YES, the open panel should allow multiple files to be selected; otherwise, it should not.
Availability
- Available in OS X v10.6 and later.
Declared In
WebUIDelegate.hwebView:setFrame:
Sets the frame rectangle of a web view’s window to the specified frame size.
Parameters
- sender
The web view that sent the message.
- frame
The frame size.
Discussion
The sender invokes this method instead of setting the window’s frame directly, allowing delegates to augment the behavior by, for example, saving the original window size before resizing as a result of JavaScript running. If you do not implement this method, the NSWindow method setFrame:display: is sent to the window that contains sender, with YES passed as the display argument.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebUIDelegate.hwebView:setResizable:
Sets whether a web view’s window can be resized.
Parameters
- sender
The web view that sent the message.
- resizable
If
YES, the web view’s window can be resized; ifNO, the window is not resizable.
Discussion
By default, this method sets the window containing a web view to be resizable. If you display multiple web views in a window then your user interface delegate should implement this method to handle this special case. If you do not implement this method, the NSWindow method setShowsResizeIndicator: is sent to the window that contains sender.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebUIDelegate.hwebView:setStatusBarVisible:
Sets the visibility of the status bar in a web view’s window.
Parameters
- sender
The web view that sent the message.
- visible
If
YES, the delegate should display the status bar (if any); ifNO, the delegate should hide the status bar.
Discussion
No action is taken if you do not implement this method.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebUIDelegate.hwebView:setStatusText:
Sets the status message displayed by a web view’s window, if any, to the specified text.
Parameters
- sender
The web view that sent the message.
- text
The status message to display.
Discussion
The delegate receives this message when a JavaScript function in the web view explicitly sets the status text. No action is taken if you do not implement this method.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebUIDelegate.hwebView:setToolbarsVisible:
Sets whether a web view's toolbars should be visible.
Parameters
- sender
The web view that sent the message.
- visible
If
YES, all toolbars (with the exception of the status bar) are shown; otherwise, all toolbars (with the exception of the status bar) are removed.
Discussion
No action is taken if you do not implement this method.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebUIDelegate.hwebView:shouldPerformAction:fromSender:
Returns a Boolean value that indicates whether the action sent by the specified object should be performed.
Parameters
- sender
The web view that sent the message.
- action
The action to perform. See WebView Class Reference for information on actions a web view can perform.
- fromObject
The object that sent the action.
Return Value
YES if the action should be performed; otherwise, NO.
Discussion
This method allows the delegate to control the web view’s behavior when action methods are invoked. For example, if the action is copy:, the delegate can return NO to perform a copy in some other way than the default.
Availability
- Available in OS X v10.3.9 and later.
Declared In
WebUIDelegate.hwebView:validateUserInterfaceItem:defaultValidation:
Returns a Boolean value that indicates whether the specified user interface item is valid.
Parameters
- sender
The web view that sent the message.
- item
The user interface item being validated.
- defaultValidation
YESif the web view believes the user interface item is valid; otherwise,NO.
Return Value
YES if the specified user interface item is valid; otherwise, NO.
Discussion
See NSUserInterfaceValidations Protocol Reference and NSValidatedUserInterfaceItem Protocol Reference for more information about user interface validation. If you do not implement this method, the value of defaultValidation is used.
Availability
- Available in OS X v10.3.9 and later.
Declared In
WebUIDelegate.hwebView:willPerformDragDestinationAction:forDraggingInfo:
Tells the receiver that the sending web view will perform the specified drag-destination action.
Parameters
- sender
The web view that sent the message.
- action
The drag-destination action to perform. See “Drag-Destination Actions” for a list of actions.
- draggingInfo
The information object for the dragging operation.
Discussion
This method is invoked after the last invocation of the webView:dragDestinationActionMaskForDraggingInfo: method, when the dragged content is dropped and the sender is about to perform the destination action. No action is taken if you do not implement this method.
Availability
- Available in OS X v10.3.9 and later.
Declared In
WebUIDelegate.hwebView:willPerformDragSourceAction:fromPoint:withPasteboard:
Tells the receiver that the sending web view will perform the specified drag-source action.
Parameters
- sender
The web view that sent the message.
- action
The drag-source action to perform. See “Drag-Source Actions” for a list of actions.
- point
The point at which the drag began, specified in the coordinates of the web view.
- pasteboard
The drag pasteboard.
Discussion
This method is invoked after the last invocation of the webView:dragSourceActionMaskForPoint: method, when the dragged content is dropped and the sender is about to perform the drag-source action. The delegate has the opportunity to modify the contents of the object on the pasteboard before completing the drag-source action. No action is taken if you do not implement this method.
Availability
- Available in OS X v10.3.9 and later.
Declared In
WebUIDelegate.hwebViewAreToolbarsVisible:
Returns a Boolean value indicating whether any toolbars are visible in a web view's window.
Parameters
- sender
The web view that sent the message.
Return Value
YES if a web view’s window has any toolbars that are currently visible (other than the status bar); otherwise, NO.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebUIDelegate.hwebViewClose:
Closes a web view in a window.
Parameters
- sender
The web view that sent the message.
Discussion
If you display multiple web views in a window then you might want to close only sender in your implementation. By default, this method sends the close method to the NSWindow object that contains sender.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
Declared In
WebUIDelegate.hwebViewFirstResponder:
Returns the first responder of the web view’s window.
Parameters
- sender
The web view that sent the message.
Return Value
The view or subview that currently has the input focus. It can return nil or the default first responder if the sender is not attached to a window or if another view (not in the window) has the focus.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebUIDelegate.hwebViewFocus:
Brings a web view’s window to the front and makes it the active window.
Parameters
- sender
The web view that sent the message.
Discussion
By default, this method brings a web view's window into focus. If you display multiple web views in a window then you might also want to focus the input on sender, using webView:makeFirstResponder:.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebUIDelegate.hwebViewFooterHeight:
Returns the height of the web view’s printed page footer.
Parameters
- sender
The web view that sent the message.
Return Value
The height of the web view’s printed page footer. Returns 0.0 if no space is reserved for the footer.
Discussion
The height returned by this method is used to calculate the rectangle passed to the webView:drawFooterInRect: method.
Availability
- Available in OS X v10.4.11 and later.
See Also
Declared In
WebUIDelegate.hwebViewFrame:
Returns the frame rectangle of a web view’s window.
Parameters
- sender
The web view that sent the message.
Return Value
The frame rectangle of the web view’s window.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebUIDelegate.hwebViewHeaderHeight:
Returns the height of the web view’s printed page header.
Parameters
- sender
The web view that sent the message.
Return Value
The height of the web view’s printed page header. Returns 0.0 if no space is reserved for the header.
Discussion
The height returned by this method is used to calculate the rectangle passed to the webView:drawHeaderInRect: method.
Availability
- Available in OS X v10.4.11 and later.
See Also
Declared In
WebUIDelegate.hwebViewIsResizable:
Returns a Boolean value indicating whether a web view’s window can be resized.
Parameters
- sender
The web view that sent the message.
Return Value
YES if the web view’s window can be resized; otherwise, NO.
Discussion
If you display multiple web views in a window then your user interface delegate should implement this method to handle this special case.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebUIDelegate.hwebViewIsStatusBarVisible:
Returns a Boolean value indicating whether the status bar in a web view's window is visible.
Parameters
- sender
The web view that sent the message.
Return Value
YES if a web view's status bar (if any) is visible; otherwise, NO.
Discussion
If you do not implement this method, it returns NO by default.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebUIDelegate.hwebViewRunModal:
Displays a web view in a modal window.
Parameters
- sender
The web view that sent the message.
Discussion
This method should display and order front a modal window containing the specified web view. This method is invoked after the webView:createWebViewModalDialogWithRequest: method is used to create a new window.
Availability
- Available in OS X v10.4.11 and later.
Declared In
WebUIDelegate.hwebViewShow:
Displays a web view’s window and moves it to the front.
Parameters
- sender
The web view that sent the message.
Discussion
This method is typically used after a call to webView:createWebViewWithRequest:, which creates a new window. The new window is not ordered to the front (or even shown) unless you implement this method.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
Declared In
WebUIDelegate.hwebViewStatusText:
Returns the current status message from a web view's window.
Parameters
- sender
The web view that sent the message.
Return Value
The status message displayed in the web view’s window if one has been set with the webView:setStatusText: method; otherwise, nil.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebUIDelegate.hwebViewUnfocus:
Relinquishes focus on a web view’s window.
Parameters
- sender
The web view that sent the message.
Discussion
This method releases focus for the entire window. If you display multiple web views in a window, you might instead want to change the input focus to another view, using the webView:makeFirstResponder: method.
Availability
- Available in OS X v10.2 with Safari 1.0 and later.
- Available in OS X v10.2.7 and later.
See Also
Declared In
WebUIDelegate.hConstants
Menu Item Tags
Tags that define the types of default menu items passed to the webView:contextMenuItemsForElement:defaultMenuItems: method.
enum {
WebMenuItemTagOpenLinkInNewWindow = 1,
WebMenuItemTagDownloadLinkToDisk,
WebMenuItemTagCopyLinkToClipboard,
WebMenuItemTagOpenImageInNewWindow,
WebMenuItemTagDownloadImageToDisk,
WebMenuItemTagCopyImageToClipboard,
WebMenuItemTagOpenFrameInNewWindow,
WebMenuItemTagCopy,
WebMenuItemTagGoBack,
WebMenuItemTagGoForward,
WebMenuItemTagStop,
WebMenuItemTagReload,
WebMenuItemTagCut,
WebMenuItemTagPaste,
WebMenuItemTagSpellingGuess,
WebMenuItemTagNoGuessesFound,
WebMenuItemTagIgnoreSpelling,
WebMenuItemTagLearnSpelling,
WebMenuItemTagOther,
WebMenuItemTagSearchInSpotlight,
WebMenuItemTagSearchWeb,
WebMenuItemTagLookUpInDictionary,
WebMenuItemTagOpenWithDefaultApplication,
WebMenuItemPDFActualSize,
WebMenuItemPDFZoomIn,
WebMenuItemPDFZoomOut,
WebMenuItemPDFAutoSize,
WebMenuItemPDFSinglePage,
WebMenuItemPDFFacingPages,
WebMenuItemPDFContinuous,
WebMenuItemPDFNextPage,
WebMenuItemPDFPreviousPage,
};
Constants
WebMenuItemTagOpenLinkInNewWindowOpen the link in a new window.
Available in OS X v10.2 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagDownloadLinkToDiskDownload the link to a disk.
Available in OS X v10.2 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagCopyLinkToClipboardCopy the link to the clipboard.
Available in OS X v10.2 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagOpenImageInNewWindowOpen the image in a new window.
Available in OS X v10.2 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagDownloadImageToDiskDownload the image to disk.
Available in OS X v10.2 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagCopyImageToClipboardCopy the image to the clipboard.
Available in OS X v10.2 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagOpenFrameInNewWindowOpen the frame in a new window.
Available in OS X v10.2 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagCopyCopy the element to the clipboard.
Available in OS X v10.2 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagGoBackLoad the previous page.
Available in OS X v10.3.9 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagGoForwardLoad the next page.
Available in OS X v10.3.9 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagStopStop loading the current page.
Available in OS X v10.3.9 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagReloadReload the current page.
Available in OS X v10.3.9 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagCutCut the currently selected content.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagPastePaste the content on the clipboard onto the current selection.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagSpellingGuessSuggest spellings for the misspelled word.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagNoGuessesFoundIndicate whether any suggested spellings for the misspelled word could be found.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagIgnoreSpellingIgnore the misspelled word.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagLearnSpellingAdd the misspelled word to the user’s list of acceptable words.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagOtherUsed when a tag for an item in the context menu can’t be determined.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagSearchInSpotlightSearch SpotLight for the current selection.
Available in OS X v10.4.11 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagSearchWebSearch the web for the current selection.
Available in OS X v10.4.11 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagLookUpInDictionaryLook up the current selection in the Dictionary.
Available in OS X v10.4.11 and later.
Declared in
WebUIDelegate.h.WebMenuItemTagOpenWithDefaultApplicationOpen the current selection using the default application.
Available in OS X v10.4.11 and later.
Declared in
WebUIDelegate.h.WebMenuItemPDFActualSizeDisplay a PDF document at its original size.
Available in OS X v10.4.11 and later.
Declared in
WebUIDelegate.h.WebMenuItemPDFZoomInScale up a PDF document.
Available in OS X v10.4.11 and later.
Declared in
WebUIDelegate.h.WebMenuItemPDFZoomOutScale down a PDF document.
Available in OS X v10.4.11 and later.
Declared in
WebUIDelegate.h.WebMenuItemPDFAutoSizeDisplay a PDF document at a user-specified size.
Available in OS X v10.4.11 and later.
Declared in
WebUIDelegate.h.WebMenuItemPDFSinglePageDisplay a PDF document one page at a time.
Available in OS X v10.4.11 and later.
Declared in
WebUIDelegate.h.WebMenuItemPDFFacingPagesDisplay a PDF document two pages at a time.
Available in OS X v10.4.11 and later.
Declared in
WebUIDelegate.h.WebMenuItemPDFContinuousDisplay all pages in a PDF document continuously, using a vertical scroll bar, if necessary.
Available in OS X v10.4.11 and later.
Declared in
WebUIDelegate.h.WebMenuItemPDFNextPageDisplay the next page of a PDF document.
Available in OS X v10.4.11 and later.
Declared in
WebUIDelegate.h.WebMenuItemPDFPreviousPageDisplay the previous page of a PDF document.
Available in OS X v10.4.11 and later.
Declared in
WebUIDelegate.h.
Discussion
These tags define common actions a user might want to take with elements in a page. You can use the tags to differentiate between the different types of menu items.
Declared In
WebUIDelegate.hDrag-Destination Actions
Actions that the destination object of a drag operation can perform.
typedef enum {
WebDragDestinationActionNone = 0,
WebDragDestinationActionDHTML = 1,
WebDragDestinationActionEdit = 2,
WebDragDestinationActionLoad = 4,
WebDragDestinationActionAny = UINT_MAX
} WebDragDestinationAction;
Constants
WebDragDestinationActionNoneNo action.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebDragDestinationActionDHTMLAllows DHTML (such as JavaScript) to handle the drag.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebDragDestinationActionEditAllows editable documents to be changed by the drag operation.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebDragDestinationActionLoadAllows the drag operation to change the location.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebDragDestinationActionAnyAllows any defined action to occur.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.
Availability
- Available in OS X v10.3.9 and later.
Declared In
WebUIDelegate.hDrag-Source Actions
Actions that the source object of a drag operation can perform.
typedef enum {
WebDragSourceActionNone = 0,
WebDragSourceActionDHTML = 1,
WebDragSourceActionImage = 2,
WebDragSourceActionLink = 4,
WebDragSourceActionSelection = 8,
WebDragSourceActionAny = UINT_MAX
} WebDragSourceAction;
Constants
WebDragSourceActionNoneNo action.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebDragSourceActionDHTMLAllows DHTML (such as JavaScript) in the source object to initiate a drag operation.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebDragSourceActionImageAllows the user to drag an image in the source object.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebDragSourceActionLinkAllows the user to drag a link in the source object.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebDragSourceActionSelectionAllows the user to drag a selection in the source object.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.WebDragSourceActionAnyAllows any defined action to occur.
Available in OS X v10.3 and later.
Declared in
WebUIDelegate.h.
Availability
- Available in OS X v10.3.9 and later.
© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-02-24)