]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/timer.h
applied heavily modified patch 1116702: support for specifying disabled toolbar image...
[wxWidgets.git] / include / wx / timer.h
index c8bce5dc9b3e4a0f0ca3bb5340ae7abefdade73d..f17a83a091bb3dd8dbb23ba068d7c464485bc76f 100644 (file)
     #pragma interface "timerbase.h"
 #endif
 
     #pragma interface "timerbase.h"
 #endif
 
-#include "wx/setup.h"
+#include "wx/defs.h"
+
+#if wxUSE_GUI && wxUSE_TIMER
+
 #include "wx/object.h"
 #include "wx/longlong.h"
 #include "wx/event.h"
 #include "wx/object.h"
 #include "wx/longlong.h"
 #include "wx/event.h"
-
 #include "wx/stopwatch.h" // for backwards compatibility
 
 #include "wx/stopwatch.h" // for backwards compatibility
 
-#if wxUSE_GUI && wxUSE_TIMER
-
 // ----------------------------------------------------------------------------
 // wxTimer
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxTimer
 // ----------------------------------------------------------------------------
@@ -189,8 +189,11 @@ private:
 
 typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
 
 
 typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
 
+#define wxTimerEventHandler(func) \
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxTimerEventFunction, &func)
+
 #define EVT_TIMER(timerid, 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
 
 
 #endif // wxUSE_GUI && wxUSE_TIMER