/////////////////////////////////////////////////////////////////////////////
// Name: timer.h
-// Purpose: documentation for wxTimer class
+// Purpose: interface of wxTimer
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
after constructing it before it actually starts sending notifications. It can
be stopped later with wxTimer::Stop.
- @b Note: A timer can only be used from the main thread.
+ @note A timer can only be used from the main thread.
@library{wxbase}
@category{misc}
- @seealso
- wxStopWatch
+ @see wxStopWatch
*/
class wxTimer : public wxEvtHandler
{
/**
Returns the ID of the events generated by this timer.
*/
- int GetId();
+ int GetId() const;
/**
Returns the current interval for the timer (in milliseconds).
*/
- int GetInterval();
+ int GetInterval() const;
/**
Returns the current @e owner of the timer.
If non-@NULL this is the event handler which will receive the
@ref overview_wxtimerevent "timer events" when the timer is running.
*/
- wxEvtHandler GetOwner();
+ wxEvtHandler GetOwner() const;
/**
Returns @true if the timer is one shot, i.e. if it will stop after firing the
first notification automatically.
*/
- bool IsOneShot();
+ bool IsOneShot() const;
/**
Returns @true if the timer is running, @false if it is stopped.
*/
- bool IsRunning();
+ bool IsRunning() const;
/**
This member should be overridden by the user if the default constructor was
function will be called repeatedly until the timer is stopped. If @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:
-
+
wxTIMER_CONTINUOUS
-
+
Start a normal, continuously running, timer
-
+
wxTIMER_ONE_SHOT
-
+
Start a one shot timer
-
+
If the timer was already running, it will be stopped by this method before
restarting it.
*/
};
+
/**
@class wxTimerEvent
@wxheader{timer.h}
@library{wxbase}
@category{events}
- @seealso
- wxTimer
+ @see wxTimer
*/
class wxTimerEvent : public wxEvent
{
/**
Returns the interval of the timer which generated this event.
*/
- int GetInterval();
+ int GetInterval() const;
/**
Returns the timer object which generated this event.
*/
- wxTimer GetTimer();
+ wxTimer GetTimer() const;
};
+