#include "wx/msw/ole/automtn.h"
#include "wx/msw/ole/activex.h"
#include "wx/msw/ole/oleutils.h"
+#include "wx/msw/private/comptr.h"
#include "wx/msw/wrapwin.h"
#include "wx/msw/missing.h"
#include "wx/sharedptr.h"
virtual HRESULT wxSTDCALL GetHostInfo(DOCHOSTUIINFO *pInfo) = 0;
- virtual HRESULT wxSTDCALL ShowUI(DWORD dwID,
+ virtual HRESULT wxSTDCALL ShowUI(DWORD dwID,
IOleInPlaceActiveObject *pActiveObject,
IOleCommandTarget *pCommandTarget,
IOleInPlaceFrame *pFrame,
virtual HRESULT wxSTDCALL HideUI(void) = 0;
virtual HRESULT wxSTDCALL UpdateUI(void) = 0;
-
+
virtual HRESULT wxSTDCALL EnableModeless(BOOL fEnable) = 0;
virtual HRESULT wxSTDCALL OnDocWindowActivate(BOOL fActivate) = 0;
IOleInPlaceUIWindow *pUIWindow,
BOOL fRameWindow) = 0;
- virtual HRESULT wxSTDCALL TranslateAccelerator(LPMSG lpMsg,
+ virtual HRESULT wxSTDCALL TranslateAccelerator(LPMSG lpMsg,
const GUID *pguidCmdGroup,
DWORD nCmdID) = 0;
- virtual HRESULT wxSTDCALL GetOptionKeyPath(__out LPOLESTR *pchKey,
+ virtual HRESULT wxSTDCALL GetOptionKeyPath(LPOLESTR *pchKey,
DWORD dw) = 0;
virtual HRESULT wxSTDCALL GetDropTarget(IDropTarget *pDropTarget,
virtual HRESULT wxSTDCALL GetExternal(IDispatch **ppDispatch) = 0;
virtual HRESULT wxSTDCALL TranslateUrl(DWORD dwTranslate,
- __in __nullterminated OLECHAR *pchURLIn,
- __out OLECHAR **ppchURLOut) = 0;
+ OLECHAR *pchURLIn,
+ OLECHAR **ppchURLOut) = 0;
virtual HRESULT wxSTDCALL FilterDataObject(IDataObject *pDO,
IDataObject **ppDORet) = 0;
virtual void Print();
- virtual void SetPage(const wxString& html, const wxString& baseUrl);
-
virtual wxWebViewZoom GetZoom() const;
virtual void SetZoom(wxWebViewZoom zoom);
//Virtual Filesystem Support
virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler);
+ virtual void* GetNativeBackend() const { return m_webBrowser; }
+
// ---- IE-specific methods
// FIXME: I seem to be able to access remote webpages even in offline mode...
DECLARE_EVENT_TABLE();
+protected:
+ virtual void DoSetPage(const wxString& html, const wxString& baseUrl);
+
private:
wxIEContainer* m_container;
wxAutomationObject m_ie;
IWebBrowser2* m_webBrowser;
DWORD m_dwCookie;
- DocHostUIHandler* m_uiHandler;
+ wxCOMPtr<DocHostUIHandler> m_uiHandler;
//We store the current zoom type;
wxWebViewZoomType m_zoomType;
//Generic helper functions for IHtmlDocument commands
bool CanExecCommand(wxString command) const;
void ExecCommand(wxString command);
- IHTMLDocument2* GetDocument() const;
+ wxCOMPtr<IHTMLDocument2> GetDocument() const;
+ //Toggles control features see INTERNETFEATURELIST for values.
+ bool EnableControlFeature(long flag, bool enable = true);
wxDECLARE_DYNAMIC_CLASS(wxWebViewIE);
};
virtual HRESULT wxSTDCALL ShowContextMenu(DWORD dwID, POINT *ppt,
IUnknown *pcmdtReserved,
IDispatch *pdispReserved);
-
+
virtual HRESULT wxSTDCALL GetHostInfo(DOCHOSTUIINFO *pInfo);
virtual HRESULT wxSTDCALL ShowUI(DWORD dwID,
const GUID *pguidCmdGroup,
DWORD nCmdID);
- virtual HRESULT wxSTDCALL GetOptionKeyPath(__out LPOLESTR *pchKey,
+ virtual HRESULT wxSTDCALL GetOptionKeyPath(LPOLESTR *pchKey,
DWORD dw);
virtual HRESULT wxSTDCALL GetDropTarget(IDropTarget *pDropTarget,
virtual HRESULT wxSTDCALL GetExternal(IDispatch **ppDispatch);
virtual HRESULT wxSTDCALL TranslateUrl(DWORD dwTranslate,
- __in __nullterminated OLECHAR *pchURLIn,
- __out OLECHAR **ppchURLOut);
+ OLECHAR *pchURLIn,
+ OLECHAR **ppchURLOut);
virtual HRESULT wxSTDCALL FilterDataObject(IDataObject *pDO,
IDataObject **ppDORet);