MBS Plugin Documentation
Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchie
New in Version 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 9.0
The list of the themes, classes, controls, modules, global methods by category, global methods by name, screenshots, licenses and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
method, HTMLViewer, MBS Win Plugin (WindowsHTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.8, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Retrieves a string equivalent to the HTTP user-agent request header.
Notes:
The HTTP user-agent request header contains information about compatibility, the browser, and the platform name. For more information about the browser, see the IENavigatorappNameMBS property. For more information about the platform, see the IENavigatorappVersionMBS property.
The IENavigatoruserAgentMBS property dynamically returns a different value depending on the browser and platform versions. For example, Microsoft Internet Explorer 6 returns the following string for Microsoft Windows XP.
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Example value: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
Some examples which use this method:
method, HTMLViewer, MBS Win Plugin (WindowsHTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.8, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Retrieves the operating system's natural language setting.
Notes: Example value: "de"
Some examples which use this method:
method, HTMLViewer, MBS Win Plugin (WindowsHTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.8, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Sets or retrieves the protocol portion of a URL.
Notes: Example value: "HTTP (HyperText Transfer-Protokoll)"
Some examples which use this method:
method, HTMLViewer, MBS Win Plugin (WindowsHTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.8, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Gets the URL of the location that referred the user to the current page.
Notes: Example value: "http://www.apple.com/"
Some examples which use this method:
method, HTMLViewer, MBS Win Plugin (WindowsHTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.6, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Runs a given javascript code.
Notes:
Returns true if the javascript code was sent to the browser.
Returns false on any error.
The IE API does not allow to return values from Javascript. So you need to store your result in window.title and access it later using IETitleMBS.
Some examples which use this method:
method, HTMLViewer, MBS Win Plugin (WindowsHTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.8, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Retrieves the security state.
Notes: Example value: "Für diesen Dokumententyp gibt es kein Sicherheitszertifikat."
Some examples which use this method:
method, HTMLViewer, MBS Win Plugin (WindowsHTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.7, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Returns a copy of the text of the current webpage.
Notes: Returns "" on any error.
Some examples which use this method:
method, HTMLViewer, MBS Win Plugin (WindowsHTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.8, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Sets or gets the title of the document.
Notes:
Example value: "Apple"
(Read and Write runtime property)
Some examples which use this method:
method, HTMLViewer, MBS Win Plugin (WindowsHTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.8, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Retrieves a string representation of the object.
Notes: Example value: "[object]"
Some examples which use this method:
method, HTMLViewer, MBS Win Plugin (WindowsHTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.8, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Sets or gets the URL for the current document.
Notes:
Example value: "http://www.apple.com/"
(Read and Write runtime property)
Some examples which use this method:
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerDelegate), class HTMLViewer, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Installs a WebFrameLoadDelegateMBS to receive events from htmlviewer control.
Notes: You need to keep a reference to this WebFrameLoadDelegateMBS object in the window where the htmlviewer is inside so the class is not destroyed too early.
Some examples which use this method:
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerDelegate), class HTMLViewer, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Installs a WebPolicyDelegateMBS to receive events from htmlviewer control.
Notes: You need to keep a reference to this WebPolicyDelegateMBS object in the window where the htmlviewer is inside so the class is not destroyed too early.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerDelegate), class HTMLViewer, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Installs a WebResourceLoadDelegateMBS to receive events from htmlviewer control.
Notes: You need to keep a reference to this WebResourceLoadDelegateMBS object in the window where the htmlviewer is inside so the class is not destroyed too early.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerDelegate), class HTMLViewer, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Installs a HTMLViewerUIDelegateMBS to receive events from htmlviewer control.
Notes: You need to keep a reference to this HTMLViewerUIDelegateMBS object in the window where the htmlviewer is inside so the class is not destroyed too early.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Loads data as a webpage.
Example:
HTMLViewer1.LoadHTMLStringMBS "<b>test</b>","text/plain","","" // show as plain text
HTMLViewer1.LoadHTMLStringMBS "<b>test</b>","text/html","","" // show as html
Notes: data: The data to use for the main page of the document.
mime: The MIME type of the data. e.g. "text/html"
textencoding: The encoding of the data.
url: The base URL to apply to relative URLs within the document.
All parameters can be empty if needed.
Using "text/plain" mime type you can show source code of website.
Like a most Webkit Methods this one can not be called from a thread.
Some examples which use this method:
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Loads a html page from a string.
Notes:
html: The string to use for the main page of the document.
url: The base URL to apply to relative URLs within the document. (optional)
Like most Webkit Methods this one can not be called from a thread.
Some examples which use this method:
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Loads the url.
Example:
htmlviewer1.LoadURLMBS "http://www.monkeybreadsoftware.de"
Notes: Like most Webkit Methods this one can not be called from a thread.Some examples which use this method:
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: htmlviewer1.LoadURLMBS "http://www.monkeybreadsoftware.de", 1, 2.0
Notes:
The timeout interval is in seconds.
Constants for the CachePolicy parameter:
| const UseProtocolCachePolicy | = 0 | Specifies that the caching logic defined in the protocol implementation, if any, is used for a particular URL load request. This is the default policy for URL load requests. |
| const ReloadIgnoringCacheData | = 1 | Specifies that the data for the URL load should be loaded from the originating source. No existing cache data should be used to satisfy a URL load request. |
| const ReturnCacheDataElseLoad | = 2 | Specifies that the existing cached data should be used to satisfy the request, regardless of its age or expiration date. If there is no existing data in the cache corresponding the request, the data is loaded from the originating source. |
| const ReturnCacheDataDontLoad | = 3 | Specifies that the existing cache data should be used to satisfy a request, regardless of its age or expiration date. If there is no existing data in the cache corresponding to a URL load request, no attempt is made to load the data from the originating source, and the load is considered to have failed. This constant specifies a behavior that is similar to an “offline” mode. |
Like most Webkit Methods this one can not be called from a thread.
Some examples which use this method:
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerWeb), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The main webframe currently displayed.
Example:
// get the current page url:
MsgBox HTMLViewer1.mainFramMBS.dataSource.request.URL
// get the html data of the current page:
MsgBox HTMLViewer1.mainFramMBS.dataSource.data
Notes: Nil if no is present.Some examples which use this method:
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Increases the text size in the webview.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Decreases the text size in the webview.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The value to use for the CSS media property.
Example:
w.mediaStyle="print"
Notes: Set or get the media style for the WebView. The mediaStyle will override the normal value of the CSS media property. Setting the value to nil will restore the normal value.
(Read and Write runtime property)
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerPrint), class HTMLViewer, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Shows a page setup sheet.
Notes:
If sheetTarget is nil a modal dialog is shown and the function returns after the user clicked one of the buttons to close the dialog.
If sheetTarget is a valid window reference this window will show a sheet and the function returns while the sheet waits for mouseclicks.
Returns true on success.
Some examples which use this method:
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The string to use a prefix for storing values for this WebView in the user defaults database.
Notes:
If the WebPreferences for this WebView are stored in the user defaults database, the string set in this method will be used a key prefix.
(Read and Write runtime property)
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerWeb), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The preferences for this htmlviewer.
Notes:
Nil on failure.
(Read and Write runtime property)
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerPrint), class HTMLViewer, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Show the print sheet and allows the user to print the web content.
Notes:
If sheetTarget is nil a modal dialog is shown and the function returns after the user clicked one of the buttons to close the dialog.
If sheetTarget is a valid window reference this window will show a sheet and the function returns while the sheet waits for mouseclicks.
If PDFFile is not nil, printing is redirected to a PDF file.
Returns true on success.
Some examples which use this method:
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerPrint), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Whether a printing sheet is visible.
Notes:
Used with the PageSetupDialog and the PrintDialog methods.
Returns true when a dialog is visible and false when not.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerPrint), class HTMLViewer, Console safe, Plugin version: 7.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Releases memory from the printing code.
Notes: First call PrintingStartMBS with your page size, then call several times PrintingPageMBS and finally call PrintingEndMBS.
Some examples which use this method:
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerPrint), class HTMLViewer, Console safe, Plugin version: 7.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Returns the given page as string.
Notes:
On any error the string is empty.
The string contains an one page PDF document.
First call PrintingStartMBS with your page size, then call several times PrintingPageMBS and finally call PrintingEndMBS.
Some examples which use this method:
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerPrint), class HTMLViewer, Console safe, Plugin version: 7.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Starts the printing code.
Example:
dim i,c as integer
dim f as FolderItem
dim s as string
dim b as BinaryStream
c=HTMLViewer1.PrintingStartMBS(800,600)
i=0
while i<c
s=HTMLViewer1.PrintingPageMBS(i)
f=DesktopFolder.Child("Page "+str(i+1)+".pdf")
b=f.CreateBinaryFile("")
if b<>nil then
b.Write s
b.Close
end if
i=i+1
wend
HTMLViewer1.PrintingEndMBS
MsgBox str(c)+" pages printed."
Notes: First call PrintingStartMBS with your page size, then call several times PrintingPageMBS and finally call PrintingEndMBS.
Only one print job can be processed at the same time as they use all the same global properties.
Returns the number of pages to be printed.
Some examples which use this method:
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerPrint), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Prints the web content without a dialog.
Notes:
If PDFFile is not nil, printing is redirected to a PDF file.
Returns true on success.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Reloads the current page.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Returns the content of the view as a EPS file's data.
Example:
dim f as FolderItem
dim b as BinaryStream
// create a new pdf with current content of view
f=DesktopFolder.Child("test.eps")
b=f.CreateBinaryFile("")
b.Write theHTMLViewer.RenderDocumentToEPSMBS
b.Close
f.Launch // show the pdf in preview
Notes: Returns "" on any error.
Will resize the eps page to match the size of the website.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Returns the content of the view as a PDF file's data.
Example:
dim f as FolderItem
dim b as BinaryStream
// create a new pdf with current content of view
f=DesktopFolder.Child("test.pdf")
b=f.CreateBinaryFile("")
b.Write theHTMLViewer.RenderDocumentToPDFMBS
b.Close
f.Launch // show the pdf in preview
Notes: Returns "" on any error.
Will resize the pdf page to match the size of the website.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Returns the content of the view as a EPS file's data.
Example:
dim f as FolderItem
dim b as BinaryStream
// create a new pdf with current content of view
f=DesktopFolder.Child("test.eps")
b=f.CreateBinaryFile("")
b.Write theHTMLViewer.RenderEPSMBS
b.Close
f.Launch // show the pdf in preview
Notes: Returns "" on any error.
If there is a scrollbar, it will be included.
For nice printouts, use the webview/htmlviewer printmbs method.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Returns the content of the view as a PDF file's data.
Example:
dim f as FolderItem
dim b as BinaryStream
// create a new pdf with current content of view
f=DesktopFolder.Child("test.pdf")
b=f.CreateBinaryFile("")
b.Write theHTMLViewer.RenderPDFMBS
b.Close
f.Launch // show the pdf in preview
Notes: Returns "" on any error.
If there is a scrollbar, it will be included.
For nice printouts, use the webview/htmlviewer printmbs method.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerImage), class HTMLViewer, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Makes a screenshot of the current displayed content.
Example:
dim f as FolderItem
dim b as BinaryStream
dim i as NSImageMBS
dim p as string
i=HTMLViewer1.RenderWebsiteImageMBS
p=i.PNGRepresentation
f=DesktopFolder.Child("test.png")
b=f.CreateBinaryFile("")
b.Write p
Notes: Nil on failure.
The image returned is the page completely without scrollbars, so it may be a few thousand pixels height and may not fit on a page to print.
The value of this variant must be an object of class NSImageMBS.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The height of the scroll view.
Notes: (Read and Write runtime property)
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The left position of the scroll view.
Example:
HTMLViewer1.ScrollLeftMBS=HTMLViewer1.ScrollLeftMBS+5
Notes: You can set this value to scroll manually.
(Read and Write runtime property)
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The top position of the scroll view.
Example:
HTMLViewer1.ScrollTopMBS=HTMLViewer1.ScrollTopMBS+5
Notes: You can set this value to scroll manually.
(Read and Write runtime property)
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The width of the scroll view.
Notes: (Read and Write runtime property)
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Searches a document view for a string and highlights the string if it is found.
Example:
call HTMLViewer1.SearchForMBS "holiday",true,false,true
Notes: Starts the search from the current selection. Will search across all frames.
text: The string to search for.
forward: True to search forward, False to seach backwards.
caseSensitive: True to for case-sensitive search, False for case-insensitive search.
Returns true if found, false if not found.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Whether the back forward history list is created by the webview.
Notes: Default is true.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewerPrint), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Loads page format settings from a string.
Notes: Returns true on success and false on failure.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Stop any pending loads on the frame's data source, and its children.
Some examples which use this method:
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Find out if the current web page supports text encodings.
Notes: Returns true if the document view of the current web page can support different text encodings.
method, HTMLViewer, MBS Cocoa Plugin (HTMLViewer), class HTMLViewer, Console safe, Plugin version: 7.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The size of the text rendering in views managed by this webView.
Notes:
A fractional percentage value, 1.0 is 100%.
(Read and Write runtime property)
The items on this page are in the following plugins: MBS Cocoa Plugin, MBS Win Plugin.
Monkeybread Software Realbasic Plugins - Bilder aus Nickenich