JUCE: WebView2Preferences Class Reference

JUCE

Public Member Functions | List of all members
WebView2Preferences Class Reference
juce_gui_extra » misc

Class used to create a set of preferences to pass to the WindowsWebView2WebBrowserComponent wrapper constructor to modify aspects of its behaviour and settings. More...

`#include <juce_WebBrowserComponent.h>`

## Public Member Functions
JUCE_NODISCARD WebView2Preferences | withDLLLocation (const File &location) const
| Sets a custom location for the WebView2Loader.dll that is not a part of the standard system DLL search paths. More...
WebView2Preferences | withUserDataFolder (const File &folder) const
| Sets a non-default location for storing user data for the browser instance. More...
JUCE_NODISCARD WebView2Preferences | withStatusBarDisabled () const
| If this is set, the status bar usually displayed in the lower-left of the webview will be disabled. More...
JUCE_NODISCARD WebView2Preferences | withBuiltInErrorPageDisabled () const
| If this is set, a blank page will be displayed on error instead of the default built-in error page. More...
JUCE_NODISCARD WebView2Preferences | withBackgroundColour (const Colour &colour) const
| Sets the background colour that WebView2 renders underneath all web content. More...
File | getDLLLocation () const
File | getUserDataFolder () const
bool | getIsStatusBarDisabled () const noexcept
bool | getIsBuiltInErrorPageDisabled () const noexcept
Colour | getBackgroundColour () const

## Detailed Description

Class used to create a set of preferences to pass to the WindowsWebView2WebBrowserComponent wrapper constructor to modify aspects of its behaviour and settings.

You can chain together a series of calls to this class's methods to create a set of whatever preferences you want to specify.

## Member Function Documentation

## ◆ withDLLLocation()

JUCE_NODISCARD WebView2Preferences WebView2Preferences::withDLLLocation | ( | const File & | location | ) | const

Sets a custom location for the WebView2Loader.dll that is not a part of the standard system DLL search paths.

References gl::location.

## ◆ withUserDataFolder()

WebView2Preferences WebView2Preferences::withUserDataFolder | ( | const File & | folder | ) | const

Sets a non-default location for storing user data for the browser instance.

## ◆ withStatusBarDisabled()

JUCE_NODISCARD WebView2Preferences WebView2Preferences::withStatusBarDisabled | ( |  | ) | const

If this is set, the status bar usually displayed in the lower-left of the webview will be disabled.

## ◆ withBuiltInErrorPageDisabled()

JUCE_NODISCARD WebView2Preferences WebView2Preferences::withBuiltInErrorPageDisabled | ( |  | ) | const

If this is set, a blank page will be displayed on error instead of the default built-in error page.

## ◆ withBackgroundColour()

JUCE_NODISCARD WebView2Preferences WebView2Preferences::withBackgroundColour | ( | const Colour & | colour | ) | const

Sets the background colour that WebView2 renders underneath all web content.

This colour must either be fully opaque or transparent. On Windows 7 this colour must be opaque.

References Colour::isOpaque(), Colour::isTransparent(), and jassert.

## ◆ getDLLLocation()

File WebView2Preferences::getDLLLocation | ( |  | ) | const

## ◆ getUserDataFolder()

File WebView2Preferences::getUserDataFolder | ( |  | ) | const

## ◆ getIsStatusBarDisabled()

bool WebView2Preferences::getIsStatusBarDisabled | ( |  | ) | const
| noexcept

## ◆ getIsBuiltInErrorPageDisabled()

bool WebView2Preferences::getIsBuiltInErrorPageDisabled | ( |  | ) | const
| noexcept

## ◆ getBackgroundColour()

Colour WebView2Preferences::getBackgroundColour | ( |  | ) | const

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

- juce_WebBrowserComponent.h