Document wxWebView backend name constants

Mention the constants that are used to identify the backends.

Closes #19168.
This commit is contained in:
Vadim Zeitlin
2021-05-01 14:25:18 +02:00
parent 318784fc1b
commit 4a08c5f965

View File

@@ -307,10 +307,16 @@ public:
although currently just one is available. It differs from wxHtmlWindow in although currently just one is available. It differs from wxHtmlWindow in
that each backend is actually a full rendering engine, Internet Explorer or Edge on MSW and that each backend is actually a full rendering engine, Internet Explorer or Edge on MSW and
WebKit on macOS and GTK. This allows the correct viewing of complex pages with WebKit on macOS and GTK. This allows the correct viewing of complex pages with
javascript and css. JavaScript and CSS.
@section descriptions Backend Descriptions @section descriptions Backend Descriptions
This class supports using multiple backends, corresponding to different
implementations of the same functionality. Under macOS and Unix platforms
only a single, WebKit-based, backend is currently provided, but under MSW
both the legacy IE backend and the new Edge backend exist. Backends are
identified by their names, documented in the backend descriptions below.
@subsection wxWEBVIEW_BACKEND_IE wxWEBVIEW_BACKEND_IE (MSW) @subsection wxWEBVIEW_BACKEND_IE wxWEBVIEW_BACKEND_IE (MSW)
The IE backend uses Microsoft's The IE backend uses Microsoft's
@@ -323,6 +329,9 @@ public:
This backend has full support for custom schemes and virtual file systems. This backend has full support for custom schemes and virtual file systems.
The predefined @c wxWebViewBackendIE constant contains the name of this
backend and can be used to explicitly select it when using wxWebView::New().
@note If you plan to display any modern web content you should consider using @ref wxWEBVIEW_BACKEND_EDGE, @note If you plan to display any modern web content you should consider using @ref wxWEBVIEW_BACKEND_EDGE,
as Internet Explorer is not supported anymore by Microsoft. as Internet Explorer is not supported anymore by Microsoft.
@@ -355,7 +364,7 @@ public:
documentation, as required by its licence documentation, as required by its licence
If enabled and available at runtime Edge will be selected as the default If enabled and available at runtime Edge will be selected as the default
backend. If you require the IE backend use @c wxWEBVIEW_BACKEND_IE when backend. If you require the IE backend use @c wxWebViewBackendIE when
using wxWebView::New(). using wxWebView::New().
If your application should use a If your application should use a
@@ -364,6 +373,9 @@ public:
wxWebViewEdge::MSWSetBrowserExecutableDir() to specify its usage before wxWebViewEdge::MSWSetBrowserExecutableDir() to specify its usage before
using the Edge backend. using the Edge backend.
The predefined @c wxWebViewBackendEdge constant contains the name of this
backend.
@subsection wxWEBVIEW_WEBKIT wxWEBVIEW_WEBKIT (GTK) @subsection wxWEBVIEW_WEBKIT wxWEBVIEW_WEBKIT (GTK)
Under GTK the WebKit backend uses Under GTK the WebKit backend uses
@@ -376,6 +388,9 @@ public:
resources such as images and stylesheets are currently loaded using the resources such as images and stylesheets are currently loaded using the
data:// scheme. data:// scheme.
The predefined @c wxWebViewBackendWebKit constant contains the name of this
backend.
@subsection wxWEBVIEW_WEBKIT2 wxWEBVIEW_WEBKIT2 (GTK3) @subsection wxWEBVIEW_WEBKIT2 wxWEBVIEW_WEBKIT2 (GTK3)
Under GTK3 the WebKit2 version of <a href="http://webkitgtk.org/">WebKitGTK+</a> Under GTK3 the WebKit2 version of <a href="http://webkitgtk.org/">WebKitGTK+</a>
@@ -385,6 +400,9 @@ public:
All features are All features are
supported except for clearing and enabling / disabling the history. supported except for clearing and enabling / disabling the history.
The predefined @c wxWebViewBackendWebKit constant contains the name of this
backend.
@subsection wxWEBVIEW_WEBKIT_MACOS wxWEBVIEW_WEBKIT (macOS) @subsection wxWEBVIEW_WEBKIT_MACOS wxWEBVIEW_WEBKIT (macOS)
The macOS WebKit backend uses Apple's The macOS WebKit backend uses Apple's
@@ -401,6 +419,9 @@ public:
For further details see the documentation on NSAppTransportSecurity For further details see the documentation on NSAppTransportSecurity
<a target=_new href="https://developer.apple.com/documentation/bundleresources/information_property_list/nsapptransportsecurity">here</a> <a target=_new href="https://developer.apple.com/documentation/bundleresources/information_property_list/nsapptransportsecurity">here</a>
The predefined @c wxWebViewBackendWebKit constant contains the name of this
backend.
@section async Asynchronous Notifications @section async Asynchronous Notifications
Many of the methods in wxWebView are asynchronous, i.e. they return Many of the methods in wxWebView are asynchronous, i.e. they return
@@ -537,6 +558,14 @@ public:
/** /**
Allows to check if a specific backend is currently available. Allows to check if a specific backend is currently available.
For example, to check for Edge backend availability:
@code
if ( wxWebView::IsBackendAvailable(wxWebViewBackendEdge) )
{
... enable some extra functionality not available with the IE backend ...
}
@endcode
@since 3.1.4 @since 3.1.4
*/ */
static bool IsBackendAvailable(const wxString& backend); static bool IsBackendAvailable(const wxString& backend);