X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d156af3247c862e51a7c62f569a3fd302052a42..ca77701441e39245dcbfce903049e76f166979e5:/include/wx/osx/webview_webkit.h diff --git a/include/wx/osx/webview_webkit.h b/include/wx/osx/webview_webkit.h index 32a4d98247..94f99c1d58 100644 --- a/include/wx/osx/webview_webkit.h +++ b/include/wx/osx/webview_webkit.h @@ -15,12 +15,14 @@ #include "wx/setup.h" -#if wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \ - || defined(__WXOSX_CARBON__)) +#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \ + || defined(__WXOSX_CARBON__)) #include "wx/control.h" #include "wx/webview.h" +#include "wx/osx/core/objcid.h" + // ---------------------------------------------------------------------------- // Web Kit Control // ---------------------------------------------------------------------------- @@ -57,10 +59,6 @@ public: virtual wxString GetPageSource() const; virtual wxString GetPageText() const; - //We do not want to hide the other overloads - using wxWebView::SetPage; - virtual void SetPage(const wxString& html, const wxString& baseUrl); - virtual void Print(); virtual void LoadURL(const wxString& url); @@ -74,20 +72,28 @@ public: virtual bool CanSetZoomType(wxWebViewZoomType type) const; virtual bool IsBusy() const { return m_busy; } - + //History functions virtual void ClearHistory(); virtual void EnableHistory(bool enable = true); virtual wxVector > GetBackwardHistory(); virtual wxVector > GetForwardHistory(); virtual void LoadHistoryItem(wxSharedPtr item); - + //Undo / redo functionality virtual bool CanUndo() const; virtual bool CanRedo() const; virtual void Undo(); virtual void Redo(); + //Find function + virtual long Find(const wxString& text, int flags = wxWEB_VIEW_FIND_DEFAULT) + { + wxUnusedVar(text); + wxUnusedVar(flags); + return wxNOT_FOUND; + } + //Clipboard functions virtual bool CanCut() const { return true; } virtual bool CanCopy() const { return true; } @@ -95,11 +101,11 @@ public: virtual void Cut(); virtual void Copy(); virtual void Paste(); - + //Editing functions virtual void SetEditable(bool enable = true); virtual bool IsEditable() const; - + //Selection virtual void DeleteSelection(); virtual bool HasSelection() const; @@ -107,12 +113,14 @@ public: virtual wxString GetSelectedText() const; virtual wxString GetSelectedSource() const; virtual void ClearSelection(); - + void RunScript(const wxString& javascript); - + //Virtual Filesystem Support virtual void RegisterHandler(wxSharedPtr handler); + virtual void* GetNativeBackend() const { return m_webView; } + // ---- methods not from the parent (common) interface bool CanGetPageSource() const; @@ -141,6 +149,8 @@ public: bool m_busy; protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl); + DECLARE_EVENT_TABLE() void MacVisibilityChanged(); @@ -149,7 +159,7 @@ private: wxWindowID m_windowID; wxString m_pageTitle; - struct objc_object *m_webView; + wxObjCID m_webView; // we may use this later to setup our own mouse events, // so leave it in for now. @@ -158,6 +168,6 @@ private: //TODO: look into using DECLARE_WXCOCOA_OBJC_CLASS rather than this. }; -#endif // wxUSE_WEBKIT +#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT #endif // _WX_WEBKIT_H_