improvements to wxEventFunctor classes; use wxHAS_EVENT_BIND instead of wxEVENTS_COMPATIBILITY_2_8 (see #10653)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-05-02 12:52:54 +00:00
parent 1ba0367603
commit 890d70ebea
17 changed files with 329 additions and 273 deletions

View File

@@ -77,9 +77,9 @@ public:
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
#if !wxEVENTS_COMPATIBILITY_2_8
#ifdef wxHAS_EVENT_BIND
void OnBind(wxCommandEvent& event);
#endif // !wxEVENTS_COMPATIBILITY_2_8
#endif // wxHAS_EVENT_BIND
void OnConnect(wxCommandEvent& event);
void OnDynamic(wxCommandEvent& event);
void OnPushEventHandler(wxCommandEvent& event);
@@ -177,9 +177,9 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Event_Quit, MyFrame::OnQuit)
EVT_MENU(Event_About, MyFrame::OnAbout)
#if !wxEVENTS_COMPATIBILITY_2_8
#ifdef wxHAS_EVENT_BIND
EVT_MENU(Event_Bind, MyFrame::OnBind)
#endif // !wxEVENTS_COMPATIBILITY_2_8
#endif // wxHAS_EVENT_BIND
EVT_MENU(Event_Connect, MyFrame::OnConnect)
EVT_MENU(Event_Custom, MyFrame::OnFireCustom)
@@ -257,10 +257,10 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
menuFile->Append(Event_Quit, _T("E&xit\tAlt-X"), _T("Quit this program"));
wxMenu *menuEvent = new wxMenu;
#if !wxEVENTS_COMPATIBILITY_2_8
#ifdef wxHAS_EVENT_BIND
menuEvent->AppendCheckItem(Event_Bind, "&Bind\tCtrl-B",
"Bind or unbind a dynamic event handler");
#endif // !wxEVENTS_COMPATIBILITY_2_8
#endif // wxHAS_EVENT_BIND
menuEvent->AppendCheckItem(Event_Connect, _T("&Connect\tCtrl-C"),
_T("Connect or disconnect the dynamic event handler"));
menuEvent->Append(Event_Dynamic, _T("&Dynamic event\tCtrl-D"),
@@ -352,7 +352,7 @@ void MyFrame::OnDynamic(wxCommandEvent& event)
);
}
#if !wxEVENTS_COMPATIBILITY_2_8
#ifdef wxHAS_EVENT_BIND
void MyFrame::OnBind(wxCommandEvent& event)
{
@@ -379,7 +379,7 @@ void MyFrame::OnBind(wxCommandEvent& event)
UpdateDynamicStatus(event.IsChecked());
}
#endif // !wxEVENTS_COMPATIBILITY_2_8
#endif // wxHAS_EVENT_BIND
void MyFrame::OnConnect(wxCommandEvent& event)
{