X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ecc610f1af86a2d416b8672dcd262463152b9130..51623cc53f350935337e57930eaaf1afe9a48c3b:/include/wx/webview.h diff --git a/include/wx/webview.h b/include/wx/webview.h index 455ee64054..050c31953e 100644 --- a/include/wx/webview.h +++ b/include/wx/webview.h @@ -65,7 +65,17 @@ enum wxWebViewReloadFlags { //Default, may access cache wxWEB_VIEW_RELOAD_DEFAULT, - wxWEB_VIEW_RELOAD_NO_CACHE + wxWEB_VIEW_RELOAD_NO_CACHE +}; + +enum wxWebViewFindFlags +{ + wxWEB_VIEW_FIND_WRAP = 0x0001, + wxWEB_VIEW_FIND_ENTIRE_WORD = 0x0002, + wxWEB_VIEW_FIND_MATCH_CASE = 0x0004, + wxWEB_VIEW_FIND_HIGHLIGHT_RESULT = 0x0008, + wxWEB_VIEW_FIND_BACKWARDS = 0x0010, + wxWEB_VIEW_FIND_DEFAULT = 0 }; enum wxWebViewBackend @@ -127,12 +137,15 @@ public: virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT) = 0; virtual void RunScript(const wxString& javascript) = 0; virtual void SetEditable(bool enable = true) = 0; - virtual void SetPage(const wxString& html, const wxString& baseUrl) = 0; - virtual void SetPage(wxInputStream& html, wxString baseUrl) + void SetPage(const wxString& html, const wxString& baseUrl) + { + DoSetPage(html, baseUrl); + } + void SetPage(wxInputStream& html, wxString baseUrl) { wxStringOutputStream stream; stream.Write(html); - SetPage(stream.GetString(), baseUrl); + DoSetPage(stream.GetString(), baseUrl); } virtual void Stop() = 0; @@ -176,6 +189,14 @@ public: virtual void Undo() = 0; virtual void Redo() = 0; + //Get the pointer to the underlying native engine. + virtual void* GetNativeBackend() const = 0; + //Find function + virtual long Find(const wxString& text, int flags = wxWEB_VIEW_FIND_DEFAULT) = 0; + +protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl) = 0; + wxDECLARE_ABSTRACT_CLASS(wxWebView); };