Derive wxWebViewEvent from wxNotifyEvent.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton
2011-08-17 11:19:29 +00:00
parent 4d0dddc7ad
commit 3225a4b8b8
5 changed files with 61 additions and 96 deletions

View File

@@ -171,36 +171,23 @@ public:
wxDECLARE_ABSTRACT_CLASS(wxWebView);
};
class WXDLLIMPEXP_WEB wxWebViewEvent : public wxCommandEvent
class WXDLLIMPEXP_WEB wxWebViewEvent : public wxNotifyEvent
{
public:
wxWebViewEvent() {}
wxWebViewEvent(wxEventType type, int id, const wxString url,
const wxString target, bool canVeto)
: wxCommandEvent(type, id)
{
m_url = url;
m_target = target;
m_vetoed = false;
m_canVeto = canVeto;
}
const wxString target)
: wxNotifyEvent(type, id), m_url(url), m_target(target)
{}
const wxString& GetURL() const { return m_url; }
const wxString& GetTarget() const { return m_target; }
virtual wxEvent* Clone() const { return new wxWebViewEvent(*this); }
bool CanVeto() const { return m_canVeto; }
bool IsVetoed() const { return m_vetoed; }
void Veto() { wxASSERT(m_canVeto); m_vetoed = true; }
private:
wxString m_url;
wxString m_target;
bool m_canVeto;
bool m_vetoed;
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWebViewEvent);
};