41 wxPanel( aParent, aId, aPos, aSize, aStyle ),
50 wxBoxSizer* sizer =
new wxBoxSizer( wxVERTICAL );
52 if( !wxGetEnv( wxT(
"WEBKIT_DISABLE_COMPOSITING_MODE" ),
nullptr ) )
54 wxSetEnv( wxT(
"WEBKIT_DISABLE_COMPOSITING_MODE" ), wxT(
"1" ) );
57#if wxCHECK_VERSION( 3, 3, 0 )
58 wxWebViewConfiguration
config = wxWebView::NewConfiguration();
64 ICoreWebView2EnvironmentOptions* webViewOptions =
65 (ICoreWebView2EnvironmentOptions*)
config.GetNativeConfiguration();
68 webViewOptions->put_AdditionalBrowserArguments(
L"--disable-features=msEdgeMouseGestureSupported,"
69 L"msEdgeMouseGestureDefaultEnabled,OverscrollHistoryNavigation "
70 L"--enable-features=kEdgeMouseGestureDisabledInCN" );
86 browser->RegisterHandler( wxSharedPtr<wxWebViewHandler>(
new wxWebViewArchiveHandler(
"wxfs" ) ) );
87 browser->RegisterHandler( wxSharedPtr<wxWebViewHandler>(
new wxWebViewFSHandler(
"memory" ) ) );
90 browser->Create(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize );
91 sizer->Add( browser, 1, wxEXPAND );
95 browser->RegisterHandler( wxSharedPtr<wxWebViewHandler>(
new wxWebViewArchiveHandler(
"wxfs" ) ) );
96 browser->RegisterHandler( wxSharedPtr<wxWebViewHandler>(
new wxWebViewFSHandler(
"memory" ) ) );
161 wxLogTrace(
"webview",
"Adding message handler for: %s", aName );
166 it->second = std::move( aHandler );
179 wxEventLoopBase* activeLoop = wxEventLoopBase::GetActive();
181 if( activeLoop && ( !activeLoop->IsMain() || activeLoop->IsYielding() ) )
187 if( !browser->AddScriptMessageHandler( aName ) )
188 wxLogTrace(
"webview",
"Could not add script message handler %s", aName );
WEBVIEW_PANEL(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, const int style=0, TOOL_MANAGER *aToolManager=nullptr, TOOL_BASE *aTool=nullptr)