Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

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.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.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.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.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

WebUIDelegateMBS.willPerformDragSourceAction(WebDragDestinationAction as Integer, X as Double, Y as Double, pasteboard as NSPasteboardMBS)
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 a drag a has begun from a WebView.
Notes:
action: The drag source action
X/Y: The point where the drag started in the coordinates of the WebView
pasteboard: The drag pasteboard

This method is called after 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.

Feedback, Comments & Corrections

WebUIDelegateMBS.WindowClose 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: Close the current window.
Notes:
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.
If this event returns false the control is handled to the default delegate.

Feedback, Comments & Corrections

WebUIDelegateMBS.WindowFocus 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: Focus the current window.
Notes:
Clients showing multiple views in one window may want to also do something to focus the one corresponding to this WebView.
If this event returns false the control is handled to the default delegate.

Feedback, Comments & Corrections

WebUIDelegateMBS.WindowShow 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: Show the window that contains the top level view of the WebView, ordering it frontmost.
Notes:
This will only be called just after CreateWithRequest is used to create a new window.
If this event returns false the control is handled to the default delegate.

Feedback, Comments & Corrections

WebUIDelegateMBS.WindowUnfocus 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: Unfocus the current window.
Notes:
Clients showing multiple views in one window may want to also do something to unfocus the one corresponding to this WebView.
If this event returns false the control is handled to the default delegate.

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins