{
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;
wxWebNavigationEvent();
wxWebNavigationEvent(wxEventType type, int id, const wxString href,
const wxString target, bool canVeto);
- /**
- Get the URL being visited
- */
- const wxString& GetHref() const;
/**
Get the name of the target frame which the url of this event
*/
const wxString& GetTarget() const;
+ /**
+ Get the URL being visited
+ */
+ const wxString& GetURL() const;
+
virtual wxEvent* Clone() const;
/**
*/
void WebFrame::OnNavigationRequest(wxWebNavigationEvent& evt)
{
- wxLogMessage("%s", "Navigation request to '" + evt.GetHref() + "' (target='" +
+ wxLogMessage("%s", "Navigation request to '" + evt.GetURL() + "' (target='" +
evt.GetTarget() + "')");
wxASSERT(m_browser->IsBusy());
*/
void WebFrame::OnNavigationComplete(wxWebNavigationEvent& evt)
{
- wxLogMessage("%s", "Navigation complete; url='" + evt.GetHref() + "'");
+ wxLogMessage("%s", "Navigation complete; url='" + evt.GetURL() + "'");
UpdateState();
}
void WebFrame::OnDocumentLoaded(wxWebNavigationEvent& evt)
{
//Only notify if the document is the main frame, not a subframe
- if(evt.GetHref() == m_browser->GetCurrentURL())
- wxLogMessage("%s", "Document loaded; url='" + evt.GetHref() + "'");
+ if(evt.GetURL() == m_browser->GetCurrentURL())
+ wxLogMessage("%s", "Document loaded; url='" + evt.GetURL() + "'");
UpdateState();
}
*/
void WebFrame::OnNewWindow(wxWebNavigationEvent& evt)
{
- wxLogMessage("%s", "New window; url='" + evt.GetHref() + "'");
+ wxLogMessage("%s", "New window; url='" + evt.GetURL() + "'");
//If we handle new window events then just load them in this window as we
//are a single window browser
if(m_tools_handle_new_window->IsChecked())
- m_browser->LoadUrl(evt.GetHref());
+ m_browser->LoadUrl(evt.GetURL());
//We always veto because we handle the event, otherwise under windows a new
//internet explorer windowis created
break;
}
- wxLogMessage("Error; url='" + evt.GetHref() + "', error='" + errorCategory + "' (" + evt.GetString() + ")");
+ wxLogMessage("Error; url='" + evt.GetURL() + "', error='" + errorCategory + "' (" + evt.GetString() + ")");
//Show the info bar with an error
- m_info->ShowMessage(_("An error occurred loading ") + evt.GetHref() + "\n" +
+ m_info->ShowMessage(_("An error occurred loading ") + evt.GetURL() + "\n" +
"'" + errorCategory + "' (" + evt.GetString() + ")", wxICON_ERROR);
UpdateState();