X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dec53e5a560eeaffd5927f000101dd473fd83c13..19fc1a2f0d8523e8d31b40e7b83a058faacc20c2:/interface/wx/webview.h?ds=sidebyside diff --git a/interface/wx/webview.h b/interface/wx/webview.h index b3f47cc133..55f3708bf5 100644 --- a/interface/wx/webview.h +++ b/interface/wx/webview.h @@ -40,22 +40,22 @@ enum wxWebViewZoomType enum wxWebNavigationError { /** Connection error (timeout, etc.) */ - wxWEB_NAV_ERR_CONNECTION = 1, + wxWEB_NAV_ERR_CONNECTION, /** Invalid certificate */ - wxWEB_NAV_ERR_CERTIFICATE = 2, + wxWEB_NAV_ERR_CERTIFICATE, /** Authentication required */ - wxWEB_NAV_ERR_AUTH = 3, + wxWEB_NAV_ERR_AUTH, /** Other security error */ - wxWEB_NAV_ERR_SECURITY = 4, + wxWEB_NAV_ERR_SECURITY, /** Requested resource not found */ - wxWEB_NAV_ERR_NOT_FOUND = 5, + wxWEB_NAV_ERR_NOT_FOUND, /** Invalid request/parameters (e.g. bad URL, bad protocol, unsupported resource type) */ - wxWEB_NAV_ERR_REQUEST = 6, + wxWEB_NAV_ERR_REQUEST, /** The user cancelled (e.g. in a dialog) */ - wxWEB_NAV_ERR_USER_CANCELLED = 7, + wxWEB_NAV_ERR_USER_CANCELLED, /** Another (exotic) type of error that didn't fit in other categories*/ - wxWEB_NAV_ERR_OTHER = 8 + wxWEB_NAV_ERR_OTHER }; /** @@ -64,7 +64,7 @@ enum wxWebNavigationError enum wxWebViewReloadFlags { /** Default reload, will access cache */ - wxWEB_VIEW_RELOAD_DEFAULT = 0, + wxWEB_VIEW_RELOAD_DEFAULT, /** Reload the current view without accessing the cache */ wxWEB_VIEW_RELOAD_NO_CACHE }; @@ -119,6 +119,10 @@ enum wxWebViewBackend The integer associated with this event will be a wxWebNavigationError item. The string associated with this event may contain a backend-specific more precise error message/code. + @event{EVT_WEB_VIEW_NEWWINDOW(id, func)} + Process a @c wxEVT_COMMAND_WEB_VIEW_NEWWINDOW event, generated when a new + window is created. This event may be vetoed to prevent a new window showing, + for example if you want to open the url in the existing window or a new tab. @endEventTable @library{wxweb} @@ -195,6 +199,34 @@ public: */ virtual void GoForward() = 0; + /** + Clear the history, this will also remove the visible page. + */ + virtual void ClearHistory() = 0; + + /** + Enable or disable the history. This will also clear the history. + */ + virtual void EnableHistory(bool enable = true) = 0; + + /** + Returns a list of items in the back history. The first item in the + vector is the first page that was loaded by the control. + */ + virtual wxVector > GetBackwardHistory() = 0; + + /** + Returns a list of items in the forward history. The first item in the + vector is the next item in the history with respect to the curently + loaded page. + */ + virtual wxVector > GetForwardHistory() = 0; + + /** + Loads a history item. + */ + virtual void LoadHistoryItem(wxSharedPtr item) = 0; + /** Load a HTMl document (web page) from a URL @param url the URL where the HTML document to display can be found @@ -333,6 +365,10 @@ public: The integer associated with this event will be a wxWebNavigationError item. The string associated with this event may contain a backend-specific more precise error message/code. + @event{EVT_WEB_VIEW_NEWWINDOW(id, func)} + Process a @c wxEVT_COMMAND_WEB_VIEW_NEWWINDOW event, generated when a new + window is created. This event may be vetoed to prevent a new window showing, + for example if you want to open the url in the existing window or a new tab. @endEventTable @library{wxweb} @@ -357,24 +393,25 @@ public: */ const wxString& GetTarget() const; - // default copy ctor, assignment operator and dtor are ok virtual wxEvent* Clone() const; /** Get whether this event may be vetoed (stopped/prevented). Only - meaningful for events fired before navigation takes place. + meaningful for events fired before navigation takes place or new + window events. */ bool CanVeto() const; /** Whether this event was vetoed (stopped/prevented). Only meaningful for - events fired before navigation takes place. + 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. + before navigation takes place or new window events. Only valid + if CanVeto() returned true. */ void Veto(); }; \ No newline at end of file