X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..258e5c7427015e93a233c4d1a5d3cd164abbe57c:/include/wx/timer.h diff --git a/include/wx/timer.h b/include/wx/timer.h index 7ea894d04a..802544a91b 100644 --- a/include/wx/timer.h +++ b/include/wx/timer.h @@ -54,18 +54,10 @@ public: // start the timer: if milliseconds == -1, use the same value as for the // last Start() - virtual bool Start(int milliseconds = -1, bool oneShot = FALSE) - { - if ( milliseconds != -1 ) - { - m_milli = milliseconds; - } - - m_oneShot = oneShot; - - return TRUE; - } - + // + // it is now valid to call Start() multiple times: this just restarts the + // timer if it is already running + virtual bool Start(int milliseconds = -1, bool oneShot = FALSE); // stop the timer virtual void Stop() = 0; @@ -179,7 +171,8 @@ private: typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&); -#define EVT_TIMER(id, func) { wxEVT_TIMER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTimerEventFunction) & func, NULL}, +#define EVT_TIMER(id, func) \ + wxEventTableEntry( wxEVT_TIMER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTimerEventFunction) & func, NULL), #endif // wxUSE_GUI