X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a0e9a5dfdeebc1d5e2d7e6e2146e63a26c8645a1..cb8ae61385f1c65552585cb55d8f7bd9f1f690b4:/interface/wx/timer.h?ds=sidebyside diff --git a/interface/wx/timer.h b/interface/wx/timer.h index 12513350ae..054e890057 100644 --- a/interface/wx/timer.h +++ b/interface/wx/timer.h @@ -3,9 +3,18 @@ // Purpose: interface of wxTimer // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +// generate notifications periodically until the timer is stopped (default) +#define wxTIMER_CONTINUOUS false + +// only send the notification once and then stop the timer +#define wxTIMER_ONE_SHOT true + +wxEventType wxEVT_TIMER; + + /** @class wxTimer @@ -131,6 +140,19 @@ public: }; +/** + @class wxTimerRunner + + Starts the timer in its ctor, stops in the dtor. +*/ +class wxTimerRunner +{ +public: + wxTimerRunner(wxTimer& timer); + wxTimerRunner(wxTimer& timer, int milli, bool oneShot = false); + void Start(int milli, bool oneShot = false); + ~wxTimerRunner(); +}; /** @class wxTimerEvent @@ -176,6 +198,9 @@ public: class wxTimerEvent : public wxEvent { public: + wxTimerEvent(); + wxTimerEvent(wxTimer& timer); + /** Returns the interval of the timer which generated this event. */