#include <wx/webview.h>
This class allows access to web view configuration options and settings, that have to be specified before placing a webview in a window with wxWebView::Create().
Public Member Functions | |
virtual void * | GetNativeConfiguration () const |
Returns the pointer to the native configuration used during creation of a wxWebView. More... | |
wxString | GetBackend () const |
Returns the backend identifier for which this configuration was created. More... | |
void | SetDataPath (const wxString &path) |
Set the data path for the webview. More... | |
wxString | GetDataPath () const |
Returns the data path for the webview. More... | |
bool | EnablePersistentStorage (bool enable) |
Allows to disable persistent storage for the webview. More... | |
bool wxWebViewConfiguration::EnablePersistentStorage | ( | bool | enable | ) |
Allows to disable persistent storage for the webview.
The default is to enable it. When the webview is created without persistent storage the data is stored in memory and is lost when the webview is destroyed. In browsers this is equivalent to "private browsing" or "incognito mode".
wxString wxWebViewConfiguration::GetBackend | ( | ) | const |
Returns the backend identifier for which this configuration was created.
wxString wxWebViewConfiguration::GetDataPath | ( | ) | const |
Returns the data path for the webview.
This is the path where the webview stores its data, such as cookies, local storage, etc.
|
virtual |
Returns the pointer to the native configuration used during creation of a wxWebView.
When using two-step creation this method can be used to customize configuration options not available via GetNativeBackend() after using Create().
Additional instances of wxWebView must be created using the same wxWebViewConfiguration instance.
All settings must be set before creating a new web view with wxWebView::New().
The return value needs to be down-casted to the appropriate type depending on the backend:
The following pseudo code shows how to use this method with two-step creation to set no user action requirement to play video in a web view:
void wxWebViewConfiguration::SetDataPath | ( | const wxString & | path | ) |
Set the data path for the webview.
This is the path where the webview stores its data, such as cookies, local storage, etc.
path | The path to the data directory. |