#include "wx/setup.h"
-#if wxUSE_WEBKIT && (defined(__WXMAC__) || defined(__WXCOCOA__))
+#if wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \
+ || defined(__WXOSX_CARBON__))
#include "wx/control.h"
#include "wx/webview.h"
// Web Kit Control
// ----------------------------------------------------------------------------
+class wxMacControl;
+class wxWidgetCocoaImpl;
+
class WXDLLIMPEXP_WEB wxWebViewWebKit : public wxWebView
{
public:
virtual void SetPageTitle(const wxString& title) { m_pageTitle = title; }
virtual wxString GetPageTitle(){ return m_pageTitle; }
+ //We do not want to hide the other overloads
+ using wxWebView::SetPage;
virtual void SetPage(const wxString& html, const wxString& baseUrl);
virtual void Print();
//History functions
virtual void ClearHistory() {}
- virtual void EnableHistory(bool enable = true) {}
+ virtual void EnableHistory(bool enable = true);
virtual wxVector<wxSharedPtr<wxWebHistoryItem> > GetBackwardHistory()
- { return wxVector<wxSharedPtr<wxWebHistoryItem> >() }
+ { return wxVector<wxSharedPtr<wxWebHistoryItem> >(); }
virtual wxVector<wxSharedPtr<wxWebHistoryItem> > GetForwardHistory()
- { return wxVector<wxSharedPtr<wxWebHistoryItem> >() }
- virtual void LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item) {}
+ { return wxVector<wxSharedPtr<wxWebHistoryItem> >(); }
+ virtual void LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> WXUNUSED(item)) {}
//Undo / redo functionality
virtual bool CanUndo() { return false; }
//Selection
virtual void DeleteSelection();
- virtual bool HasSelection() { return false };
+ virtual bool HasSelection();
virtual void SelectAll() {};
virtual wxString GetSelectedText();
virtual wxString GetSelectedSource() { return ""; }
virtual void ClearSelection() {}
void RunScript(const wxString& javascript);
+
+ //Virtual Filesystem Support
+ virtual void RegisterHandler(wxWebHandler* WXUNUSED(handler)) {};
// ---- methods not from the parent (common) interface
bool CanGetPageSource();
void* m_webKitCtrlEventHandler;
//It should be WebView*, but WebView is an Objective-C class
//TODO: look into using DECLARE_WXCOCOA_OBJC_CLASS rather than this.
+
+#if wxOSX_USE_CARBON
+ wxMacControl *m_peer;
+#else
+ wxWidgetCocoaImpl *m_peer;
+#endif
};
#endif // wxUSE_WEBKIT