]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/spinbutt.h
subclass all updown controls in notebooks, not just the first one
[wxWidgets.git] / include / wx / spinbutt.h
index 0f2e442ed05023f7d56ebe64d54f2f8dc0f38b9f..7f7edb9e5be612a10a83e889c02b60537d0b9886 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     23.07.99
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:     wxWidgets licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_SPINBUTT_H_BASE_
@@ -110,13 +110,16 @@ private:
 
 typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&);
 
+#define wxSpinEventHandler(func) \
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSpinEventFunction, &func)
+
 // macros for handling spin events
 #define EVT_SPIN_UP(winid, func) \
-    DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEUP, winid, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxSpinEventFunction, & func ), NULL ),
+    wx__DECLARE_EVT1(wxEVT_SCROLL_LINEUP, winid, wxSpinEventHandler(func))
 #define EVT_SPIN_DOWN(winid, func) \
-    DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_LINEDOWN, winid, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxSpinEventFunction, & func ), NULL ),
+    wx__DECLARE_EVT1(wxEVT_SCROLL_LINEDOWN, winid, wxSpinEventHandler(func))
 #define EVT_SPIN(winid, func) \
-    DECLARE_EVENT_TABLE_ENTRY( wxEVT_SCROLL_THUMBTRACK, winid, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxSpinEventFunction, & func ), NULL ),
+    wx__DECLARE_EVT1(wxEVT_SCROLL_THUMBTRACK, winid, wxSpinEventHandler(func))
 
 #endif // wxUSE_SPINBTN