]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/timer.tex
GTK
[wxWidgets.git] / docs / latex / wx / timer.tex
CommitLineData
a660d684
KB
1\section{\class{wxTimer}}\label{wxtimer}
2
3The wxTimer object is an abstraction of MS Windows and X toolkit timers. To
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
12\wxheading{See also}
13
14\helpref{::wxStartTimer}{wxstarttimer}, \helpref{::wxGetElapsedTime}{wxgetelapsedtime}
15
16\latexignore{\rtfignore{\wxheading{Members}}}
17
18\membersection{wxTimer::wxTimer}
19
20\func{}{wxTimer}{\void}
21
22Constructor.
23
24\membersection{wxTimer::\destruct{wxTimer}}
25
26\func{}{\destruct{wxTimer}}{\void}
27
28Destructor. Stops the timer if activated.
29
30\membersection{wxTimer::Interval}
31
32\func{int}{Interval}{\void}
33
34Returns the current interval for the timer.
35
36\membersection{wxTimer::Notify}
37
38\func{void}{Notify}{\void}
39
40This member should be overridden by the user. It is called on timeout.
41
42\membersection{wxTimer::Start}
43
44\func{bool}{Start}{\param{int}{ milliseconds = -1}, \param{bool}{ oneShot=FALSE}}
45
46(Re)starts the timer. If {\it milliseconds}\/ is absent or -1, the
47previous value is used. Returns FALSE if the timer could not be started,
48TRUE otherwise (in MS Windows timers are a limited resource).
49
50If {\it oneShot} is FALSE (the default), the Notify function will be repeatedly
51called. If TRUE, Notify will be called only once.
52
53\membersection{wxTimer::Stop}
54
55\func{void}{Stop}{\void}
56
57Stops the timer.
58
59