- DECLARE_DYNAMIC_CLASS(wxTimer)
-
- friend void wxTimerCallback (wxTimer * timer);
-
- public:
- wxTimer();
- ~wxTimer();
- virtual bool Start(int milliseconds = -1,bool one_shot = FALSE); // Start timer
- virtual void Stop(); // Stop timer
- virtual void Notify() = 0; // Override this member
- inline int Interval() { return m_milli ; }; // Returns the current interval time (0 if stop)
-
+ friend void wxTimerCallback(wxTimer * timer);
+
+public:
+ wxTimer() { Init(); }
+ wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id)
+ { Init(); }
+ ~wxTimer();
+
+ virtual bool Start(int milliseconds = -1, bool oneShot = false);
+ virtual void Stop();
+
+ virtual bool IsRunning() const { return m_id != 0; }
+