]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/spinbutt.h
routing native events first to the wx class and only if skipped call native handler
[wxWidgets.git] / include / wx / spinbutt.h
index ae2346316c010a1a97ec9430b05740e23a3578bb..a068833a9831484fdcf5b47259b49241d68c1fef 100644 (file)
 
 #define wxSPIN_BUTTON_NAME _T("wxSpinButton")
 
+class WXDLLIMPEXP_FWD_CORE wxSpinEvent;
+wxDECLARE_EXPORTED_EVENT_REFERENCE( WXDLLIMPEXP_CORE, wxEVT_SPIN_UP,   wxSpinEvent )
+wxDECLARE_EXPORTED_EVENT_REFERENCE( WXDLLIMPEXP_CORE, wxEVT_SPIN_DOWN, wxSpinEvent )
+wxDECLARE_EXPORTED_EVENT_REFERENCE( WXDLLIMPEXP_CORE, wxEVT_SPIN,      wxSpinEvent )
+
 // ----------------------------------------------------------------------------
 //  The wxSpinButton is like a small scrollbar than is often placed next
 //  to a text control.
@@ -36,7 +41,7 @@
 //  wxSP_WRAP:         value wraps at either end
 // ----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxSpinButtonBase : public wxControl
+class WXDLLIMPEXP_CORE wxSpinButtonBase : public wxControl
 {
 public:
     // ctor initializes the range with the default (0..100) values
@@ -83,7 +88,7 @@ protected:
 #elif defined(__WXGTK__)
     #include "wx/gtk1/spinbutt.h"
 #elif defined(__WXMAC__)
-    #include "wx/mac/spinbutt.h"
+    #include "wx/osx/spinbutt.h"
 #elif defined(__WXCOCOA__)
     #include "wx/cocoa/spinbutt.h"
 #elif defined(__WXPM__)
@@ -94,7 +99,7 @@ protected:
 // the wxSpinButton event
 // ----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxSpinEvent : public wxNotifyEvent
+class WXDLLIMPEXP_CORE wxSpinEvent : public wxNotifyEvent
 {
 public:
     wxSpinEvent(wxEventType commandType = wxEVT_NULL, int winid = 0)
@@ -120,15 +125,15 @@ private:
 typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&);
 
 #define wxSpinEventHandler(func) \
-    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSpinEventFunction, &func)
+    wxEVENT_HANDLER_CAST(wxSpinEventFunction, func)
 
 // macros for handling spin events
 #define EVT_SPIN_UP(winid, func) \
-    wx__DECLARE_EVT1(wxEVT_SCROLL_LINEUP, winid, wxSpinEventHandler(func))
+    wx__DECLARE_EVT1(wxEVT_SPIN_UP, winid, wxSpinEventHandler(func))
 #define EVT_SPIN_DOWN(winid, func) \
-    wx__DECLARE_EVT1(wxEVT_SCROLL_LINEDOWN, winid, wxSpinEventHandler(func))
+    wx__DECLARE_EVT1(wxEVT_SPIN_DOWN, winid, wxSpinEventHandler(func))
 #define EVT_SPIN(winid, func) \
-    wx__DECLARE_EVT1(wxEVT_SCROLL_THUMBTRACK, winid, wxSpinEventHandler(func))
+    wx__DECLARE_EVT1(wxEVT_SPIN, winid, wxSpinEventHandler(func))
 
 #endif // wxUSE_SPINBTN