]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/timer.tex
added wxCLOSE
[wxWidgets.git] / docs / latex / wx / timer.tex
index 97939eb2bae0396c2e2bc4c7b162ab14db919973..98c0f22c4ab6ce60c1262d06f73cf0002ebc398c 100644 (file)
@@ -20,6 +20,8 @@ In any case, you must start the timer with \helpref{Start}{wxtimerstart}
 after constructing it before it actually starts sending notifications. It can
 be stopped later with \helpref{Stop}{wxtimerstop}.
 
 after constructing it before it actually starts sending notifications. It can
 be stopped later with \helpref{Stop}{wxtimerstop}.
 
+{\bf NB:} note that timer can only be used from the main thread currently.
+
 \wxheading{Derived from}
 
 \helpref{wxObject}{wxobject}
 \wxheading{Derived from}
 
 \helpref{wxObject}{wxobject}
@@ -63,14 +65,14 @@ Returns the current interval for the timer (in milliseconds).
 
 \constfunc{bool}{IsOneShot}{\void}
 
 
 \constfunc{bool}{IsOneShot}{\void}
 
-Returns TRUE if the timer is one shot, i.e. if it will stop after firing the
+Returns {\tt true} if the timer is one shot, i.e.\ if it will stop after firing the
 first notification automatically.
 
 \membersection{wxTimer::IsRunning}\label{wxtimerisrunning}
 
 \constfunc{bool}{IsRunning}{\void}
 
 first notification automatically.
 
 \membersection{wxTimer::IsRunning}\label{wxtimerisrunning}
 
 \constfunc{bool}{IsRunning}{\void}
 
-Returns TRUE if the timer is running, FALSE if it is stopped.
+Returns {\tt true} if the timer is running, {\tt false} if it is stopped.
 
 \membersection{wxTimer::Notify}\label{wxtimernotify}
 
 
 \membersection{wxTimer::Notify}\label{wxtimernotify}
 
@@ -85,21 +87,28 @@ Perform whatever action which is to be taken periodically here.
 
 \func{void}{SetOwner}{\param{wxEvtHandler *}{owner}, \param{int }{id = -1}}
 
 
 \func{void}{SetOwner}{\param{wxEvtHandler *}{owner}, \param{int }{id = -1}}
 
-Associates the timer with the given {\it owner} object. When the timer is
+Associates the timer with the given {\it owner}\/ object. When the timer is
 running, the owner will receive \helpref{timer events}{wxtimerevent} with
 running, the owner will receive \helpref{timer events}{wxtimerevent} with
-id equal to {\it id} specified here.
+id equal to {\it id}\/ specified here.
 
 \membersection{wxTimer::Start}\label{wxtimerstart}
 
 
 \membersection{wxTimer::Start}\label{wxtimerstart}
 
-\func{bool}{Start}{\param{int}{ milliseconds = -1}, \param{bool}{ oneShot=FALSE}}
+\func{bool}{Start}{\param{int}{milliseconds = -1}, \param{bool }{oneShot = {\tt false}}}
+
+(Re)starts the timer. If {\it milliseconds}\/ parameter is -1 (value by default),
+the previous value is used. Returns {\tt false} if the timer could not be started,
+{\tt true} otherwise (in MS Windows timers are a limited resource).
 
 
-(Re)starts the timer. If {\it milliseconds} parameter is -1 (value by default),
-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 {\tt false} (the default), the \helpref{Notify}{wxtimernotify} 
+function will be called repeatedly until the timer is stopped. If {\tt true},
+it will be called only once and the timer will stop automatically. To make your
+code more readable you may also use the following symbolic constants
+\twocolwidtha{5cm}%
+\begin{twocollist}\itemsep=0pt
+\twocolitem{wxTIMER\_CONTINUOUS}{Start a normal, continuously running, timer}
+\twocolitem{wxTIMER\_ONE\_SHOT}{Start a one shot timer}
+\end{twocollist}
 
 
-If {\it oneShot} is FALSE (the default), the \helpref{Notify}{wxtimernotify} 
-function will be called repeatedly until the timer is stopped. If TRUE,
-it will be called only once and the timer will stop automatically.
 
 If the timer was already running, it will be stopped by this method before
 restarting it.
 
 If the timer was already running, it will be stopped by this method before
 restarting it.