20#ifndef WEBVIEW_PANEL_H
21#define WEBVIEW_PANEL_H
24#include <wx/webview.h>
33 explicit WEBVIEW_PANEL( wxWindow* parent, wxWindowID
id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
34 const wxSize& size = wxDefaultSize,
const int style = 0 );
39 void LoadURL(
const wxString& url );
40 void SetPage(
const wxString& htmlContent );
51 void OnError( wxWebViewEvent& evt );
WEBVIEW_PANEL(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, const int style=0)
void OnScriptMessage(wxWebViewEvent &evt)
void OnNewWindow(wxWebViewEvent &evt)
std::map< wxString, MESSAGE_HANDLER > m_msgHandlers
void SetPage(const wxString &htmlContent)
void OnWebViewLoaded(wxWebViewEvent &evt)
void OnNavigationRequest(wxWebViewEvent &evt)
void ClearMessageHandlers()
bool AddMessageHandler(const wxString &name, MESSAGE_HANDLER handler)
std::function< void(const wxString &)> MESSAGE_HANDLER
void OnScriptResult(wxWebViewEvent &evt)
wxWebView * GetWebView() const
void OnError(wxWebViewEvent &evt)
~WEBVIEW_PANEL() override
void LoadURL(const wxString &url)