+// ----------------------------------------------------------------------------
+// the wxSpinButton event
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxSpinEvent : public wxNotifyEvent
+{
+ DECLARE_DYNAMIC_CLASS(wxSpinEvent)
+
+public:
+ wxSpinEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
+ : wxNotifyEvent(commandType, id)
+ {
+ }
+
+ // get the current value of the control
+ int GetPosition() const { return m_commandInt; }
+ void SetPosition(int pos) { m_commandInt = pos; }
+};
+
+typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&);
+
+// macros for handling spin events
+#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
+