X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e669ddde233a87d1e80ce2b102d0a18ce9daedfe..ed3aceb08c9322375fb130bf840d106301ede6cd:/interface/wx/webview.h diff --git a/interface/wx/webview.h b/interface/wx/webview.h index c44532af0b..c17bfe785e 100644 --- a/interface/wx/webview.h +++ b/interface/wx/webview.h @@ -92,8 +92,9 @@ enum wxWebViewBackend A simple class that contains the URL and title of an element of the history of a wxWebView. - @library{wxweb} - @category{web} + @since 2.9.3 + @library{wxwebview} + @category{webview} @see wxWebView */ @@ -122,8 +123,9 @@ public: The base class for handling custom schemes in wxWebView, for example to allow virtual file system support. - @library{wxweb} - @category{web} + @since 2.9.3 + @library{wxwebview} + @category{webview} @see wxWebView */ @@ -144,7 +146,7 @@ public: /** @return The name of the scheme, as passed to the constructor. */ - virtual wxString GetName() const = 0; + virtual wxString GetName() const; }; /** @@ -241,9 +243,10 @@ public: the page title changes. Use GetString to get the title. @endEventTable - @library{wxweb} - @category{ctrl,web} - @see wxWebHandler, wxWebViewEvent + @since 2.9.3 + @library{wxwebview} + @category{ctrl,webview} + @see wxWebViewHandler, wxWebViewEvent */ class wxWebView : public wxControl { @@ -254,11 +257,11 @@ public: */ virtual bool Create(wxWindow* parent, wxWindowID id, - const wxString& url, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) = 0; + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) = 0; /** Factory function to create a new wxWebView for two-step creation @@ -331,7 +334,7 @@ public: to know whether loading the URL was successful, register to receive navigation error events. */ - virtual void LoadUrl(const wxString& url) = 0; + virtual void LoadURL(const wxString& url) = 0; /** Opens a print dialog so that the user may print the currently @@ -393,21 +396,21 @@ public: /** Returns @true if the current selection can be copied. - @note This always returns @c false on the OSX WebKit backend. + @note This always returns @c true on the OSX WebKit backend. */ virtual bool CanCopy() const = 0; /** Returns @true if the current selection can be cut. - @note This always returns @c false on the OSX WebKit backend. + @note This always returns @c true on the OSX WebKit backend. */ virtual bool CanCut() const = 0; /** Returns @true if data can be pasted. - @note This always returns @c false on the OSX WebKit backend. + @note This always returns @c true on the OSX WebKit backend. */ virtual bool CanPaste() const = 0; @@ -620,18 +623,19 @@ public: Process a @c wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED event, generated when the page title changes. Use GetString to get the title. @endEventTable - - @library{wxweb} - @category{events,web} + + @since 2.9.3 + @library{wxwebview} + @category{events,webview} @see wxWebView */ -class wxWebViewEvent : public wxCommandEvent +class wxWebViewEvent : public wxNotifyEvent { public: wxWebViewEvent(); wxWebViewEvent(wxEventType type, int id, const wxString href, - const wxString target, bool canVeto); + const wxString target); /** Get the name of the target frame which the url of this event @@ -644,24 +648,12 @@ public: Get the URL being visited */ const wxString& GetURL() const; +}; - virtual wxEvent* Clone() const; - - /** - Get whether this event may be vetoed (stopped/prevented). Only - meaningful for events fired before navigation takes place. - */ - bool CanVeto() const; - - /** - Whether this event was vetoed (stopped/prevented). Only meaningful for - events fired before navigation takes place or new window events. - */ - bool IsVetoed() const; - /** - Veto (prevent/stop) this event. Only meaningful for events fired - before navigation takes place. Only valid if CanVeto() returned true. - */ - void Veto(); -}; \ No newline at end of file +wxEventType wxEVT_COMMAND_WEB_VIEW_NAVIGATING; +wxEventType wxEVT_COMMAND_WEB_VIEW_NAVIGATED; +wxEventType wxEVT_COMMAND_WEB_VIEW_LOADED; +wxEventType wxEVT_COMMAND_WEB_VIEW_ERROR; +wxEventType wxEVT_COMMAND_WEB_VIEW_NEWWINDOW; +wxEventType wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED;