X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/88e243b29fff8074c8a8dc60a7431b6990eb35c0..10e4dbef5d9b87404c7cd76254d507245b65f66a:/include/wx/spinbutt.h?ds=sidebyside diff --git a/include/wx/spinbutt.h b/include/wx/spinbutt.h index 5b96330016..7e1cddfe98 100644 --- a/include/wx/spinbutt.h +++ b/include/wx/spinbutt.h @@ -24,7 +24,7 @@ #include "wx/defs.h" -#ifdef wxUSE_SPINBTN +#if wxUSE_SPINBTN #include "wx/control.h" #include "wx/event.h" @@ -113,15 +113,12 @@ public: typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&); // macros for handling spin events -#ifndef EVT_SPIN_UP -#define EVT_SPIN_UP(id, func) { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func }, -#endif -#ifndef EVT_SPIN_DOWN -#define EVT_SPIN_DOWN(id, func) { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func }, -#endif -#ifndef EVT_SPIN -#define EVT_SPIN(id, func) { wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func }, -#endif +#define EVT_SPIN_UP(id, func) \ + DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func, NULL ), +#define EVT_SPIN_DOWN(id, func) \ + DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func, NULL ), +#define EVT_SPIN(id, func) \ + DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func, NULL ), #endif // wxUSE_SPINBTN