|
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 |
| const wxString & | GetBackend () 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 |
| wxString | m_backend |
| 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 38 of file webview_panel.cpp.
References config, GetMajorMinorPatchVersion(), L, m_backend, m_browser, m_handleExternalLinks, m_initialized, m_loadedEventBound, m_loadError, m_tool, m_toolManager, OnError(), OnNavigationRequest(), OnNewWindow(), OnScriptMessage(), and OnScriptResult().
|
override |
Definition at line 100 of file webview_panel.cpp.
| bool WEBVIEW_PANEL::AddMessageHandler | ( | const wxString & | name, |
| MESSAGE_HANDLER | handler ) |
Definition at line 139 of file webview_panel.cpp.
References m_browser, m_initialized, and m_msgHandlers.
| void WEBVIEW_PANEL::BindLoadedEvent | ( | ) |
Definition at line 104 of file webview_panel.cpp.
References m_browser, m_loadedEventBound, and OnWebViewLoaded().
| void WEBVIEW_PANEL::ClearMessageHandlers | ( | ) |
Definition at line 161 of file webview_panel.cpp.
References m_browser, and m_msgHandlers.
|
inline |
Definition at line 42 of file webview_panel.h.
References m_backend.
|
inline |
Definition at line 51 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 58 of file webview_panel.h.
References m_loadError.
| void WEBVIEW_PANEL::LoadURL | ( | const wxString & | url | ) |
Definition at line 113 of file webview_panel.cpp.
References m_browser.
|
protected |
Definition at line 286 of file webview_panel.cpp.
References m_loadError.
Referenced by WEBVIEW_PANEL().
|
protected |
Definition at line 171 of file webview_panel.cpp.
References m_handleExternalLinks, and m_loadError.
Referenced by WEBVIEW_PANEL().
|
protected |
Definition at line 239 of file webview_panel.cpp.
References m_browser.
Referenced by WEBVIEW_PANEL().
|
protected |
Definition at line 249 of file webview_panel.cpp.
References m_msgHandlers.
Referenced by WEBVIEW_PANEL().
|
protected |
Definition at line 280 of file webview_panel.cpp.
Referenced by WEBVIEW_PANEL().
|
protected |
Definition at line 186 of file webview_panel.cpp.
References m_browser, m_initialized, m_msgHandlers, m_tool, and m_toolManager.
Referenced by BindLoadedEvent().
|
inline |
Definition at line 53 of file webview_panel.h.
References m_browser.
|
inline |
Definition at line 50 of file webview_panel.h.
References m_handleExternalLinks.
| void WEBVIEW_PANEL::SetPage | ( | const wxString & | htmlContent | ) |
Definition at line 133 of file webview_panel.cpp.
References m_browser.
|
private |
Definition at line 77 of file webview_panel.h.
Referenced by GetBackend(), and WEBVIEW_PANEL().
|
private |
Definition at line 76 of file webview_panel.h.
Referenced by AddMessageHandler(), BindLoadedEvent(), ClearMessageHandlers(), GetWebView(), LoadURL(), OnNewWindow(), OnWebViewLoaded(), RunScriptAsync(), SetPage(), and WEBVIEW_PANEL().
|
private |
Definition at line 73 of file webview_panel.h.
Referenced by GetHandleExternalLinks(), OnNavigationRequest(), SetHandleExternalLinks(), and WEBVIEW_PANEL().
|
private |
Definition at line 72 of file webview_panel.h.
Referenced by AddMessageHandler(), OnWebViewLoaded(), and WEBVIEW_PANEL().
|
private |
Definition at line 75 of file webview_panel.h.
Referenced by BindLoadedEvent(), and WEBVIEW_PANEL().
|
private |
Definition at line 74 of file webview_panel.h.
Referenced by HasLoadError(), OnError(), OnNavigationRequest(), and WEBVIEW_PANEL().
|
private |
Definition at line 78 of file webview_panel.h.
Referenced by AddMessageHandler(), ClearMessageHandlers(), OnScriptMessage(), and OnWebViewLoaded().
|
private |
Definition at line 80 of file webview_panel.h.
Referenced by OnWebViewLoaded(), and WEBVIEW_PANEL().
|
private |
Definition at line 79 of file webview_panel.h.
Referenced by OnWebViewLoaded(), and WEBVIEW_PANEL().