Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Next items

WebUIDelegateMBS.AreToolbarsVisible as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Determine whether the window's toolbars are currently visible.
Notes:
This method should return true 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 true from this method if at least one is on.

If you place code in this event, return a value.
If no code is in the event, the default delegate will be called.

Feedback, Comments & Corrections

WebUIDelegateMBS.Close
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.5 Yes No No No No
Function: The close event.
Notes: Called when the delegate is destroyed.

Feedback, Comments & Corrections

WebUIDelegateMBS.ContextMenuItemsForElement(elementInformation as Dictionary, defaultMenuItems() as NSMenuItemMBS) as NSMenuItemMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 18.4 Yes No No No No
Function: Returns the menu items to display in an element's contextual menu.
Notes:
elementInformation: A dictionary representation of the clicked element.
defaultMenuItems: An array of default NSMenuItemMBS objects to include in all contextual menus.

Return an array of NSMenuItemMBS objects to include in the contextual menu.

If you return nil, we let the default handler do it's work.

Feedback, Comments & Corrections

WebUIDelegateMBS.CreateWithRequest(Request as NSURLRequestMBS) as object
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 11.3 Yes No No No No
Function: Create a new window and begin to load the specified request.
Notes:
The newly created window is hidden, and the window operations delegate on the new WebViews will get a webViewShow call.

If no value is returned or no code is in the event, the default delegate is called.

Return nil, nothing or a valid htmlviewer or WebviewMBS object.
Your application will certainly crash if you return something different.

Request may be nil. In this case WebKit later calles LoadRequest for the new webview.

Feedback, Comments & Corrections

WebUIDelegateMBS.dragDestinationActionMaskForDraggingInfo(draggingInfo as NSDraggingInfoMBS) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 16.1 Yes No No No No
Function: Controls behavior when dragging to a WebView.
Notes:
draggingInfo: The 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.

If you implement this, the default delegate is not called.

If you return WebDragDestinationActionAny you simply allow all kind of drag and drop including javascript using it.

Feedback, Comments & Corrections

WebUIDelegateMBS.dragSourceActionMaskForPoint(x as Double, y as Double) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 16.1 Yes No No No No
Function: Controls behavior when dragging from a WebView.
Notes:
X/Y: The 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.

If you implement this, the default delegate is not called.

If you return WebDragDestinationActionAny you simply allow all kind of drag and drop including javascript using it.

Feedback, Comments & Corrections

WebUIDelegateMBS.drawFooterInRect(rect as NSRectMBS, g as NSGraphicsMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 18.2 Yes No No No No
Function: The delegate should draw a footer for the sender in the supplied rect.
Notes: rect: The NSRectMBS reserved for the footer of the page

Feedback, Comments & Corrections

WebUIDelegateMBS.drawHeaderInRect(rect as NSRectMBS, g as NSGraphicsMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 18.2 Yes No No No No
Function: The delegate should draw a header for the sender in the supplied rect.
Notes: rect: The NSRect reserved for the header of the page

Feedback, Comments & Corrections

WebUIDelegateMBS.FooterHeight as single
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 18.2 Yes No No No No
Function: The height returned will be used to calculate the rect passed to drawFooterInRect.
Notes:
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.

Feedback, Comments & Corrections

WebUIDelegateMBS.GetContentRect(byref left as Double, byref top as Double, byref width as Double, byref height as Double) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Return the window's content rect.
Notes: If you want to return values, return true, else return false and the default delegate will be called for this.

Feedback, Comments & Corrections

WebUIDelegateMBS.GetFrame(byref left as Double, byref top as Double, byref width as Double, byref height as Double) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Return the window's frame rect.
Notes: If you want to return values, return true, else return false and the default delegate will be called for this.

Feedback, Comments & Corrections

WebUIDelegateMBS.GetStatusText as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Get the currently displayed status text.
Notes:
If you place code in this event, return a value.
If no code is in the event, the default delegate will be called.

Feedback, Comments & Corrections

WebUIDelegateMBS.HeaderHeight as single
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 18.2 Yes No No No No
Function: The height returned will be used to calculate the rect passed to drawHeaderInRect.
Notes:
Reserve a height for the printed page header.
Return the height to reserve for the printed page header, return 0.0 to not reserve any space for a header.

Feedback, Comments & Corrections

WebUIDelegateMBS.IsResizable as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Determine whether the window is resizable or not.
Notes:
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.

If you place code in this event, return a value.
If no code is in the event, the default delegate will be called.

Feedback, Comments & Corrections

WebUIDelegateMBS.IsStatusBarVisible as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Determine whether the status bar is visible.
Notes:
true if the status bar is visible, otherwise false.

If you place code in this event, return a value.
If no code is in the event, the default delegate will be called.

Feedback, Comments & Corrections

WebUIDelegateMBS.MouseDidMoveOverElement(elementInformation as Dictionary, modifierFlags as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 11.2 Yes No No No No
Function: Updates information about the element the user is mousing over.
Notes:
elementInformation: A dictionary that describes the element under the mouse, or nil. Keys and values:
WebKit KeyDescription of value
WebElementDOMNodeDOMNodeMBS of the element
WebElementFrameWebFrameMBS of the element
WebElementImageAltStringString of the ALT attribute of the image element
WebElementImageNSImageMBS of the image element
WebElementImageRectNSRectMBS of an NSRect, the rect of the image element
WebElementImageURLString of the image element
WebElementIsSelectedNumber of BOOL indicating whether the element is selected or not
WebElementLinkURLString of the link if the element is within an anchor
WebElementLinkTargetFrameWebFrameMBS of the target of the anchor
WebElementLinkTitleString of the title of the anchor
WebElementLinkLabelString of the text within the anchor

modifierFlags: An integer bit field that indicates the modifier keys in effect during the event.

Feedback, Comments & Corrections

WebUIDelegateMBS.Open
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.5 Yes No No No No
Function: The open event.
Notes:
Called just after the delegate has been installed in a htmlviewer control.
This allows you to initialize your stuff before the first event is called.

Feedback, Comments & Corrections

WebUIDelegateMBS.printFrameView(frameView as WebFrameViewMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 18.2 Yes No No No No
Function: Informs that a WebFrameView needs to be printed.
Notes:
frameView: The WebFrameView 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 WebFrameView to be printed. Some content that WebKit displays can be printed directly by the WebFrameView, other content will need to be handled by the delegate. To determine if the WebFrameView can handle printing the delegate should check WebFrameView's documentViewShouldHandlePrint, if true then the delegate can call printDocumentView on the WebFrameView. Otherwise the delegate will need to request a NSPrintOperation from the WebFrameView's printOperationWithPrintInfo to handle the printing.

Feedback, Comments & Corrections

WebUIDelegateMBS.RunJavaScriptAlertPanelWithMessage(message as String)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Display a JavaScript alert panel.
Notes: Clients should visually indicate that this panel comes from JavaScript. The panel should have a single OK button.

Feedback, Comments & Corrections

WebUIDelegateMBS.RunJavaScriptConfirmPanelWithMessage(message as String) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Display a JavaScript confirm panel.
Notes:
Return true if the user hit OK, false 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".

If you place code in this event, return a value.
If no code is in the event, the default delegate will be called.

Feedback, Comments & Corrections

WebUIDelegateMBS.RunJavaScriptTextInputPanelWithPrompt(prompt as String, defaultText as String) as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Display a JavaScript text input panel.
Notes:
Return the typed text if the user hit OK, otherwise an empty string.

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.

If you place code in this event, return a value.
If no code is in the event, the default delegate will be called.

Feedback, Comments & Corrections

WebUIDelegateMBS.runOpenPanelForFileButtonWithResultListener(listener as WebOpenPanelResultListenerMBS, allowMultipleFiles as boolean) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 8.4 Yes No No No No
Function: Called when an open panel should be shown.
Notes:
Return true if you handled this event.
Call chooseFilename or cancel on the listener to inform about the result.

Feedback, Comments & Corrections

WebUIDelegateMBS.SetContentRect(left as Double, top as Double, width as Double, height as Double) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Set the window's content rect.
Notes:
Even though a plugin could set the frame directly using the Window, this method is provided so implementors of this protocol can do special things on programmatic move/resize, like avoiding autosaving of the size.

If you return true the default delegate will not be called for this.

Feedback, Comments & Corrections

WebUIDelegateMBS.SetFrame(left as Double, top as Double, width as Double, height as Double) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Set the window's frame rect.
Notes:
Even though a plugin could set the frame directly using the Window, this method is provided so implementors of this protocol can do special things on programmatic move/resize, like avoiding autosaving of the size.

If you return true the default delegate will not be called for this.

Feedback, Comments & Corrections

WebUIDelegateMBS.SetResizable(resizeable as boolean) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Set the window to resizable or not.
Notes:
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.

If you return true the default delegate will not be called for this.

Feedback, Comments & Corrections

WebUIDelegateMBS.SetStatusBarVisible(visible as boolean) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Set whether the status bar is currently visible.
Notes:
Setting this to true should show the status bar, setting it to false should hide it.

If you return true the default delegate will not be called for this.

Feedback, Comments & Corrections

WebUIDelegateMBS.SetStatusText(text as String) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Set the window's status display, if any, to the specified string.
Notes: If you return true the default delegate will not be called for this.

Feedback, Comments & Corrections

WebUIDelegateMBS.SetToolbarsVisible(visible as boolean) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 7.2 Yes No No No No
Function: Set whether the window's toolbars are currently visible.
Notes:
Setting this to true should turn on all toolbars (except for a possible status bar). Setting it to false should turn off all toolbars (with the same exception).

If you return true the default delegate will not be called for this.

Feedback, Comments & Corrections

WebUIDelegateMBS.willPerformDragDestinationAction(WebDragDestinationAction as Integer, draggingInfo as NSDraggingInfoMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event HTMLViewer Mac MBS MacControls Plugin 16.1 Yes No No No No
Function: Informs that WebView will perform a drag destination action.
Notes:
action: The drag destination action
draggingInfo: The dragging info of the drag

This method is called after the last call to dragDestinationActionMaskForDraggingInfo after something is dropped on a WebView.
This method informs the UI delegate of the drag destination action that WebView will perform.

Feedback, Comments & Corrections

Next items

The items on this page are in the following plugins: MBS MacControls Plugin.




Links
MBS Xojo Plugins