webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | List of all members
IWebUIDelegate Interface Reference

import"IWebUIDelegate.idl";

Inheritance diagram for IWebUIDelegate:
IWebUIDelegate2 PrintWebUIDelegate WebInspectorDelegate UIDelegate

Public Member Functions

HRESULT createWebViewWithRequest ([in] IWebView *sender, [in] IWebURLRequest *request, [out, retval] IWebView **newWebView)
 
HRESULT webViewShow ([in] IWebView *sender)
 
HRESULT webViewClose ([in] IWebView *sender)
 
HRESULT webViewFocus ([in] IWebView *sender)
 
HRESULT webViewUnfocus ([in] IWebView *sender)
 
HRESULT webViewFirstResponder ([in] IWebView *sender, [out, retval] HWND *responderHWnd)
 
HRESULT makeFirstResponder ([in] IWebView *sender, [in] HWND responderHWnd)
 
HRESULT setStatusText ([in] IWebView *sender, [in] BSTR text)
 
HRESULT webViewStatusText ([in] IWebView *sender, [out, retval] BSTR *text)
 
HRESULT webViewAreToolbarsVisible ([in] IWebView *sender, [out, retval] BOOL *visible)
 
HRESULT setToolbarsVisible ([in] IWebView *sender, [in] BOOL visible)
 
HRESULT webViewIsStatusBarVisible ([in] IWebView *sender, [out, retval] BOOL *visible)
 
HRESULT setStatusBarVisible ([in] IWebView *sender, [in] BOOL visible)
 
HRESULT webViewIsResizable ([in] IWebView *sender, [out, retval] BOOL *resizable)
 
HRESULT setResizable ([in] IWebView *sender, [in] BOOL resizable)
 
HRESULT setFrame ([in] IWebView *sender, [in] RECT *frame)
 
HRESULT webViewFrame ([in] IWebView *sender, [out, retval] RECT *frame)
 
HRESULT setContentRect ([in] IWebView *sender, [in] RECT *contentRect)
 
HRESULT webViewContentRect ([in] IWebView *sender, [out, retval] RECT *contentRect)
 
HRESULT runJavaScriptAlertPanelWithMessage ([in] IWebView *sender, [in] BSTR message)
 
HRESULT runJavaScriptConfirmPanelWithMessage ([in] IWebView *sender, [in] BSTR message, [out, retval] BOOL *result)
 
HRESULT runJavaScriptTextInputPanelWithPrompt ([in] IWebView *sender, [in] BSTR message, [in] BSTR defaultText, [out, retval] BSTR *result)
 
HRESULT runBeforeUnloadConfirmPanelWithMessage ([in] IWebView *sender, [in] BSTR message, [in] IWebFrame *initiatedByFrame, [out, retval] BOOL *result)
 
HRESULT runOpenPanelForFileButtonWithResultListener ([in] IWebView *sender, [in] IWebOpenPanelResultListener *resultListener)
 
HRESULT mouseDidMoveOverElement ([in] IWebView *sender, [in] IPropertyBag *elementInformation, [in] UINT modifierFlags)
 
HRESULT contextMenuItemsForElement ([in] IWebView *sender, [in] IPropertyBag *element, [in] HMENU defaultItemsHMenu, [out, retval] HMENU *resultHMenu)
 
HRESULT validateUserInterfaceItem ([in] IWebView *webView, [in] UINT itemCommandID, [in] BOOL defaultValidation, [out, retval] BOOL *isValid)
 
HRESULT shouldPerformAction ([in] IWebView *webView, [in] UINT itemCommandID, [in] UINT sender)
 
HRESULT dragDestinationActionMaskForDraggingInfo ([in] IWebView *webView, [in] IDataObject *draggingInfo, [out, retval] WebDragDestinationAction *action)
 
HRESULT willPerformDragDestinationAction ([in] IWebView *webView, [in] WebDragDestinationAction action, [in] IDataObject *draggingInfo)
 
HRESULT dragSourceActionMaskForPoint ([in] IWebView *webView, [in] LPPOINT point, [out, retval] WebDragSourceAction *action)
 
HRESULT willPerformDragSourceAction ([in] IWebView *webView, [in] WebDragSourceAction action, [in] LPPOINT point, [in] IDataObject *pasteboard, [out, retval] IDataObject **newPasteboard)
 
HRESULT contextMenuItemSelected ([in] IWebView *sender, [in] void *item, [in] IPropertyBag *element)
 
HRESULT hasCustomMenuImplementation ([out, retval] BOOL *hasCustomMenus)
 
HRESULT trackCustomPopupMenu ([in] IWebView *sender, [in] HMENU hMenu, [in] LPPOINT point)
 
HRESULT measureCustomMenuItem ([in] IWebView *sender, [in] void *measureItem)
 
HRESULT drawCustomMenuItem ([in] IWebView *sender, [in] void *drawItem)
 
HRESULT addCustomMenuDrawingData ([in] IWebView *sender, [in] HMENU hMenu)
 
HRESULT cleanUpCustomMenuDrawingData ([in] IWebView *sender, [in] HMENU hMenu)
 
HRESULT canTakeFocus ([in] IWebView *sender, [in] BOOL forward, [out] BOOL *result)
 
HRESULT takeFocus ([in] IWebView *sender, [in] BOOL forward)
 
HRESULT registerUndoWithTarget ([in] IWebUndoTarget *target, [in] BSTR actionName, [in] IUnknown *actionArg)
 Undo related UI delegate methods --------------------------------------------------------------------------——. More...
 
HRESULT removeAllActionsWithTarget ([in] IWebUndoTarget *target)
 
HRESULT setActionTitle ([in] BSTR actionTitle)
 
HRESULT undo ()
 
HRESULT redo ()
 
HRESULT canUndo ([out, retval] BOOL *result)
 
HRESULT canRedo ([out, retval] BOOL *result)
 
HRESULT printFrame ([in] IWebView *webView, [in] IWebFrame *frame)
 
HRESULT ftpDirectoryTemplatePath ([in] IWebView *webView, [out, retval] BSTR *path)
 
HRESULT webViewHeaderHeight ([in] IWebView *webView, [out, retval] float *result)
 
HRESULT webViewFooterHeight ([in] IWebView *webView, [out, retval] float *result)
 
HRESULT drawHeaderInRect ([in] IWebView *webView, [in] RECT *rect, [in] ULONG_PTR drawingContext)
 
HRESULT drawFooterInRect ([in] IWebView *webView, [in] RECT *rect, [in] ULONG_PTR drawingContext, [in] UINT pageIndex, [in] UINT pageCount)
 
HRESULT webViewPrintingMarginRect ([in] IWebView *webView, [out, retval] RECT *rect)
 
HRESULT canRunModal ([in] IWebView *webView, [out, retval] BOOL *canRunBoolean)
 
HRESULT createModalDialog ([in] IWebView *sender, [in] IWebURLRequest *request, [out, retval] IWebView **newWebView)
 
HRESULT runModal ([in] IWebView *webView)
 
HRESULT isMenuBarVisible ([in] IWebView *webView, [out, retval] BOOL *visible)
 
HRESULT setMenuBarVisible ([in] IWebView *webView, [in] BOOL visible)
 
HRESULT runDatabaseSizeLimitPrompt ([in] IWebView *webView, [in] BSTR displayName, [in] IWebFrame *initiatedByFrame, [out, retval] BOOL *allowed)
 
HRESULT paintCustomScrollbar ([in] IWebView *webView, [in] HDC hDC, [in] RECT rect, [in] WebScrollBarControlSize size, [in] WebScrollbarControlState state, [in] WebScrollbarControlPart pressedPart, [in] BOOL vertical, [in] float value, [in] float proportion, [in] WebScrollbarControlPartMask parts)
 
HRESULT paintCustomScrollCorner ([in] IWebView *webView, [in] HDC hDC, [in] RECT rect)
 

Member Function Documentation

◆ addCustomMenuDrawingData()

HRESULT IWebUIDelegate::addCustomMenuDrawingData ( [in] IWebView sender,
[in] HMENU  hMenu 
)

◆ canRedo()

HRESULT IWebUIDelegate::canRedo ( [out, retval] BOOL result)

canRedo: Returns whether there's anything on the redo stack to be redone

◆ canRunModal()

HRESULT IWebUIDelegate::canRunModal ( [in] IWebView webView,
[out, retval] BOOL canRunBoolean 
)

◆ canTakeFocus()

HRESULT IWebUIDelegate::canTakeFocus ( [in] IWebView sender,
[in] BOOL  forward,
[out] BOOL result 
)

webView:canTakeFocus: Informs whether focus can be transferred out of the WebView in the specified direction

Parameters
senderThe WebView sending the delegate method.
forwardWhether focus is moving forward or backward.

◆ canUndo()

HRESULT IWebUIDelegate::canUndo ( [out, retval] BOOL result)

canUndo: Returns whether there's anything on the undo stack to be undone

◆ cleanUpCustomMenuDrawingData()

HRESULT IWebUIDelegate::cleanUpCustomMenuDrawingData ( [in] IWebView sender,
[in] HMENU  hMenu 
)

◆ contextMenuItemSelected()

HRESULT IWebUIDelegate::contextMenuItemSelected ( [in] IWebView sender,
[in] void item,
[in] IPropertyBag *  element 
)

webView:contextMenuItemSelected:ForElement: Perform the action associated with the selected item.

Parameters
senderThe WebView sending the delegate method.
itemThe menu item that was selected.
elementA dictionary representation of the clicked element.

◆ contextMenuItemsForElement()

HRESULT IWebUIDelegate::contextMenuItemsForElement ( [in] IWebView sender,
[in] IPropertyBag *  element,
[in] HMENU  defaultItemsHMenu,
[out, retval] HMENU *  resultHMenu 
)

webView:contextMenuItemsForElement:defaultMenuItems: Returns the menu items to display in an element's contextual menu.

Parameters
senderThe WebView sending the delegate method.
elementA dictionary representation of the clicked element.
defaultMenuItemsAn array of default NSMenuItems to include in all contextual menus.
Returns
An array of NSMenuItems to include in the contextual menu.
  • (NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems;

Implemented in UIDelegate.

◆ createModalDialog()

HRESULT IWebUIDelegate::createModalDialog ( [in] IWebView sender,
[in] IWebURLRequest request,
[out, retval] IWebView **  newWebView 
)

◆ createWebViewWithRequest()

HRESULT IWebUIDelegate::createWebViewWithRequest ( [in] IWebView sender,
[in] IWebURLRequest request,
[out, retval] IWebView **  newWebView 
)

webView:createWebViewWithRequest: Create a new window and begin to load the specified request. The newly created window is hidden, and the window operations delegate on the new WebViews will get a webViewShow: call.

Parameters
senderThe WebView sending the delegate method.
requestThe request to load.
Returns
The WebView for the new window.
  • (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request;

◆ dragDestinationActionMaskForDraggingInfo()

HRESULT IWebUIDelegate::dragDestinationActionMaskForDraggingInfo ( [in] IWebView webView,
[in] IDataObject *  draggingInfo,
[out, retval] WebDragDestinationAction action 
)

webView:dragDestinationActionMaskForDraggingInfo: Controls behavior when dragging to a WebView

Parameters
webViewThe WebView sending the delegate method
draggingInfoThe dragging info of the drag This method is called periodically as something is dragged over a WebView. The UI delegate can return a mask indicating which drag destination actions can occur, WebDragDestinationActionAny to allow any kind of action or WebDragDestinationActionNone to not accept the drag.
  • (unsigned)webView:(WebView *)webView dragDestinationActionMaskForDraggingInfo:(id <NSDraggingInfo>)draggingInfo;

◆ dragSourceActionMaskForPoint()

HRESULT IWebUIDelegate::dragSourceActionMaskForPoint ( [in] IWebView webView,
[in] LPPOINT  point,
[out, retval] WebDragSourceAction action 
)

webView:dragSourceActionMaskForPoint: Controls behavior when dragging from a WebView

Parameters
webViewThe WebView sending the delegate method
pointThe point where the drag started in the coordinates of the WebView This method is called after the user has begun a drag from a WebView. The UI delegate can return a mask indicating which drag source actions can occur, WebDragSourceActionAny to allow any kind of action or WebDragSourceActionNone to not begin a drag.
  • (unsigned)webView:(WebView *)webView dragSourceActionMaskForPoint:(NSPoint)point;

◆ drawCustomMenuItem()

HRESULT IWebUIDelegate::drawCustomMenuItem ( [in] IWebView sender,
[in] void drawItem 
)

Implemented in PrintWebUIDelegate.

◆ drawFooterInRect()

HRESULT IWebUIDelegate::drawFooterInRect ( [in] IWebView webView,
[in] RECT *  rect,
[in] ULONG_PTR  drawingContext,
[in] UINT  pageIndex,
[in] UINT  pageCount 
)

webView:drawFooterInRect:

Parameters
webViewThe WebView sending the delegate method
rectThe NSRect reserved for the footer of the page The delegate should draw a footer for the sender in the supplied rect.
  • (void)webView:(WebView *)sender drawFooterInRect:(NSRect)rect;

◆ drawHeaderInRect()

HRESULT IWebUIDelegate::drawHeaderInRect ( [in] IWebView webView,
[in] RECT *  rect,
[in] ULONG_PTR  drawingContext 
)

webView:drawHeaderInRect:

Parameters
webViewThe WebView sending the delegate method
rectThe NSRect reserved for the header of the page The delegate should draw a header for the sender in the supplied rect.
  • (void)webView:(WebView *)sender drawHeaderInRect:(NSRect)rect;

◆ ftpDirectoryTemplatePath()

HRESULT IWebUIDelegate::ftpDirectoryTemplatePath ( [in] IWebView webView,
[out, retval] BSTR path 
)

webView:ftpDirectoryTemplatePath Returns the path to the FTP directory listing template document

Parameters
webViewThe WebView sending the delegate method
pathThe path to the template document This method is called when an FTP directory listing is viewed in a webView. In practice, all WebViews show the same template document data that was loaded for the very first WebView that displayed a directory listing, so this will only be called once.

◆ hasCustomMenuImplementation()

HRESULT IWebUIDelegate::hasCustomMenuImplementation ( [out, retval] BOOL hasCustomMenus)

◆ isMenuBarVisible()

HRESULT IWebUIDelegate::isMenuBarVisible ( [in] IWebView webView,
[out, retval] BOOL visible 
)

◆ makeFirstResponder()

HRESULT IWebUIDelegate::makeFirstResponder ( [in] IWebView sender,
[in] HWND  responderHWnd 
)

webView:makeFirstResponder: Set the first responder for this window.

Parameters
senderThe WebView sending the delegate method.
responderThe responder to make first (will always be a view) responder will always be a view that is in the view subhierarchy of the top-level web view for this WebView. If the WebView's top level view is currently out of the view hierarchy, it may be desirable to save the first responder elsewhere, or possibly ignore this call.
  • (void)webView:(WebView *)sender makeFirstResponder:(NSResponder *)responder;

◆ measureCustomMenuItem()

HRESULT IWebUIDelegate::measureCustomMenuItem ( [in] IWebView sender,
[in] void measureItem 
)

Implemented in PrintWebUIDelegate.

◆ mouseDidMoveOverElement()

HRESULT IWebUIDelegate::mouseDidMoveOverElement ( [in] IWebView sender,
[in] IPropertyBag *  elementInformation,
[in] UINT  modifierFlags 
)

webView:mouseDidMoveOverElement:modifierFlags: Update the window's feedback for mousing over links to reflect a new item the mouse is over or new modifier flags.

Parameters
senderThe WebView sending the delegate method.
elementInformationDictionary that describes the element that the mouse is over, or nil.
modifierFlagsThe modifier flags as in NSEvent.
  • (void)webView:(WebView *)sender mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(WebNSUInt)modifierFlags;

◆ paintCustomScrollbar()

HRESULT IWebUIDelegate::paintCustomScrollbar ( [in] IWebView webView,
[in] HDC  hDC,
[in] RECT  rect,
[in] WebScrollBarControlSize  size,
[in] WebScrollbarControlState  state,
[in] WebScrollbarControlPart  pressedPart,
[in] BOOL  vertical,
[in] float  value,
[in] float  proportion,
[in] WebScrollbarControlPartMask  parts 
)

◆ paintCustomScrollCorner()

HRESULT IWebUIDelegate::paintCustomScrollCorner ( [in] IWebView webView,
[in] HDC  hDC,
[in] RECT  rect 
)

◆ printFrame()

HRESULT IWebUIDelegate::printFrame ( [in] IWebView webView,
[in] IWebFrame frame 
)

webView:printFrame: Informs that a WebFrame needs to be printed

Parameters
webViewThe WebView sending the delegate method
frameThe WebFrame needing to be printed This method is called when a script or user requests the page to be printed. In this method the delegate can prepare the WebFrame to be printed.

◆ redo()

HRESULT IWebUIDelegate::redo ( )

redo: Redo the last group of operations

Implemented in WebInspectorDelegate, UIDelegate, and PrintWebUIDelegate.

◆ registerUndoWithTarget()

HRESULT IWebUIDelegate::registerUndoWithTarget ( [in] IWebUndoTarget target,
[in] BSTR  actionName,
[in] IUnknown *  actionArg 
)

Undo related UI delegate methods --------------------------------------------------------------------------——.

registerUndoWithTarget: Registers an undo operation of a IWebUndoTarget on the undo/redo stack.

Parameters
targetThe target that will be called back when the action is undone
actionNameThe name of the action - this will be passed back to the target when we need to undo the operation
actionArgAn object that target used to save undo information

◆ removeAllActionsWithTarget()

HRESULT IWebUIDelegate::removeAllActionsWithTarget ( [in] IWebUndoTarget target)

removeAllActionsWithTarget: remove all the undo operations that are registered for the passed in target on the undo/redo stack.

Parameters
target

◆ runBeforeUnloadConfirmPanelWithMessage()

HRESULT IWebUIDelegate::runBeforeUnloadConfirmPanelWithMessage ( [in] IWebView sender,
[in] BSTR  message,
[in] IWebFrame initiatedByFrame,
[out, retval] BOOL result 
)

webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame: Display a confirm panel by an "before unload" event handler.

Parameters
senderThe WebView sending the delegate method.
messageThe message to display.
frameThe WebFrame whose JavaScript initiated this call.
Returns
YES if the user hit OK, NO if the user chose Cancel. Clients should include a message in addition to the one supplied by the web page that indicates. The panel should have two buttons, e.g. "OK" and "Cancel".
  • (BOOL)webView:(WebView *)sender runBeforeUnloadConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;

◆ runDatabaseSizeLimitPrompt()

HRESULT IWebUIDelegate::runDatabaseSizeLimitPrompt ( [in] IWebView webView,
[in] BSTR  displayName,
[in] IWebFrame initiatedByFrame,
[out, retval] BOOL allowed 
)

◆ runJavaScriptAlertPanelWithMessage()

HRESULT IWebUIDelegate::runJavaScriptAlertPanelWithMessage ( [in] IWebView sender,
[in] BSTR  message 
)

webView:runJavaScriptAlertPanelWithMessage: Display a JavaScript alert panel

Parameters
senderThe WebView sending the delegate method.
messageThe message to display Clients should visually indicate that this panel comes from JavaScript. The panel should have a single OK button.
  • (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message;

◆ runJavaScriptConfirmPanelWithMessage()

HRESULT IWebUIDelegate::runJavaScriptConfirmPanelWithMessage ( [in] IWebView sender,
[in] BSTR  message,
[out, retval] BOOL result 
)

webView:runJavaScriptConfirmPanelWithMessage: Display a JavaScript confirm panel

Parameters
senderThe WebView sending the delegate method.
messageThe message to display
Returns
YES if the user hit OK, no if the user chose Cancel. Clients should visually indicate that this panel comes from JavaScript. The panel should have two buttons, e.g. "OK" and "Cancel".
  • (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message;

◆ runJavaScriptTextInputPanelWithPrompt()

HRESULT IWebUIDelegate::runJavaScriptTextInputPanelWithPrompt ( [in] IWebView sender,
[in] BSTR  message,
[in] BSTR  defaultText,
[out, retval] BSTR result 
)

webView:runJavaScriptTextInputPanelWithPrompt:defaultText: Display a JavaScript text input panel

Parameters
senderThe WebView sending the delegate method.
messageThe message to display
defaultTextThe initial text for the text entry area.
Returns
The typed text if the user hit OK, otherwise nil. Clients should visually indicate that this panel comes from JavaScript. The panel should have two buttons, e.g. "OK" and "Cancel", and an area to type text.
  • (NSString *)webView:(WebView *)sender runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText;

◆ runModal()

HRESULT IWebUIDelegate::runModal ( [in] IWebView webView)

◆ runOpenPanelForFileButtonWithResultListener()

HRESULT IWebUIDelegate::runOpenPanelForFileButtonWithResultListener ( [in] IWebView sender,
[in] IWebOpenPanelResultListener resultListener 
)

webView:runOpenPanelForFileButtonWithResultListener: Display a file open panel for a file input control.

Parameters
senderThe WebView sending the delegate method.
resultListenerThe object to call back with the results. This method is passed a callback object instead of giving a return value so that it can be handled with a sheet.
  • (void)webView:(WebView *)sender runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener;

◆ setActionTitle()

HRESULT IWebUIDelegate::setActionTitle ( [in] BSTR  actionTitle)

setActionTitle: Sets the name of the action for the current group of undo operations

Parameters
actionNameName of the action

◆ setContentRect()

HRESULT IWebUIDelegate::setContentRect ( [in] IWebView sender,
[in] RECT *  contentRect 
)

webView:setContentRect: Set the window's content rect

Parameters
senderThe WebView sending the delegate method.
frameThe new window content rect Even though a caller could set the content rect directly using the NSWindow, this method is provided so implementors of this protocol can do special things on programmatic move/resize, like avoiding autosaving of the size.
  • (void)webView:(WebView *)sender setContentRect:(NSRect)contentRect;

◆ setFrame()

HRESULT IWebUIDelegate::setFrame ( [in] IWebView sender,
[in] RECT *  frame 
)

webView:setFrame: Set the window's frame rect

Parameters
senderThe WebView sending the delegate method.
frameThe new window frame size Even though a caller could set the frame directly using the NSWindow, this method is provided so implementors of this protocol can do special things on programmatic move/resize, like avoiding autosaving of the size.
  • (void)webView:(WebView *)sender setFrame:(NSRect)frame;

◆ setMenuBarVisible()

HRESULT IWebUIDelegate::setMenuBarVisible ( [in] IWebView webView,
[in] BOOL  visible 
)

◆ setResizable()

HRESULT IWebUIDelegate::setResizable ( [in] IWebView sender,
[in] BOOL  resizable 
)

webView:setResizable: Set the window to resizable or not

Parameters
senderThe WebView sending the delegate method.
resizableYES if the window should be made resizable, NO if not. If there are multiple views in the same window, they have have their own separate resize controls and this may need to be handled specially.
  • (void)webView:(WebView *)sender setResizable:(BOOL)resizable;

◆ setStatusBarVisible()

HRESULT IWebUIDelegate::setStatusBarVisible ( [in] IWebView sender,
[in] BOOL  visible 
)

webView:setStatusBarVisible: Set whether the status bar is currently visible.

Parameters
visibleThe new visibility value Setting this to YES should show the status bar, setting it to NO should hide it.
  • (void)webView:(WebView *)sender setStatusBarVisible:(BOOL)visible;

◆ setStatusText()

HRESULT IWebUIDelegate::setStatusText ( [in] IWebView sender,
[in] BSTR  text 
)

webView:setStatusText: Set the window's status display, if any, to the specified string.

Parameters
senderThe WebView sending the delegate method.
textThe status text to set
  • (void)webView:(WebView *)sender setStatusText:(NSString *)text;

◆ setToolbarsVisible()

HRESULT IWebUIDelegate::setToolbarsVisible ( [in] IWebView sender,
[in] BOOL  visible 
)

webView:setToolbarsVisible:

Parameters
senderThe WebView sending the delegate method. Set whether the window's toolbars are currently visible.
visibleNew value for toolbar visibility Setting this to YES should turn on all toolbars (except for a possible status bar). Setting it to NO should turn off all toolbars (with the same exception).
  • (void)webView:(WebView *)sender setToolbarsVisible:(BOOL)visible;

◆ shouldPerformAction()

HRESULT IWebUIDelegate::shouldPerformAction ( [in] IWebView webView,
[in] UINT  itemCommandID,
[in] UINT  sender 
)

webView:shouldPerformAction:fromSender: Controls actions

Parameters
webViewThe WebView sending the delegate method
actionThe action being sent
senderThe sender of the action This method allows the UI delegate to control WebView's behavior when an action is being sent. For example, if the action is copy:, the delegate can return YES to allow WebView to perform its default copy behavior or return NO and perform copy: in some other way. See WebView.h to see the actions that WebView can perform.
  • (BOOL)webView:(WebView *)webView shouldPerformAction:(SEL)action fromSender:(id)sender;

◆ takeFocus()

HRESULT IWebUIDelegate::takeFocus ( [in] IWebView sender,
[in] BOOL  forward 
)

webView:takeFocus: Instructs the delegate to take focus out of the WebView

Parameters
senderThe WebView sending the delegate method.
forwardWhether focus is moving forward or backward.

◆ trackCustomPopupMenu()

HRESULT IWebUIDelegate::trackCustomPopupMenu ( [in] IWebView sender,
[in] HMENU  hMenu,
[in] LPPOINT  point 
)

◆ undo()

HRESULT IWebUIDelegate::undo ( )

undo: Undo the last group of operations

Implemented in WebInspectorDelegate, UIDelegate, and PrintWebUIDelegate.

◆ validateUserInterfaceItem()

HRESULT IWebUIDelegate::validateUserInterfaceItem ( [in] IWebView webView,
[in] UINT  itemCommandID,
[in] BOOL  defaultValidation,
[out, retval] BOOL isValid 
)

webView:validateUserInterfaceItem:defaultValidation: Controls UI validation

Parameters
webViewThe WebView sending the delegate method
itemThe user interface item being validated defaultValidation Whether or not the WebView thinks the item is valid This method allows the UI delegate to control WebView's validation of user interface items. See WebView.h to see the methods to that WebView can currently validate. See NSUserInterfaceValidations and NSValidatedUserInterfaceItem for information about UI validation.
  • (BOOL)webView:(WebView *)webView validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item defaultValidation:(BOOL)defaultValidation;

◆ webViewAreToolbarsVisible()

HRESULT IWebUIDelegate::webViewAreToolbarsVisible ( [in] IWebView sender,
[out, retval] BOOL visible 
)

webViewAreToolbarsVisible: Determine whether the window's toolbars are currently visible

Parameters
senderThe WebView sending the delegate method. This method should return YES if the window has any toolbars that are currently on, besides the status bar. If the app has more than one toolbar per window, for example a regular command toolbar and a favorites bar, it should return YES from this method if at least one is on.
Returns
YES if at least one toolbar is visible, otherwise NO.
  • (BOOL)webViewAreToolbarsVisible:(WebView *)sender;

◆ webViewClose()

HRESULT IWebUIDelegate::webViewClose ( [in] IWebView sender)

webViewClose: Close the current window.

Parameters
senderThe WebView sending the delegate method. Clients showing multiple views in one window may choose to close only the one corresponding to this WebView. Other clients may choose to ignore this method entirely.
  • (void)webViewClose:(WebView *)sender;

◆ webViewContentRect()

HRESULT IWebUIDelegate::webViewContentRect ( [in] IWebView sender,
[out, retval] RECT *  contentRect 
)

webViewContentRect: Return the window's content rect

  • (NSRect)webViewContentRect:(WebView *)sender;

◆ webViewFirstResponder()

HRESULT IWebUIDelegate::webViewFirstResponder ( [in] IWebView sender,
[out, retval] HWND responderHWnd 
)

webViewFirstResponder: Get the first responder for this window.

Parameters
senderThe WebView sending the delegate method. This method should return the focused control in the WebView's view, if any. If the view is out of the window hierarchy, this might return something than calling firstResponder on the real NSWindow would. It's OK to return either nil or the real first responder if some control not in the window has focus.
  • (NSResponder *)webViewFirstResponder:(WebView *)sender;

◆ webViewFocus()

HRESULT IWebUIDelegate::webViewFocus ( [in] IWebView sender)

webViewFocus: Focus the current window (i.e. makeKeyAndOrderFront:).

Parameters
TheWebView sending the delegate method. Clients showing multiple views in one window may want to also do something to focus the one corresponding to this WebView.
  • (void)webViewFocus:(WebView *)sender;

◆ webViewFooterHeight()

HRESULT IWebUIDelegate::webViewFooterHeight ( [in] IWebView webView,
[out, retval] float *  result 
)

webViewFooterHeight:

Parameters
webViewThe WebView sending the delegate method Reserve a height for the printed page footer.
Returns
The height to reserve for the printed page footer, return 0.0 to not reserve any space for a footer. The height returned will be used to calculate the rect passed to webView:drawFooterInRect:.
  • (float)webViewFooterHeight:(WebView *)sender;

◆ webViewFrame()

HRESULT IWebUIDelegate::webViewFrame ( [in] IWebView sender,
[out, retval] RECT *  frame 
)

webViewFrame:

Parameters
senderThe WebView sending the delegate method. REturn the window's frame rect
  • (NSRect)webViewFrame:(WebView *)sender;

◆ webViewHeaderHeight()

HRESULT IWebUIDelegate::webViewHeaderHeight ( [in] IWebView webView,
[out, retval] float *  result 
)

webViewHeaderHeight:

Parameters
webViewThe WebView sending the delegate method Reserve a height for the printed page header.
Returns
The height to reserve for the printed page header, return 0.0 to not reserve any space for a header. The height returned will be used to calculate the rect passed to webView:drawHeaderInRect:.
  • (float)webViewHeaderHeight:(WebView *)sender;

◆ webViewIsResizable()

HRESULT IWebUIDelegate::webViewIsResizable ( [in] IWebView sender,
[out, retval] BOOL resizable 
)

webViewIsResizable: Determine whether the window is resizable or not.

Parameters
senderThe WebView sending the delegate method.
Returns
YES if resizable, NO if not. If there are multiple views in the same window, they have have their own separate resize controls and this may need to be handled specially.
  • (BOOL)webViewIsResizable:(WebView *)sender;

◆ webViewIsStatusBarVisible()

HRESULT IWebUIDelegate::webViewIsStatusBarVisible ( [in] IWebView sender,
[out, retval] BOOL visible 
)

webViewIsStatusBarVisible: Determine whether the status bar is visible.

Parameters
senderThe WebView sending the delegate method.
Returns
YES if the status bar is visible, otherwise NO.
  • (BOOL)webViewIsStatusBarVisible:(WebView *)sender;

◆ webViewPrintingMarginRect()

HRESULT IWebUIDelegate::webViewPrintingMarginRect ( [in] IWebView webView,
[out, retval] RECT *  rect 
)

◆ webViewShow()

HRESULT IWebUIDelegate::webViewShow ( [in] IWebView sender)

webViewShow:

Parameters
senderThe WebView sending the delegate method. Show the window that contains the top level view of the WebView, ordering it frontmost. This will only be called just after createWindowWithRequest: is used to create a new window.
  • (void)webViewShow:(WebView *)sender;

◆ webViewStatusText()

HRESULT IWebUIDelegate::webViewStatusText ( [in] IWebView sender,
[out, retval] BSTR text 
)

webViewStatusText: Get the currently displayed status text.

Parameters
senderThe WebView sending the delegate method.
Returns
The status text
  • (NSString *)webViewStatusText:(WebView *)sender;

◆ webViewUnfocus()

HRESULT IWebUIDelegate::webViewUnfocus ( [in] IWebView sender)

webViewUnfocus: Unfocus the current window.

Parameters
senderThe WebView sending the delegate method. Clients showing multiple views in one window may want to also do something to unfocus the one corresponding to this WebView.
  • (void)webViewUnfocus:(WebView *)sender;

◆ willPerformDragDestinationAction()

HRESULT IWebUIDelegate::willPerformDragDestinationAction ( [in] IWebView webView,
[in] WebDragDestinationAction  action,
[in] IDataObject *  draggingInfo 
)

webView:willPerformDragDestinationAction:forDraggingInfo: Informs that WebView will perform a drag destination action

Parameters
webViewThe WebView sending the delegate method
actionThe drag destination action
draggingInfoThe dragging info of the drag This method is called after the last call to webView:dragDestinationActionMaskForDraggingInfo: after something is dropped on a WebView. This method informs the UI delegate of the drag destination action that WebView will perform.
  • (void)webView:(WebView *)webView willPerformDragDestinationAction:(WebDragDestinationAction)action forDraggingInfo:(id <NSDraggingInfo>)draggingInfo;

◆ willPerformDragSourceAction()

HRESULT IWebUIDelegate::willPerformDragSourceAction ( [in] IWebView webView,
[in] WebDragSourceAction  action,
[in] LPPOINT  point,
[in] IDataObject *  pasteboard,
[out, retval] IDataObject **  newPasteboard 
)

webView:willPerformDragSourceAction:fromPoint:withPasteboard: Informs that a drag a has begun from a WebView

Parameters
webViewThe WebView sending the delegate method
actionThe drag source action
pointThe point where the drag started in the coordinates of the WebView
pasteboardThe drag pasteboard This method is called after webView:dragSourceActionMaskForPoint: is called after the user has begun a drag from a WebView. This method informs the UI delegate of the drag source action that will be performed and gives the delegate an opportunity to modify the contents of the dragging pasteboard.
  • (void)webView:(WebView *)webView willPerformDragSourceAction:(WebDragSourceAction)action fromPoint:(NSPoint)point withPasteboard:(NSPasteboard *)pasteboard;

The documentation for this interface was generated from the following file: