]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/timer.h
fix top margin for static box sizer when wxDIALOG_UNIT_COMPATIBILITY == 0
[wxWidgets.git] / include / wx / timer.h
index 313e0446807de9a71c5dc2c5c05da52f49221cdb..409f88dc5301bb68e7de5cc4e52a6755ed6d29ef 100644 (file)
@@ -118,8 +118,10 @@ protected:
     #include "wx/motif/timer.h"
 #elif defined(__WXGTK__)
     #include "wx/gtk/timer.h"
-#elif defined(__WXX11__) || defined(__WXMGL__) || defined(__WXCOCOA__)
+#elif defined(__WXX11__) || defined(__WXMGL__)
     #include "wx/generic/timer.h"
+#elif defined (__WXCOCOA__)
+    #include "wx/cocoa/timer.h"
 #elif defined(__WXMAC__)
     #include "wx/mac/timer.h"
 #elif defined(__WXPM__)
@@ -187,8 +189,11 @@ private:
 
 typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
 
+#define wxTimerEventHandler(func) \
+    (wxObjectEventFunction)wxStaticCastEvent(wxTimerEventFunction, &func)
+
 #define EVT_TIMER(timerid, func) \
-    DECLARE_EVENT_TABLE_ENTRY( wxEVT_TIMER, timerid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxTimerEventFunction, & func ), NULL),
+    wx__DECLARE_EVT1(wxEVT_TIMER, timerid, wxTimerEventHandler(func))
 
 #endif // wxUSE_GUI && wxUSE_TIMER