]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/timer.tex
Doc updates.
[wxWidgets.git] / docs / latex / wx / timer.tex
1 \section{\class{wxTimer}}\label{wxtimer}
2
3 The wxTimer class allows you to execute code at specified intervals. To
4 use it, derive a new class and override the {\bf Notify} member to
5 perform the required action. Start with {\bf Start}, stop with {\bf
6 Stop}, it's as simple as that.
7
8 \wxheading{Derived from}
9
10 \helpref{wxObject}{wxobject}
11
12 \wxheading{Include files}
13
14 <wx/timer.h>
15
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
26 Constructor.
27
28 \membersection{wxTimer::\destruct{wxTimer}}
29
30 \func{}{\destruct{wxTimer}}{\void}
31
32 Destructor. Stops the timer if activated.
33
34 \membersection{wxTimer::Interval}
35
36 \func{int}{Interval}{\void}
37
38 Returns the current interval for the timer.
39
40 \membersection{wxTimer::Notify}
41
42 \func{void}{Notify}{\void}
43
44 This 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
51 previous value is used. Returns FALSE if the timer could not be started,
52 TRUE otherwise (in MS Windows timers are a limited resource).
53
54 If {\it oneShot} is FALSE (the default), the Notify function will be repeatedly
55 called. If TRUE, Notify will be called only once.
56
57 \membersection{wxTimer::Stop}
58
59 \func{void}{Stop}{\void}
60
61 Stops the timer.
62
63