X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/884a3e9d375ed780dbd4677f3c56acc4b71f70a8..1b7751aaa9a86d76a850b9267bc0c201e3cea30f:/interface/wx/timer.h?ds=sidebyside diff --git a/interface/wx/timer.h b/interface/wx/timer.h index 054e890057..123c626fd6 100644 --- a/interface/wx/timer.h +++ b/interface/wx/timer.h @@ -86,7 +86,7 @@ public: wxEvtHandler* GetOwner() const; /** - Returns @true if the timer is one shot, i.e. if it will stop after firing + Returns @true if the timer is one shot, i.e.\ if it will stop after firing the first notification automatically. */ bool IsOneShot() const; @@ -128,10 +128,21 @@ public: To make your code more readable you may also use the following symbolic constants: - wxTIMER_CONTINUOUS: Start a normal, continuously running, timer - wxTIMER_ONE_SHOT: Start a one shot timer + Alternatively, use StartOnce(). + If the timer was already running, it will be stopped by this method before restarting it. */ - virtual bool Start(int milliseconds = -1, bool oneShot = false); + virtual bool Start(int milliseconds = -1, bool oneShot = wxTIMER_CONTINUOUS); + + /** + Starts the timer for a once-only notification. + + This is a simple wrapper for Start() with @c wxTIMER_ONE_SHOT parameter. + + @since 2.9.5 + */ + bool StartOnce(int milliseconds = -1); /** Stops the timer.