]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/timer.tex
documented wxMENU_TEAROFF
[wxWidgets.git] / docs / latex / wx / timer.tex
CommitLineData
a660d684
KB
1\section{\class{wxTimer}}\label{wxtimer}
2
954b8ae6 3The wxTimer class allows you to execute code at specified intervals. To
a660d684
KB
4use it, derive a new class and override the {\bf Notify} member to
5perform the required action. Start with {\bf Start}, stop with {\bf
6Stop}, it's as simple as that.
7
8\wxheading{Derived from}
9
10\helpref{wxObject}{wxobject}
11
954b8ae6
JS
12\wxheading{Include files}
13
14<wx/timer.h>
15
a660d684
KB
16\wxheading{See also}
17
18\helpref{::wxStartTimer}{wxstarttimer}, \helpref{::wxGetElapsedTime}{wxgetelapsedtime}
19
20\latexignore{\rtfignore{\wxheading{Members}}}
21
22\membersection{wxTimer::wxTimer}
23
24\func{}{wxTimer}{\void}
25
26Constructor.
27
28\membersection{wxTimer::\destruct{wxTimer}}
29
30\func{}{\destruct{wxTimer}}{\void}
31
32Destructor. Stops the timer if activated.
33
34\membersection{wxTimer::Interval}
35
36\func{int}{Interval}{\void}
37
38Returns the current interval for the timer.
39
40\membersection{wxTimer::Notify}
41
42\func{void}{Notify}{\void}
43
44This member should be overridden by the user. It is called on timeout.
45
46\membersection{wxTimer::Start}
47
48\func{bool}{Start}{\param{int}{ milliseconds = -1}, \param{bool}{ oneShot=FALSE}}
49
50(Re)starts the timer. If {\it milliseconds}\/ is absent or -1, the
51previous value is used. Returns FALSE if the timer could not be started,
52TRUE otherwise (in MS Windows timers are a limited resource).
53
54If {\it oneShot} is FALSE (the default), the Notify function will be repeatedly
55called. If TRUE, Notify will be called only once.
56
57\membersection{wxTimer::Stop}
58
59\func{void}{Stop}{\void}
60
61Stops the timer.
62
63