#include "wx/setup.h"
-#if wxUSE_WEBKIT && (defined(__WXMAC__) || defined(__WXCOCOA__))
+//#if wxUSE_WEBKIT && (defined(__WXMAC__) || defined(__WXCOCOA__))
#include "wx/control.h"
#include "wx/webview.h"
virtual void ClearHistory() {}
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> >() }
+ { return wxVector<wxSharedPtr<wxWebHistoryItem> >(); }
virtual void LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item) {}
//Undo / redo functionality
//Selection
virtual void DeleteSelection();
- virtual bool HasSelection() { return false };
+ virtual bool HasSelection() { return false; };
virtual void SelectAll() {};
virtual wxString GetSelectedText();
virtual wxString GetSelectedSource() { return ""; }
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
+//#endif // wxUSE_WEBKIT
#endif // _WX_WEBKIT_H_
#include "wx/wx.h"
#endif
-#if wxHAVE_WEB_BACKEND_OSX_WEBKIT
+//#if wxHAVE_WEB_BACKEND_OSX_WEBKIT
#ifdef __WXCOCOA__
#include "wx/cocoa/autorelease.h"
#endif // wxUSE_UNICODE
}
-inline int wxNavTypeFromWebNavType(int type){
- if (type == WebNavigationTypeLinkClicked)
- return wxWEBKIT_NAV_LINK_CLICKED;
-
- if (type == WebNavigationTypeFormSubmitted)
- return wxWEBKIT_NAV_FORM_SUBMITTED;
-
- if (type == WebNavigationTypeBackForward)
- return wxWEBKIT_NAV_BACK_NEXT;
-
- if (type == WebNavigationTypeReload)
- return wxWEBKIT_NAV_RELOAD;
-
- if (type == WebNavigationTypeFormResubmitted)
- return wxWEBKIT_NAV_FORM_RESUBMITTED;
-
- return wxWEBKIT_NAV_OTHER;
-}
-
@interface MyFrameLoadMonitor : NSObject
{
wxWebViewWebKit* webKitWindow;
if(m_parent) m_parent->CocoaAddChild(this);
SetInitialFrameRect(pos,sizeInstance);
#else
- m_macIsUserPane = false;
wxControl::Create(parent, winID, pos, size, style, wxDefaultValidator, name);
#if wxOSX_USE_CARBON
void wxWebViewWebKit::RunScript(const wxString& javascript)
{
if ( !m_webView )
- return wxEmptyString;
+ return;
[[m_webView windowScriptObject] evaluateWebScript:
(NSString*)wxNSStringWithWxString( javascript )];
if ( !m_webView )
return;
- [(WebView*)m_webView cut];
+ [(WebView*)m_webView cut:m_webView];
}
void wxWebViewWebKit::Copy()
if ( !m_webView )
return;
- [(WebView*)m_webView copy];
+ [(WebView*)m_webView copy:m_webView];
}
void wxWebViewWebKit::Paste()
if ( !m_webView )
return;
- [(WebView*)m_webView paste];
+ [(WebView*)m_webView paste:m_webView];
}
void wxWebViewWebKit::DeleteSelection()
}
@end
-#endif //wxHAVE_WEB_BACKEND_OSX_WEBKIT
+//#endif //wxHAVE_WEB_BACKEND_OSX_WEBKIT