X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/66ac04006071ae2043c483ae93f8d4fa6888f33f..66c2bf7b1d9326fb650acfaae22ec50528cfbf7c:/include/wx/gtk/webview_webkit.h?ds=sidebyside diff --git a/include/wx/gtk/webview_webkit.h b/include/wx/gtk/webview_webkit.h index 72b41c15ce..6e8bb8be7a 100644 --- a/include/wx/gtk/webview_webkit.h +++ b/include/wx/gtk/webview_webkit.h @@ -2,7 +2,6 @@ // Name: include/gtk/wx/webview.h // Purpose: GTK webkit backend for web view component // Author: Robert Roebling, Marianne Gagnon -// Id: $Id$ // Copyright: (c) 2010 Marianne Gagnon, 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -10,7 +9,7 @@ #ifndef _WX_GTK_WEBKITCTRL_H_ #define _WX_GTK_WEBKITCTRL_H_ -#include "wx/setup.h" +#include "wx/defs.h" #if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) @@ -26,7 +25,7 @@ typedef struct _WebKitWebView WebKitWebView; class WXDLLIMPEXP_WEBVIEW wxWebViewWebKit : public wxWebView { public: - wxWebViewWebKit() { Init(); } + wxWebViewWebKit(); wxWebViewWebKit(wxWindow *parent, wxWindowID id = wxID_ANY, @@ -35,8 +34,6 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxWebViewNameStr) { - Init(); - Create(parent, id, url, pos, size, style, name); } @@ -61,10 +58,11 @@ public: virtual void LoadURL(const wxString& url); virtual void GoBack(); virtual void GoForward(); - virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT); + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); virtual bool CanGoBack() const; virtual bool CanGoForward() const; virtual void ClearHistory(); + virtual void EnableContextMenu(bool enable = true); virtual void EnableHistory(bool enable = true); virtual wxVector > GetBackwardHistory(); virtual wxVector > GetForwardHistory(); @@ -97,7 +95,7 @@ public: virtual void Redo(); //Find function - virtual long Find(const wxString& text, int flags = wxWEB_VIEW_FIND_DEFAULT); + virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT); //Editing functions virtual void SetEditable(bool enable = true); @@ -165,6 +163,21 @@ private: wxDECLARE_DYNAMIC_CLASS(wxWebViewWebKit); }; +class WXDLLIMPEXP_WEBVIEW wxWebViewFactoryWebKit : public wxWebViewFactory +{ +public: + virtual wxWebView* Create() { return new wxWebViewWebKit; } + virtual wxWebView* Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) + { return new wxWebViewWebKit(parent, id, url, pos, size, style, name); } +}; + + #endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) #endif