#if !defined(__WXMAC__) && !defined(__WXCOCOA__)
#error "wxWebKitCtrl not implemented for this platform"
#endif
#if !defined(__WXMAC__) && !defined(__WXCOCOA__)
#error "wxWebKitCtrl not implemented for this platform"
#endif
- const wxSize& size = wxDefaultSize, long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxString("default_webkit_name"))
+ const wxSize& size = wxDefaultSize, long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxT("webkitctrl"))
{
Create(parent, winID, strURL, pos, size, style, validator, name);
};
{
Create(parent, winID, strURL, pos, size, style, validator, name);
};
wxWindowID winID,
const wxString& strURL,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
wxWindowID winID,
const wxString& strURL,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
- void SetPageSource(wxString& source, const wxString& baseUrl = wxString(""));
-
+ void SetPageSource(wxString& source, const wxString& baseUrl = wxEmptyString);
+ wxString GetPageURL(){ return m_currentURL; }
+ wxString GetPageTitle(){ return m_pageTitle; }
+
- void* m_webView;
- //It should be WebView, but WebView is Cocoa only, so any class which included
- //this header would have to link to Cocoa, so for now use void* instead.
+ struct objc_object *m_webView;
+ //It should be WebView*, but WebView is an Objective-C class
+ //TODO: look into using DECLARE_WXCOCOA_OBJC_CLASS rather than this.
- wxWEBKIT_STATE_START = 1,
- wxWEBKIT_STATE_NEGOTIATING = 2,
- wxWEBKIT_STATE_REDIRECTING = 4,
- wxWEBKIT_STATE_TRANSFERRING = 8,
- wxWEBKIT_STATE_STOP = 16,
+ wxWEBKIT_STATE_START = 1,
+ wxWEBKIT_STATE_NEGOTIATING = 2,
+ wxWEBKIT_STATE_REDIRECTING = 4,
+ wxWEBKIT_STATE_TRANSFERRING = 8,
+ wxWEBKIT_STATE_STOP = 16,
- int GetState() { return m_state; }
- void SetState(const int state) { m_state = state; }
- wxString GetURL() { return m_url; }
- void SetURL(const wxString& url) { m_url = url; }
+ int GetState() { return m_state; }
+ void SetState(const int state) { m_state = state; }
+ wxString GetURL() { return m_url; }
+ void SetURL(const wxString& url) { m_url = url; }
};
typedef void (wxEvtHandler::*wxWebKitStateChangedEventFunction)(wxWebKitStateChangedEvent&);
BEGIN_DECLARE_EVENT_TYPES()
};
typedef void (wxEvtHandler::*wxWebKitStateChangedEventFunction)(wxWebKitStateChangedEvent&);
BEGIN_DECLARE_EVENT_TYPES()
END_DECLARE_EVENT_TYPES()
#define EVT_WEBKIT_STATE_CHANGED(func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_STATE_CHANGED, \
END_DECLARE_EVENT_TYPES()
#define EVT_WEBKIT_STATE_CHANGED(func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_STATE_CHANGED, \
(wxObjectEventFunction) \
(wxWebKitStateChangedEventFunction) & func, \
(wxObject *) NULL ),
(wxObjectEventFunction) \
(wxWebKitStateChangedEventFunction) & func, \
(wxObject *) NULL ),