|
KiCad PCB EDA Suite
|
#include <webview_panel.h>
Public Types | |
| using | MESSAGE_HANDLER = std::function<void( const wxString& )> |
Public Member Functions | |
| 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) | |
| ~WEBVIEW_PANEL () override | |
| wxWebView * | GetWebView () const |
| void | LoadURL (const wxString &url) |
| void | SetPage (const wxString &htmlContent) |
| bool | AddMessageHandler (const wxString &name, MESSAGE_HANDLER handler) |
| void | ClearMessageHandlers () |
| void | SetHandleExternalLinks (bool aHandle) |
| bool | GetHandleExternalLinks () const |
| void | RunScriptAsync (const wxString &aScript, void *aClientData=nullptr) const |
| bool | HasLoadError () const |
| void | BindLoadedEvent () |
Protected Member Functions | |
| void | OnNavigationRequest (wxWebViewEvent &evt) |
| void | OnWebViewLoaded (wxWebViewEvent &evt) |
| void | OnNewWindow (wxWebViewEvent &evt) |
| void | OnScriptMessage (wxWebViewEvent &evt) |
| void | OnScriptResult (wxWebViewEvent &evt) |
| void | OnError (wxWebViewEvent &evt) |
Private Attributes | |
| bool | m_initialized |
| bool | m_handleExternalLinks |
| bool | m_loadError |
| bool | m_loadedEventBound |
| wxWebView * | m_browser |
| std::map< wxString, MESSAGE_HANDLER > | m_msgHandlers |
| TOOL_MANAGER * | m_toolManager |
| TOOL_BASE * | m_tool |
Definition at line 31 of file webview_panel.h.
| using WEBVIEW_PANEL::MESSAGE_HANDLER = std::function<void( const wxString& )> |
Definition at line 34 of file webview_panel.h.
|
explicit |
Definition at line 32 of file webview_panel.cpp.
References GetMajorMinorPatchVersion(), m_browser, m_handleExternalLinks, m_initialized, m_loadedEventBound, m_loadError, m_tool, m_toolManager, OnError(), OnNavigationRequest(), OnNewWindow(), OnScriptMessage(), and OnScriptResult().
|
override |
Definition at line 71 of file webview_panel.cpp.
| bool WEBVIEW_PANEL::AddMessageHandler | ( | const wxString & | name, |
| MESSAGE_HANDLER | handler ) |
Definition at line 110 of file webview_panel.cpp.
References m_browser, m_initialized, and m_msgHandlers.
| void WEBVIEW_PANEL::BindLoadedEvent | ( | ) |
Definition at line 75 of file webview_panel.cpp.
References m_browser, m_loadedEventBound, and OnWebViewLoaded().
| void WEBVIEW_PANEL::ClearMessageHandlers | ( | ) |
Definition at line 132 of file webview_panel.cpp.
References m_browser, and m_msgHandlers.
|
inline |
Definition at line 50 of file webview_panel.h.
References m_handleExternalLinks.
|
inline |
Definition at line 41 of file webview_panel.h.
References m_browser.
|
inline |
Definition at line 57 of file webview_panel.h.
References m_loadError.
| void WEBVIEW_PANEL::LoadURL | ( | const wxString & | url | ) |
Definition at line 84 of file webview_panel.cpp.
References m_browser.
|
protected |
Definition at line 256 of file webview_panel.cpp.
References m_loadError.
Referenced by WEBVIEW_PANEL().
|
protected |
Definition at line 142 of file webview_panel.cpp.
References m_handleExternalLinks, and m_loadError.
Referenced by WEBVIEW_PANEL().
|
protected |
Definition at line 210 of file webview_panel.cpp.
References m_browser.
Referenced by WEBVIEW_PANEL().
|
protected |
Definition at line 220 of file webview_panel.cpp.
References m_msgHandlers.
Referenced by WEBVIEW_PANEL().
|
protected |
Definition at line 250 of file webview_panel.cpp.
Referenced by WEBVIEW_PANEL().
|
protected |
Definition at line 157 of file webview_panel.cpp.
References m_browser, m_initialized, m_msgHandlers, m_tool, and m_toolManager.
Referenced by BindLoadedEvent().
|
inline |
Definition at line 52 of file webview_panel.h.
References m_browser.
|
inline |
Definition at line 49 of file webview_panel.h.
References m_handleExternalLinks.
| void WEBVIEW_PANEL::SetPage | ( | const wxString & | htmlContent | ) |
Definition at line 104 of file webview_panel.cpp.
References m_browser.
|
private |
Definition at line 75 of file webview_panel.h.
Referenced by AddMessageHandler(), BindLoadedEvent(), ClearMessageHandlers(), GetWebView(), LoadURL(), OnNewWindow(), OnWebViewLoaded(), RunScriptAsync(), SetPage(), and WEBVIEW_PANEL().
|
private |
Definition at line 72 of file webview_panel.h.
Referenced by GetHandleExternalLinks(), OnNavigationRequest(), SetHandleExternalLinks(), and WEBVIEW_PANEL().
|
private |
Definition at line 71 of file webview_panel.h.
Referenced by AddMessageHandler(), OnWebViewLoaded(), and WEBVIEW_PANEL().
|
private |
Definition at line 74 of file webview_panel.h.
Referenced by BindLoadedEvent(), and WEBVIEW_PANEL().
|
private |
Definition at line 73 of file webview_panel.h.
Referenced by HasLoadError(), OnError(), OnNavigationRequest(), and WEBVIEW_PANEL().
|
private |
Definition at line 76 of file webview_panel.h.
Referenced by AddMessageHandler(), ClearMessageHandlers(), OnScriptMessage(), and OnWebViewLoaded().
|
private |
Definition at line 78 of file webview_panel.h.
Referenced by OnWebViewLoaded(), and WEBVIEW_PANEL().
|
private |
Definition at line 77 of file webview_panel.h.
Referenced by OnWebViewLoaded(), and WEBVIEW_PANEL().