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
*/
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
*/
/**
@return The name of the scheme, as passed to the constructor.
*/
- virtual wxString GetName() const = 0;
+ virtual wxString GetName() const;
};
/**
wxWebFileHandler is provided to allow the navigation of pages inside a zip
archive. It overrides the @c file scheme and provides support for the
standard @c file syntax as well as paths to archives of the form
- @c file:///C:/exmaple/docs.zip;protocol=zip/main.htm
+ @c file:///C:/example/docs.zip;protocol=zip/main.htm
@beginEventEmissionTable{wxWebViewEvent}
@event{EVT_WEB_VIEW_NAVIGATING(id, func)}
Process a @c wxEVT_COMMAND_WEB_VIEW_LOADED event generated when the document
is fully loaded and displayed. Note that if the displayed HTML document has
several frames, one such event will be generated per frame.
- @event{EVT_WEB_VIEW_ERRROR(id, func)}
+ @event{EVT_WEB_VIEW_ERROR(id, func)}
Process a @c wxEVT_COMMAND_WEB_VIEW_ERROR event generated when a navigation
error occurs.
The integer associated with this event will be a wxWebNavigationError item.
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
{
*/
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
/**
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;
Process a @c wxEVT_COMMAND_WEB_VIEW_LOADED event generated when the document
is fully loaded and displayed. Note that if the displayed HTML document has
several frames, one such event will be generated per frame.
- @event{EVT_WEB_VIEW_ERRROR(id, func)}
+ @event{EVT_WEB_VIEW_ERROR(id, func)}
Process a @c wxEVT_COMMAND_WEB_VIEW_ERROR event generated when a navigation
error occurs.
The integer associated with this event will be a wxWebNavigationError item.
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
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;