]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/timer.tex
GTK
[wxWidgets.git] / docs / latex / wx / timer.tex
1 \section{\class{wxTimer}}\label{wxtimer}
2
3 The wxTimer object is an abstraction of MS Windows and X toolkit timers. 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{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
22 Constructor.
23
24 \membersection{wxTimer::\destruct{wxTimer}}
25
26 \func{}{\destruct{wxTimer}}{\void}
27
28 Destructor. Stops the timer if activated.
29
30 \membersection{wxTimer::Interval}
31
32 \func{int}{Interval}{\void}
33
34 Returns the current interval for the timer.
35
36 \membersection{wxTimer::Notify}
37
38 \func{void}{Notify}{\void}
39
40 This 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
47 previous value is used. Returns FALSE if the timer could not be started,
48 TRUE otherwise (in MS Windows timers are a limited resource).
49
50 If {\it oneShot} is FALSE (the default), the Notify function will be repeatedly
51 called. If TRUE, Notify will be called only once.
52
53 \membersection{wxTimer::Stop}
54
55 \func{void}{Stop}{\void}
56
57 Stops the timer.
58
59