JUCE
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions
WebBrowserComponent Class Reference

A component that displays an embedded web browser. More...

Inherits Component.

List of all members.

Public Member Functions

 WebBrowserComponent (bool unloadPageWhenBrowserIsHidden=true)
 Creates a WebBrowserComponent.
 ~WebBrowserComponent ()
 Destructor.
void goToURL (const String &url, const StringArray *headers=nullptr, const MemoryBlock *postData=nullptr)
 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.
virtual void pageFinishedLoading (const String &url)
 This callback happens when the browser has finished loading a page.
void paint (Graphics &g)
void resized ()
void parentHierarchyChanged ()
void visibilityChanged ()

Detailed Description

A component that displays an embedded web browser.

The browser itself will be platform-dependent. On the Mac, probably Safari, on Windows, probably IE.


Constructor & Destructor Documentation

WebBrowserComponent::WebBrowserComponent ( bool  unloadPageWhenBrowserIsHidden = true) [explicit]

Creates a WebBrowserComponent.

Once it's created and visible, send the browser to a URL using goToURL().

Parameters:
unloadPageWhenBrowserIsHiddenif 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.

Destructor.


Member Function Documentation

void WebBrowserComponent::goToURL ( const String url,
const StringArray headers = nullptr,
const MemoryBlock postData = nullptr 
)

Sends the browser to a particular URL.

Parameters:
urlthe URL to go to.
headersan 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"
postDataan optional block of data that will be attached to the HTTP POST request

Stops the current page loading.

Sends the browser back one page.

Sends the browser forward one page.

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.

virtual void WebBrowserComponent::pageFinishedLoading ( const String url) [virtual]

This callback happens when the browser has finished loading a page.

void WebBrowserComponent::paint ( Graphics g) [virtual]

Reimplemented from Component.

void WebBrowserComponent::resized ( ) [virtual]

Reimplemented from Component.

Reimplemented from Component.

Reimplemented from Component.


The documentation for this class was generated from the following file: