X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/97e49559fb0e1dfc43d66e8784ec47182f5507e9..0995b9dc18a7ce898c1c1be0e2790b258cab0fee:/include/wx/webview.h diff --git a/include/wx/webview.h b/include/wx/webview.h index 0eeb5c1acf..ed94c82611 100644 --- a/include/wx/webview.h +++ b/include/wx/webview.h @@ -97,11 +97,8 @@ enum wxWebViewBackend * engine for the current platform*/ wxWEB_VIEW_BACKEND_DEFAULT, - /** The OSX-native WebKit web engine */ - wxWEB_VIEW_BACKEND_OSX_WEBKIT, - - /** The GTK port of the WebKit engine */ - wxWEB_VIEW_BACKEND_GTK_WEBKIT, + /** The WebKit web engine */ + wxWEB_VIEW_BACKEND_WEBKIT, /** Use Microsoft Internet Explorer as web engine */ wxWEB_VIEW_BACKEND_IE @@ -225,6 +222,7 @@ public: * shown */ virtual wxString GetPageSource() = 0; + virtual wxString GetPageText() = 0; /** * Get the zoom factor of the page @@ -284,15 +282,21 @@ public: SetPage(stream.GetString(), baseUrl); } - // TODO: - // wxString GetSelection(); // maybe? - // void SetSelection(...); // maybe? + virtual void SetEditable(bool enable = true) = 0; + virtual bool IsEditable() = 0; + + virtual void SelectAll() = 0; + virtual bool HasSelection() = 0; + virtual void DeleteSelection() = 0; + virtual wxString GetSelectedText() = 0; + virtual wxString GetSelectedSource() = 0; + virtual void ClearSelection() = 0; - // void MakeEditable(bool enable = true); // maybe? - // bool IsEditable(); // maybe? + virtual void RunScript(const wxString& javascript) = 0; + // TODO: // void EnableJavascript(bool enabled); // maybe? - // wxString RunScript(const wxString& javascript); // maybe? + // // maybe? // void SetScrollPos(int pos); // maybe? // int GetScrollPos(); // maybe? @@ -305,16 +309,6 @@ public: // virtual bool IsOfflineMode() = 0; // maybe? // virtual void SetOfflineMode(bool offline) = 0; // maybe? - // TODO: offer API to control the opening of new frames - // (through as well as through javascript), OR - // provide a behavior consistent across ports. - // - OSX : I receive an event for new frames opened with HTML target, and - // currently block them all. - // - IE : An event is recieved for new frames and they are currently - // blocked - // - GTK : All frame open requests are blocked. A slot exists that I could - // connect to to be notified if ever needed - /** * Opens a print dialog so that the user may print the currently * displayed page. @@ -345,11 +339,11 @@ class WXDLLIMPEXP_WEB wxWebNavigationEvent : public wxCommandEvent { public: wxWebNavigationEvent() {} - wxWebNavigationEvent(wxEventType type, int id, const wxString href, + wxWebNavigationEvent(wxEventType type, int id, const wxString url, const wxString target, bool canVeto) : wxCommandEvent(type, id) { - m_href = href; + m_url = url; m_target = target; m_vetoed = false; m_canVeto = canVeto; @@ -358,7 +352,7 @@ public: /** * Get the URL being visited */ - const wxString& GetHref() const { return m_href; } + const wxString& GetURL() const { return m_url; } /** * Get the target (frame or window) in which the URL that caused this event @@ -385,7 +379,7 @@ public: void Veto() { wxASSERT(m_canVeto); m_vetoed = true; } private: - wxString m_href; + wxString m_url; wxString m_target; bool m_canVeto; bool m_vetoed;