X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e52aec972c61d03c631ae46ad676992980978638..438959cca892a7651634cc3a7aad4819ac49b23c:/include/wx/msw/webview_ie.h?ds=sidebyside diff --git a/include/wx/msw/webview_ie.h b/include/wx/msw/webview_ie.h index ca6feb4924..e51ec3e03d 100644 --- a/include/wx/msw/webview_ie.h +++ b/include/wx/msw/webview_ie.h @@ -75,7 +75,7 @@ public: virtual void ClearHistory(); virtual void EnableHistory(bool enable = true); virtual void Stop(); - virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT); + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); virtual wxString GetPageSource() const; virtual wxString GetPageText() const; @@ -108,7 +108,7 @@ public: virtual void Redo(); //Find function - virtual long Find(const wxString& text, int flags = wxWEB_VIEW_FIND_DEFAULT); + virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT); //Editing functions virtual void SetEditable(bool enable = true); @@ -184,7 +184,7 @@ private: bool CanExecCommand(wxString command) const; void ExecCommand(wxString command); wxCOMPtr GetDocument() const; - bool IsElementVisible(IHTMLElement* elm); + bool IsElementVisible(wxCOMPtr elm); //Find helper functions. void FindInternal(const wxString& text, int flags, int internal_flag); long FindNext(int direction = 1); @@ -195,6 +195,20 @@ private: wxDECLARE_DYNAMIC_CLASS(wxWebViewIE); }; +class WXDLLIMPEXP_WEBVIEW wxWebViewFactoryIE : public wxWebViewFactory +{ +public: + virtual wxWebView* Create() { return new wxWebViewIE; } + virtual wxWebView* Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) + { return new wxWebViewIE(parent, id, url, pos, size, style, name); } +}; + class VirtualProtocol : public wxIInternetProtocol { protected: @@ -241,7 +255,10 @@ public: class ClassFactory : public IClassFactory { public: - ClassFactory(wxSharedPtr handler) : m_handler(handler) {} + ClassFactory(wxSharedPtr handler) : m_handler(handler) + { AddRef(); } + + wxString GetName() { return m_handler->GetName(); } //IClassFactory HRESULT STDMETHODCALLTYPE CreateInstance(IUnknown* pUnkOuter, @@ -268,8 +285,9 @@ private: class DocHostUIHandler : public wxIDocHostUIHandler { public: - DocHostUIHandler() {}; + DocHostUIHandler(wxWebView* browser) { m_browser = browser; } ~DocHostUIHandler() {}; + virtual HRESULT wxSTDCALL ShowContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved); @@ -316,6 +334,9 @@ public: IDataObject **ppDORet); //IUnknown DECLARE_IUNKNOWN_METHODS; + +private: + wxWebView* m_browser; }; class wxFindPointers