]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/timer.h
simpler implementation
[wxWidgets.git] / include / wx / generic / timer.h
CommitLineData
32b8ec41
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: timer.h
a0cb0ba5 3// Purpose: Generic implementation of wxTimer class
32b8ec41
VZ
4// Author: Vaclav Slavik
5// Id: $Id$
6d89ddef 6// Copyright: (c) Vaclav Slavik
65571936 7// Licence: wxWindows licence
32b8ec41
VZ
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __WX_TIMER_H__
12#define __WX_TIMER_H__
13
32b8ec41
VZ
14//-----------------------------------------------------------------------------
15// wxTimer
16//-----------------------------------------------------------------------------
17
1acd70f9 18class wxTimerDesc;
1acd70f9 19
32b8ec41
VZ
20class WXDLLEXPORT wxTimer : public wxTimerBase
21{
22public:
23 wxTimer() { Init(); }
c5c5dad5 24 wxTimer(wxEvtHandler *owner, int timerid = -1) : wxTimerBase(owner, timerid)
32b8ec41 25 { Init(); }
d3c7fc99 26 virtual ~wxTimer();
32b8ec41 27
ca65c044 28 virtual bool Start(int millisecs = -1, bool oneShot = false);
1acd70f9 29 virtual void Stop();
32b8ec41 30
1acd70f9 31 virtual bool IsRunning() const;
32b8ec41 32
1acd70f9
VS
33 // implementation
34 static void NotifyTimers();
32b8ec41 35
1acd70f9
VS
36protected:
37 void Init();
32b8ec41
VZ
38
39private:
1acd70f9 40 wxTimerDesc *m_desc;
ca65c044 41
32b8ec41
VZ
42 DECLARE_ABSTRACT_CLASS(wxTimer)
43};
44
1acd70f9 45#endif // __WX_TIMER_H__