+ wxCOMPtr<IHTMLDocument2> GetDocument() const;
+ bool IsElementVisible(wxCOMPtr<IHTMLElement> elm);
+ //Find helper functions.
+ void FindInternal(const wxString& text, int flags, int internal_flag);
+ long FindNext(int direction = 1);
+ void FindClear();
+ //Toggles control features see INTERNETFEATURELIST for values.
+ bool EnableControlFeature(long flag, bool enable = true);
+
+ 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:
+ wxIInternetProtocolSink* m_protocolSink;
+ wxString m_html;
+ VOID * fileP;
+
+ wxFSFile* m_file;
+ wxSharedPtr<wxWebViewHandler> m_handler;
+
+public:
+ VirtualProtocol(wxSharedPtr<wxWebViewHandler> handler);
+ virtual ~VirtualProtocol() {}
+
+ //IUnknown
+ DECLARE_IUNKNOWN_METHODS;
+
+ //IInternetProtocolRoot
+ HRESULT STDMETHODCALLTYPE Abort(HRESULT WXUNUSED(hrReason),
+ DWORD WXUNUSED(dwOptions))
+ { return E_NOTIMPL; }
+ HRESULT STDMETHODCALLTYPE Continue(wxPROTOCOLDATA *WXUNUSED(pProtocolData))
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE Resume() { return S_OK; }
+ HRESULT STDMETHODCALLTYPE Start(LPCWSTR szUrl,
+ wxIInternetProtocolSink *pOIProtSink,
+ wxIInternetBindInfo *pOIBindInfo,
+ DWORD grfPI,
+ HANDLE_PTR dwReserved);
+ HRESULT STDMETHODCALLTYPE Suspend() { return S_OK; }
+ HRESULT STDMETHODCALLTYPE Terminate(DWORD WXUNUSED(dwOptions)) { return S_OK; }
+
+ //IInternetProtocol
+ HRESULT STDMETHODCALLTYPE LockRequest(DWORD WXUNUSED(dwOptions))
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE Read(void *pv, ULONG cb, ULONG *pcbRead);
+ HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER WXUNUSED(dlibMove),
+ DWORD WXUNUSED(dwOrigin),
+ ULARGE_INTEGER* WXUNUSED(plibNewPosition))
+ { return E_FAIL; }
+ HRESULT STDMETHODCALLTYPE UnlockRequest() { return S_OK; }
+};
+
+class ClassFactory : public IClassFactory
+{
+public:
+ ClassFactory(wxSharedPtr<wxWebViewHandler> handler) : m_handler(handler)
+ { AddRef(); }
+ virtual ~ClassFactory() {}
+
+ wxString GetName() { return m_handler->GetName(); }