A component that displays an embedded web browser. More...
Inherits Component.
Public Member Functions | |
| WebBrowserComponent (bool unloadPageWhenBrowserIsHidden=true) | |
| Creates a WebBrowserComponent. | |
| ~WebBrowserComponent () | |
| Destructor. | |
| void | goToURL (const String &url, const StringArray *headers=0, const MemoryBlock *postData=0) |
| Sends the browser to a particular URL. | |
| void | stop () |
| Stops the current page loading. | |
| void | goBack () |
| Sends the browser back one page. | |
| void | goForward () |
| Sends the browser forward one page. | |
| void | refresh () |
| Refreshes the browser. | |
| virtual bool | pageAboutToLoad (const String &newURL) |
| This callback is called when the browser is about to navigate to a new location. | |
| void | paint (Graphics &g) |
| void | resized () |
| void | parentHierarchyChanged () |
| void | visibilityChanged () |
A component that displays an embedded web browser.
The browser itself will be platform-dependent. On the Mac, probably Safari, on Windows, probably IE.
| WebBrowserComponent::WebBrowserComponent | ( | bool | unloadPageWhenBrowserIsHidden = true |
) | [explicit] |
Creates a WebBrowserComponent.
Once it's created and visible, send the browser to a URL using goToURL().
| unloadPageWhenBrowserIsHidden | if this is true, then when the browser component is taken offscreen, it'll clear the current page and replace it with a blank page - this can be handy to stop the browser using resources in the background when it's not actually being used. |
| WebBrowserComponent::~WebBrowserComponent | ( | ) |
Destructor.
| void WebBrowserComponent::goToURL | ( | const String & | url, | |
| const StringArray * | headers = 0, |
|||
| const MemoryBlock * | postData = 0 | |||
| ) |
Sends the browser to a particular URL.
| url | the URL to go to. | |
| headers | an optional set of parameters to put in the HTTP header. If you supply this, it should be a set of string in the form "HeaderKey: HeaderValue" | |
| postData | an optional block of data that will be attached to the HTTP POST request |
| void WebBrowserComponent::stop | ( | ) |
Stops the current page loading.
| void WebBrowserComponent::goBack | ( | ) |
Sends the browser back one page.
| void WebBrowserComponent::goForward | ( | ) |
Sends the browser forward one page.
| void WebBrowserComponent::refresh | ( | ) |
Refreshes the browser.
| virtual bool WebBrowserComponent::pageAboutToLoad | ( | const String & | newURL | ) | [virtual] |
This callback is called when the browser is about to navigate to a new location.
You can override this method to perform some action when the user tries to go to a particular URL. To allow the operation to carry on, return true, or return false to stop the navigation happening.
| void WebBrowserComponent::paint | ( | Graphics & | g | ) | [virtual] |
For internal use only.
Reimplemented from Component.
| void WebBrowserComponent::resized | ( | ) | [virtual] |
For internal use only.
Reimplemented from Component.
| void WebBrowserComponent::parentHierarchyChanged | ( | ) | [virtual] |
For internal use only.
Reimplemented from Component.
| void WebBrowserComponent::visibilityChanged | ( | ) | [virtual] |
For internal use only.
Reimplemented from Component.
1.6.3