@@ -105,8 +105,6 @@ private:
|
|||||||
|
|
||||||
void OnSize(wxSizeEvent& event);
|
void OnSize(wxSizeEvent& event);
|
||||||
|
|
||||||
void OnShow(wxShowEvent& event);
|
|
||||||
|
|
||||||
bool RunScriptSync(const wxString& javascript, wxString* output = NULL) const;
|
bool RunScriptSync(const wxString& javascript, wxString* output = NULL) const;
|
||||||
|
|
||||||
wxDECLARE_DYNAMIC_CLASS(wxWebViewEdge);
|
wxDECLARE_DYNAMIC_CLASS(wxWebViewEdge);
|
||||||
|
@@ -296,6 +296,7 @@ HRESULT wxWebViewEdgeImpl::OnWebViewCreated(HRESULT result, ICoreWebView2Control
|
|||||||
|
|
||||||
m_initialized = true;
|
m_initialized = true;
|
||||||
UpdateBounds();
|
UpdateBounds();
|
||||||
|
m_webViewController->put_IsVisible(true);
|
||||||
|
|
||||||
// Connect and handle the various WebView events
|
// Connect and handle the various WebView events
|
||||||
m_webView->add_NavigationStarting(
|
m_webView->add_NavigationStarting(
|
||||||
@@ -362,7 +363,6 @@ ICoreWebView2Settings* wxWebViewEdgeImpl::GetSettings()
|
|||||||
|
|
||||||
wxWebViewEdge::~wxWebViewEdge()
|
wxWebViewEdge::~wxWebViewEdge()
|
||||||
{
|
{
|
||||||
Unbind(wxEVT_SHOW, &wxWebViewEdge::OnShow, this);
|
|
||||||
delete m_impl;
|
delete m_impl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -387,7 +387,6 @@ bool wxWebViewEdge::Create(wxWindow* parent,
|
|||||||
if (!m_impl->Create())
|
if (!m_impl->Create())
|
||||||
return false;
|
return false;
|
||||||
Bind(wxEVT_SIZE, &wxWebViewEdge::OnSize, this);
|
Bind(wxEVT_SIZE, &wxWebViewEdge::OnSize, this);
|
||||||
Bind(wxEVT_SHOW, &wxWebViewEdge::OnShow, this);
|
|
||||||
|
|
||||||
LoadURL(url);
|
LoadURL(url);
|
||||||
return true;
|
return true;
|
||||||
@@ -399,13 +398,6 @@ void wxWebViewEdge::OnSize(wxSizeEvent& event)
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWebViewEdge::OnShow(wxShowEvent& event)
|
|
||||||
{
|
|
||||||
if (m_impl->m_webView)
|
|
||||||
m_impl->m_webViewController->put_IsVisible(event.IsShown());
|
|
||||||
event.Skip();
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWebViewEdge::LoadURL(const wxString& url)
|
void wxWebViewEdge::LoadURL(const wxString& url)
|
||||||
{
|
{
|
||||||
if (!m_impl->m_webView)
|
if (!m_impl->m_webView)
|
||||||
|
Reference in New Issue
Block a user