]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mgl/timer.h
wxTimer for wxMGL
[wxWidgets.git] / include / wx / mgl / timer.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: timer.h
3 // Purpose: wxTimer class
4 // Author: Vaclav Slavik
5 // Id: $Id$
6 // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10
11 #ifndef __WX_TIMER_H__
12 #define __WX_TIMER_H__
13
14 #ifdef __GNUG__
15 #pragma interface "timer.h"
16 #endif
17
18 //-----------------------------------------------------------------------------
19 // wxTimer
20 //-----------------------------------------------------------------------------
21
22 class wxTimerDesc;
23 class wxTimerScheduler;
24
25 class WXDLLEXPORT wxTimer : public wxTimerBase
26 {
27 public:
28 wxTimer() { Init(); }
29 wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id)
30 { Init(); }
31 ~wxTimer();
32
33 virtual bool Start(int millisecs = -1, bool oneShot = FALSE);
34 virtual void Stop();
35
36 virtual bool IsRunning() const;
37
38 // implementation
39 static void NotifyTimers();
40
41 protected:
42 void Init();
43
44 private:
45 wxTimerDesc *m_desc;
46
47 static wxTimerScheduler *ms_scheduler;
48 static size_t ms_timersCnt;
49
50 DECLARE_ABSTRACT_CLASS(wxTimer)
51 };
52
53 #endif // __WX_TIMER_H__