* 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
* shown
*/
virtual wxString GetPageSource() = 0;
+ virtual wxString GetPageText() = 0;
/**
* Get the zoom factor of the page
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?
// virtual bool IsOfflineMode() = 0; // maybe?
// virtual void SetOfflineMode(bool offline) = 0; // maybe?
- // TODO: offer API to control the opening of new frames
- // (through <a target="..."> 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.
{
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;
/**
* 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
void Veto() { wxASSERT(m_canVeto); m_vetoed = true; }
private:
- wxString m_href;
+ wxString m_url;
wxString m_target;
bool m_canVeto;
bool m_vetoed;