Platforms to show: All Mac Windows Linux Cross-Platform
WebViewMBS class Deprecated
Super class: NSViewMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | HTMLViewer Mac | MBS MacControls Plugin | 7.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This item is deprecated and should no longer be used.
Notes:
This classs is not available in Xojo 2020r1 or newer.
A webview is simply a content viewer for any web based content. It can render html pages, text pages and with plugins also flash or pdf files.
All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead. Using the message, name and reason properties you can see what was the reason for this exception. Please report if you find a method which does not handle exceptions correct.
You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSViewMBS class.
- 19 properties
- property ApplicationNameForUserAgent as String
- property ContinuousSpellCheckingEnabled as boolean
- property CustomTextEncodingName as String
- property CustomUserAgent as String
- property dashboardBehavior(behavior as Integer) as boolean
- property DrawsBackground as Boolean
- property Editable as boolean
- property GroupName as string
- property mediaStyle as String
- property preferences as WebPreferencesMBS
- property PreferencesIdentifier as string
- property ScrollHeight as single
- property ScrollLeft as single
- property ScrollTop as single
- property ScrollWidth as single
- property ShouldUpdateWhileOffscreen as boolean
- property smartInsertDeleteEnabled as boolean
- property TextSizeMultiplier as single
- property typingStyle as Variant
- 140 methods
- method alignCenter
- method alignJustified
- method alignLeft
- method alignRight
- method applyStyle(style as Variant)
- method backForwardList as WebBackForwardListMBS
- method canGoBack as boolean
- method canGoForward as boolean
- method canMakeTextLarger as boolean
- method canMakeTextSmaller as boolean
- method canResetPageZoom as boolean
- method CanShowMIMEType(mime as string) as boolean
- method CanShowMIMETypeAsHTML(mime as string) as boolean
- method canZoomPageIn as boolean
- method canZoomPageOut as boolean
- method capitalizeWord
- method centerSelectionInVisibleArea
- method changeAttributes
- method changeCaseOfLetter
- method changeColor
- method changeDocumentBackgroundColor
- method changeFont
- method checkSpelling
- method ClearFocus
- method complete
- method Constructor
- method Constructor(Handle as Integer)
- method Constructor(left as Double, top as Double, width as Double, height as Double)
- method Constructor(x as Double, y as Double, w as Double, h as Double, FrameName as string, GroupName as string)
- method copy
- method copyFont
- method cut
- method delete
- method deleteBackward
- method deleteBackwardByDecomposingPreviousCharacter
- method deleteForward
- method deleteSelection
- method deleteToBeginningOfLine
- method deleteToBeginningOfParagraph
- method deleteToEndOfLine
- method deleteToEndOfParagraph
- method deleteWordBackward
- method deleteWordForward
- method EstimatedProgress as Double
- method EvaluateJavaScript(code as string) as string
- method GoBack
- method GoForward
- method goToBackForwardItem(item as WebHistoryItemMBS) as boolean
- method HTMLText as string
- method indent
- method insertBacktab
- method insertNewline
- method insertParagraphSeparator
- method insertTab
- method LoadHTMLString(data as memoryblock, mime as string, encoding as string, url as string)
- method LoadHTMLString(text as string, url as string)
- method LoadRequest(request as NSURLRequestMBS)
- method LoadURL(url as string)
- method LoadURL(url as string, CachePolicy as Integer, TimeOut as Double)
- method lowercaseWord
- method mainFrame as WebFrameMBS
- method makeTextLarger
- method makeTextSmaller
- method mediaVolume as single
- method moveBackward
- method moveBackwardAndModifySelection
- method moveDown
- method moveDownAndModifySelection
- method moveForward
- method moveForwardAndModifySelection
- method moveLeft
- method moveLeftAndModifySelection
- method moveRight
- method moveRightAndModifySelection
- method moveToBeginningOfDocument
- method moveToBeginningOfDocumentAndModifySelection
- method moveToBeginningOfLine
- method moveToBeginningOfLineAndModifySelection
- method moveToBeginningOfParagraph
- method moveToBeginningOfParagraphAndModifySelection
- method moveToBeginningOfSentence
- method moveToBeginningOfSentenceAndModifySelection
- method moveToEndOfDocument
- method moveToEndOfDocumentAndModifySelection
- method moveToEndOfLine
- method moveToEndOfLineAndModifySelection
- method moveToEndOfParagraph
- method moveToEndOfParagraphAndModifySelection
- method moveToEndOfSentence
- method moveToEndOfSentenceAndModifySelection
- method moveUp
- method moveUpAndModifySelection
- method moveWordBackward
- method moveWordBackwardAndModifySelection
- method moveWordForward
- method moveWordForwardAndModifySelection
- method moveWordLeft
- method moveWordLeftAndModifySelection
- method moveWordRight
- method moveWordRightAndModifySelection
- method NSScrollView as NSScrollViewMBS
- method pageDown
- method pageSizeMultiplier as single
- method pageUp
- method paste
- method pasteAsPlainText
- method pasteAsRichText
- method pasteFont
- method performFindPanelAction
- method PrintToPDFFile(PDFFile as folderitem, LeftMargin as Double = 50.0, TopMargin as Double = 50.0, RightMargin as Double = 50.0, BottomMargin as Double = 50.0) as boolean
- method Reload
- method reloadFromOrigin
- method RenderDocumentToEPS as Memoryblock
- method RenderDocumentToPDF as Memoryblock
- method RenderWebsiteImage as NSImageMBS
- method replaceSelectionWithMarkupString(html as string)
- method replaceSelectionWithText(text as string)
- method resetPageZoom
- method scrollLineDown
- method scrollLineUp
- method scrollPageDown
- method scrollPageUp
- method SearchFor(text as string, Forward as boolean, CaseSensitive as boolean, Wrap as Boolean) as boolean
- method selectAll
- method selectLine
- method selectParagraph
- method selectSentence
- method selectWord
- method setMaintainsBackForwardList(value as boolean)
- method setMediaVolume(value as single)
- method setPageSizeMultiplier(value as single)
- method showGuessPanel
- method startSpeaking
- method StopLoading
- method stopSpeaking
- method SupportsTextEncoding as boolean
- method uppercaseWord
- method userAgentForURL(url as string) as String
- method zoomPageIn
- method zoomPageOut
Super class NSViewMBS
- 42 properties
- property acceptsTouchEvents as boolean
- property allowsVibrancy as Boolean
- property alphaValue as Double
- property autoresizesSubviews as boolean
- property autoresizingMask as Integer
- property bounds as NSRectMBS
- property boundsRotation as Double
- property canBecomeKeyView as boolean
- property canDraw as boolean
- property canDrawConcurrently as boolean
- property className as string
- property classPath as string
- property focusRingType as Integer
- property frame as NSRectMBS
- property frameCenterRotation as Double
- property frameHeight as Double
- property frameLeft as Double
- property frameRotation as Double
- property frameTop as Double
- property frameWidth as Double
- property identifier as string
- property isFlipped as Boolean
- property isHidden as Boolean
- property isHiddenOrHasHiddenAncestor as Boolean
- property isOpaque as Boolean
- property isRotatedFromBase as Boolean
- property isRotatedOrScaledFromBase as Boolean
- property layer as Variant
- property layerUsesCoreImageFilters as Boolean
- property needsDisplay as Boolean
- property nextKeyView as NSViewMBS
- property opaqueAncestor as NSViewMBS
- property RetainCount as Integer
- property superview as NSViewMBS
- property toolTip as string
- property userInteractionEnabled as Boolean
- property visibleRect as NSRectMBS
- property wantsDefaultClipping as boolean
- property wantsLayer as Boolean
- property wantsRestingTouches as boolean
- property window as NSWindowMBS
- property compositingFilter as variant
- 57 methods
- method addSubview(subview as NSViewMBS)
- method addSubview(subview as NSViewMBS, positioned as Integer, relativeToView as NSViewMBS)
- method addToolTipRect(rect as NSRectMBS, tooltip as NSViewTooltipMBS)
- method ancestorSharedWithView(view as NSViewMBS) as NSViewMBS
- method animator as NSViewMBS
- method backgroundFilters as variant()
- method beginDraggingSessionWithItems(items() as Variant, e as NSEventMBS, source as NSViewMBS) as Variant
- method Constructor
- method Constructor(Handle as Integer)
- method Constructor(left as Double, top as Double, width as Double, height as Double)
- method contentFilters as variant()
- method convertPointFromView(point as NSPointMBS, View as NSViewMBS) as NSPointMBS
- method convertPointToView(point as NSPointMBS, View as NSViewMBS) as NSPointMBS
- method convertRectFromView(rect as NSRectMBS, View as NSViewMBS) as NSRectMBS
- method convertRectToView(rect as NSRectMBS, View as NSViewMBS) as NSRectMBS
- method convertSizeFromView(Size as NSSizeMBS, View as NSViewMBS) as NSSizeMBS
- method convertSizeToView(Size as NSSizeMBS, View as NSViewMBS) as NSSizeMBS
- method dataWithEPSInsideRect(left as Double, top as Double, width as Double, height as Double) as Memoryblock
- method dataWithPDFInsideRect(left as Double, top as Double, width as Double, height as Double) as Memoryblock
- method dataWithPDFInsideRect(r as NSRectMBS) as Memoryblock
- method dragImage(image as NSImageMBS, viewLocation as NSPointMBS, offset as NSSizeMBS, NSEvent as NSEventMBS, pboard as NSPasteboardMBS, source as NSViewMBS, slideFlag as boolean)
- method drawFocusRingMask
- method enclosingMenuItem as Variant
- method enclosingScrollView as Variant
- method focusRingMaskBounds as NSRectMBS
- method isDescendantOf(view as NSViewMBS) as boolean
- method makeBackingLayer as Variant
- method nextValidKeyView as NSViewMBS
- method noteFocusRingMaskChanged
- method pageFooter as NSAttributedStringMBS
- method pageHeader as NSAttributedStringMBS
- method previousKeyView as NSViewMBS
- method previousValidKeyView as NSViewMBS
- method print
- method registeredDraggedTypes as string()
- method registerForDraggedTypes(Types() as string)
- method removeAllToolTips
- method removeFromSuperview
- method removeFromSuperviewWithoutNeedingDisplay
- method RenderImage(subviews as boolean = false, flipped as boolean = false) as variant
- method replaceSubview(oldView as NSViewMBS, newView as NSViewMBS)
- method rotateByAngle(angle as Double)
- method scaleUnitSquareToSize(size as NSSizeMBS)
- method Screenshot as Picture
- method setBackgroundFilters(Filters() as variant)
- method setBoundsOrigin(origin as NSPointMBS)
- method setBoundsOrigin(x as Double, y as Double)
- method setBoundsSize(size as NSSizeMBS)
- method setBoundsSize(width as Double, height as Double)
- method setContentFilters(Filters() as variant)
- method setFocus
- method setFrameOrigin(origin as NSPointMBS)
- method setFrameOrigin(x as Double, y as Double)
- method setFrameSize(size as NSSizeMBS)
- method setFrameSize(width as Double, height as Double)
- method subviews(recursive as boolean = false) as NSViewMBS()
- method unregisterDraggedTypes
- 5 shared methods
- shared method NSViewBoundsDidChangeNotification as string
- shared method NSViewDidUpdateTrackingAreasNotification as string
- shared method NSViewFocusDidChangeNotification as string
- shared method NSViewFrameDidChangeNotification as string
- shared method NSViewGlobalFrameDidChangeNotification as string
- 21 constants
- const NSBezelBorder = 2
- const NSFocusRingTypeDefault = 0
- const NSFocusRingTypeExterior = 2
- const NSFocusRingTypeNone = 1
- const NSGrooveBorder = 3
- const NSLineBorder = 1
- const NSNoBorder = 0
- const NSViewHeightSizable = 16
- const NSViewLayerContentsRedrawBeforeViewResize = 3
- const NSViewLayerContentsRedrawDuringViewResize = 2
- const NSViewLayerContentsRedrawNever = 0
- const NSViewLayerContentsRedrawOnSetNeedsDisplay = 1
- const NSViewMaxXMargin = 4
- const NSViewMaxYMargin = 32
- const NSViewMinXMargin = 1
- const NSViewMinYMargin = 8
- const NSViewNotSizable = 0
- const NSViewWidthSizable = 2
Window Order Constants
Constant | Value | Description |
---|---|---|
NSWindowAbove | 1 |
Moves the window above the indicated window. |
NSWindowBelow | -1 |
Moves the window below the indicated window. |
NSWindowOut | 0 |
Moves the window off the screen. |
Super class NSResponderMBS
- 3 properties
- property Handle as Integer
- property menu as NSMenuMBS
- property nextResponder as NSResponderMBS
- 123 methods
- method beginGestureWithEvent(e as NSEventMBS)
- method cancelOperation
- method capitalizeWord
- method centerSelectionInVisibleArea
- method changeCaseOfLetter
- method complete
- method Constructor Private
- method cursorUpdate(e as NSEventMBS)
- method deleteBackward
- method deleteBackwardByDecomposingPreviousCharacter
- method deleteForward
- method deleteToBeginningOfLine
- method deleteToBeginningOfParagraph
- method deleteToEndOfLine
- method deleteToEndOfParagraph
- method deleteToMark
- method deleteWordBackward
- method deleteWordForward
- method endGestureWithEvent(e as NSEventMBS)
- method flagsChanged(e as NSEventMBS)
- method flushBufferedKeyEvents
- method helpRequested(e as NSEventMBS)
- method indent
- method insertBacktab
- method insertContainerBreak
- method insertDoubleQuoteIgnoringSubstitution
- method insertLineBreak
- method insertNewline
- method insertNewlineIgnoringFieldEditor
- method insertParagraphSeparator
- method insertSingleQuoteIgnoringSubstitution
- method insertTab
- method insertTabIgnoringFieldEditor
- method keyDown(e as NSEventMBS)
- method keyUp(e as NSEventMBS)
- method lowercaseWord
- method magnifyWithEvent(e as NSEventMBS)
- method makeBaseWritingDirectionLeftToRight
- method makeBaseWritingDirectionNatural
- method makeBaseWritingDirectionRightToLeft
- method makeTextWritingDirectionLeftToRight
- method makeTextWritingDirectionNatural
- method makeTextWritingDirectionRightToLeft
- method mouseDown(e as NSEventMBS)
- method mouseDragged(e as NSEventMBS)
- method mouseEntered(e as NSEventMBS)
- method mouseExited(e as NSEventMBS)
- method mouseMoved(e as NSEventMBS)
- method mouseUp(e as NSEventMBS)
- method moveBackward
- method moveBackwardAndModifySelection
- method moveDown
- method moveDownAndModifySelection
- method moveForward
- method moveForwardAndModifySelection
- method moveLeft
- method moveLeftAndModifySelection
- method moveParagraphBackwardAndModifySelection
- method moveParagraphForwardAndModifySelection
- method moveRight
- method moveRightAndModifySelection
- method moveToBeginningOfDocument
- method moveToBeginningOfDocumentAndModifySelection
- method moveToBeginningOfLine
- method moveToBeginningOfLineAndModifySelection
- method moveToBeginningOfParagraph
- method moveToBeginningOfParagraphAndModifySelection
- method moveToEndOfDocument
- method moveToEndOfDocumentAndModifySelection
- method moveToEndOfLine
- method moveToEndOfLineAndModifySelection
- method moveToEndOfParagraph
- method moveToEndOfParagraphAndModifySelection
- method moveToLeftEndOfLine
- method moveToLeftEndOfLineAndModifySelection
- method moveToRightEndOfLine
- method moveToRightEndOfLineAndModifySelection
- method moveUp
- method moveUpAndModifySelection
- method moveWordBackward
- method moveWordBackwardAndModifySelection
- method moveWordForward
- method moveWordForwardAndModifySelection
- method moveWordLeft
- method moveWordLeftAndModifySelection
- method moveWordRight
- method moveWordRightAndModifySelection
- method otherMouseDown(e as NSEventMBS)
- method otherMouseDragged(e as NSEventMBS)
- method otherMouseUp(e as NSEventMBS)
- method pageDown
- method pageDownAndModifySelection
- method pageUp
- method pageUpAndModifySelection
- method performMnemonic(theString as string) as boolean
- method presentError(e as NSErrorMBS) as boolean
- method rightMouseDown(e as NSEventMBS)
- method rightMouseDragged(e as NSEventMBS)
- method rightMouseUp(e as NSEventMBS)
- method rotateWithEvent(e as NSEventMBS)
- method scrollLineDown
- method scrollLineUp
- method scrollPageDown
- method scrollPageUp
- method scrollToBeginningOfDocument
- method scrollToEndOfDocument
- method scrollWheel(e as NSEventMBS)
- method selectAll
- method selectLine
- method selectParagraph
- method selectToMark
- method selectWord
- method setMark
- method showContextHelp
- method swapWithMark
- method swipeWithEvent(e as NSEventMBS)
- method tabletPoint(e as NSEventMBS)
- method tabletProximity(e as NSEventMBS)
- method transpose
- method transposeWords
- method undoManager as NSUndoManagerMBS
- method uppercaseWord
- method yank
This class has no sub classes.
Some useful global functions for this class:
- InstallWebDownloadDelegate(extends w as WebViewMBS, theDelegate as WebDownloadDelegateMBS)
- InstallWebFrameLoadDelegate(extends w as WebViewMBS, theDelegate as WebFrameLoadDelegateMBS)
- InstallWebPolicyDelegate(extends w as WebViewMBS, theDelegate as WebPolicyDelegateMBS)
- InstallWebResourceLoadDelegate(extends w as WebViewMBS, theDelegate as WebResourceLoadDelegateMBS)
- InstallWebUIDelegate(extends w as WebViewMBS, theDelegate as WebUIDelegateMBS)
Some methods using this class:
- WebFrameMBS.webView as WebViewMBS
Some properties using for this class:
- WebViewControlMBS.View as WebViewMBS
Some events using this class:
- WebFrameLoadDelegateMBS.didCancelClientRedirectForFrame(WebView as WebViewMBS, frame as WebFrameMBS) as boolean
- WebFrameLoadDelegateMBS.didCommitLoadForFrame(WebView as WebViewMBS, frame as WebFrameMBS) as boolean
- WebFrameLoadDelegateMBS.didFailLoadWithError(WebView as WebViewMBS, ErrorString as string, frame as WebFrameMBS) as boolean
- WebFrameLoadDelegateMBS.didFailProvisionalLoadWithError(WebView as WebViewMBS, ErrorString as string, frame as WebFrameMBS) as boolean
- WebFrameLoadDelegateMBS.didFinishLoadForFrame(WebView as WebViewMBS, frame as WebFrameMBS) as boolean
- WebFrameLoadDelegateMBS.didReceiveServerRedirectForProvisionalLoadForFrame(WebView as WebViewMBS, frame as WebFrameMBS) as boolean
- WebFrameLoadDelegateMBS.didReceiveTitle(WebView as WebViewMBS, title as string, frame as WebFrameMBS) as boolean
- WebFrameLoadDelegateMBS.didStartProvisionalLoadForFrame(WebView as WebViewMBS, frame as WebFrameMBS) as boolean
- WebFrameLoadDelegateMBS.willCloseFrame(WebView as WebViewMBS, frame as WebFrameMBS) as boolean
- WebFrameLoadDelegateMBS.windowScriptObjectAvailable(WebView as WebViewMBS, windowScriptObject as WebScriptObjectMBS) as boolean
Blog Entries
- Xojo 2020r1 available
- HTMLViewer JavaScript communication for Xojo
- MBS Xojo Plugins, version 20.0r5
- Upgrading our HTMLViewer functions for Internet Explorer
- HTMLViewer JavaScript communication for Xojo
- Picture from HTMLViewer
- MBS Real Studio Plugins, version 12.2fc1
- MBS Real Studio Plugins, version 12.2pr1
- MBS Real Studio Plugins, version 11.1pr11
- MBS REALbasic Plugins, version 10.4pr1
Xojo Developer Magazine
The items on this page are in the following plugins: MBS MacBase Plugin, MBS MacControls Plugin.
WebView2WindowFeaturesMBS - WIADataCallbackMBS
Feedback: Report problem or ask question.