X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c3980646f62442c5c620185ab16b035baff78ba2..a7689c49fe02c0c065facf736ab28b19f5997b7c:/include/wx/gtk/webview_webkit.h diff --git a/include/wx/gtk/webview_webkit.h b/include/wx/gtk/webview_webkit.h index 2ac7eab691..2246303c50 100644 --- a/include/wx/gtk/webview_webkit.h +++ b/include/wx/gtk/webview_webkit.h @@ -10,7 +10,7 @@ #ifndef _WX_GTK_WEBKITCTRL_H_ #define _WX_GTK_WEBKITCTRL_H_ -#include "wx/setup.h" +#include "wx/defs.h" #if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) @@ -26,7 +26,7 @@ typedef struct _WebKitWebView WebKitWebView; class WXDLLIMPEXP_WEBVIEW wxWebViewWebKit : public wxWebView { public: - wxWebViewWebKit() { Init(); } + wxWebViewWebKit(); wxWebViewWebKit(wxWindow *parent, wxWindowID id = wxID_ANY, @@ -35,8 +35,6 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxWebViewNameStr) { - Init(); - Create(parent, id, url, pos, size, style, name); } @@ -73,9 +71,6 @@ public: virtual wxString GetCurrentTitle() const; 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 bool IsBusy() const; @@ -99,6 +94,9 @@ public: virtual void Undo(); virtual void Redo(); + //Find function + virtual long Find(const wxString& text, int flags = wxWEB_VIEW_FIND_DEFAULT); + //Editing functions virtual void SetEditable(bool enable = true); virtual bool IsEditable() const; @@ -117,6 +115,8 @@ public: virtual void RegisterHandler(wxSharedPtr handler); virtual wxVector > GetHandlers() { return m_handlerList; } + virtual void* GetNativeBackend() const { return m_web_view; } + /** TODO: check if this can be made private * The native control has a getter to check for busy state, but except in * very recent versions of webkit this getter doesn't say everything we need @@ -132,6 +132,7 @@ public: bool m_guard; protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl); virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; @@ -142,6 +143,9 @@ private: void SetWebkitZoom(float level); float GetWebkitZoom() const; + //Find helper function + void FindClear(); + // focus event handler: calls GTKUpdateBitmap() void GTKOnFocus(wxFocusEvent& event); @@ -150,6 +154,12 @@ private: wxVector > m_handlerList; + //variables used for Find() + int m_findFlags; + wxString m_findText; + int m_findPosition; + int m_findCount; + wxDECLARE_DYNAMIC_CLASS(wxWebViewWebKit); };