// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+// generate notifications periodically until the timer is stopped (default)
+#define wxTIMER_CONTINUOUS false
+
+// only send the notification once and then stop the timer
+#define wxTIMER_ONE_SHOT true
+
+wxEventType wxEVT_TIMER;
+
+
/**
@class wxTimer
wxEvtHandler* GetOwner() const;
/**
- Returns @true if the timer is one shot, i.e. if it will stop after firing
+ Returns @true if the timer is one shot, i.e.\ if it will stop after firing
the first notification automatically.
*/
bool IsOneShot() const;
};
+/**
+ @class wxTimerRunner
+
+ Starts the timer in its ctor, stops in the dtor.
+*/
+class wxTimerRunner
+{
+public:
+ wxTimerRunner(wxTimer& timer);
+ wxTimerRunner(wxTimer& timer, int milli, bool oneShot = false);
+ void Start(int milli, bool oneShot = false);
+ ~wxTimerRunner();
+};
/**
@class wxTimerEvent
class wxTimerEvent : public wxEvent
{
public:
+ wxTimerEvent();
+ wxTimerEvent(wxTimer& timer);
+
/**
Returns the interval of the timer which generated this event.
*/