a660d684ed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
60 lines
1.4 KiB
TeX
60 lines
1.4 KiB
TeX
\section{\class{wxTimer}}\label{wxtimer}
|
|
|
|
The wxTimer object is an abstraction of MS Windows and X toolkit timers. To
|
|
use it, derive a new class and override the {\bf Notify} member to
|
|
perform the required action. Start with {\bf Start}, stop with {\bf
|
|
Stop}, it's as simple as that.
|
|
|
|
\wxheading{Derived from}
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
\wxheading{See also}
|
|
|
|
\helpref{::wxStartTimer}{wxstarttimer}, \helpref{::wxGetElapsedTime}{wxgetelapsedtime}
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
\membersection{wxTimer::wxTimer}
|
|
|
|
\func{}{wxTimer}{\void}
|
|
|
|
Constructor.
|
|
|
|
\membersection{wxTimer::\destruct{wxTimer}}
|
|
|
|
\func{}{\destruct{wxTimer}}{\void}
|
|
|
|
Destructor. Stops the timer if activated.
|
|
|
|
\membersection{wxTimer::Interval}
|
|
|
|
\func{int}{Interval}{\void}
|
|
|
|
Returns the current interval for the timer.
|
|
|
|
\membersection{wxTimer::Notify}
|
|
|
|
\func{void}{Notify}{\void}
|
|
|
|
This member should be overridden by the user. It is called on timeout.
|
|
|
|
\membersection{wxTimer::Start}
|
|
|
|
\func{bool}{Start}{\param{int}{ milliseconds = -1}, \param{bool}{ oneShot=FALSE}}
|
|
|
|
(Re)starts the timer. If {\it milliseconds}\/ is absent or -1, the
|
|
previous value is used. Returns FALSE if the timer could not be started,
|
|
TRUE otherwise (in MS Windows timers are a limited resource).
|
|
|
|
If {\it oneShot} is FALSE (the default), the Notify function will be repeatedly
|
|
called. If TRUE, Notify will be called only once.
|
|
|
|
\membersection{wxTimer::Stop}
|
|
|
|
\func{void}{Stop}{\void}
|
|
|
|
Stops the timer.
|
|
|
|
|