+public:
+ // ctors and initializers
+ // ----------------------
+
+ // default: if you don't call SetOwner(), your only chance to get timer
+ // notifications is to override Notify() in the derived class
+ wxTimer()
+ {
+ Init();
+ SetOwner(this);
+ }
+
+ // ctor which allows to avoid having to override Notify() in the derived
+ // class: the owner will get timer notifications which can be handled with
+ // EVT_TIMER
+ wxTimer(wxEvtHandler *owner, int timerid = wxID_ANY)
+ {
+ Init();
+ SetOwner(owner, timerid);
+ }
+
+ // same as ctor above
+ void SetOwner(wxEvtHandler *owner, int timerid = wxID_ANY);
+
+ virtual ~wxTimer();
+
+
+ // working with the timer
+ // ----------------------
+
+ // NB: Start() and Stop() are not supposed to be overridden, they are only
+ // virtual for historical reasons, only Notify() can be overridden
+
+ // start the timer: if milliseconds == -1, use the same value as for the
+ // last Start()
+ //
+ // it is now valid to call Start() multiple times: this just restarts the
+ // timer if it is already running
+ virtual bool Start(int milliseconds = -1, bool oneShot = false);
+
+ // stop the timer, does nothing if the timer is not running
+ virtual void Stop();
+
+ // override this in your wxTimer-derived class if you want to process timer
+ // messages in it, use non default ctor or SetOwner() otherwise
+ virtual void Notify();
+
+
+ // accessors
+ // ---------
+
+ // get the object notified about the timer events
+ wxEvtHandler *GetOwner() const;