X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/61c083e7818114734695cb26aa006098a86e62c3..682214d5c6ec3e56dbdfd0c97d70d87e614b38c2:/include/wx/choicebk.h?ds=inline diff --git a/include/wx/choicebk.h b/include/wx/choicebk.h index 93338894e8..dadd5f4be7 100644 --- a/include/wx/choicebk.h +++ b/include/wx/choicebk.h @@ -125,23 +125,14 @@ extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING typedef void (wxEvtHandler::*wxChoicebookEventFunction)(wxChoicebookEvent&); -#define EVT_CHOICEBOOK_PAGE_CHANGED(id, fn) \ - DECLARE_EVENT_TABLE_ENTRY( \ - wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, \ - id, \ - wxID_ANY, \ - (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxChoicebookEventFunction, &fn ), \ - NULL \ - ), - -#define EVT_CHOICEBOOK_PAGE_CHANGING(id, fn) \ - DECLARE_EVENT_TABLE_ENTRY( \ - wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, \ - id, \ - wxID_ANY, \ - (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxChoicebookEventFunction, &fn ), \ - NULL \ - ), +#define wxChoicebookEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxChoicebookEventFunction, &func) + +#define EVT_CHOICEBOOK_PAGE_CHANGED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, winid, wxChoicebookEventHandler(fn)) + +#define EVT_CHOICEBOOK_PAGE_CHANGING(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, winid, wxChoicebookEventHandler(fn)) #endif // wxUSE_CHOICEBOOK