]>
Commit | Line | Data |
---|---|---|
32b8ec41 VZ |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: timer.h | |
1acd70f9 | 3 | // Purpose: wxTimer class |
32b8ec41 VZ |
4 | // Author: Vaclav Slavik |
5 | // Id: $Id$ | |
8f7b34a8 | 6 | // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) |
32b8ec41 VZ |
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 | ||
1acd70f9 VS |
22 | class wxTimerDesc; |
23 | class wxTimerScheduler; | |
24 | ||
32b8ec41 VZ |
25 | class WXDLLEXPORT wxTimer : public wxTimerBase |
26 | { | |
27 | public: | |
28 | wxTimer() { Init(); } | |
29 | wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id) | |
30 | { Init(); } | |
1acd70f9 | 31 | ~wxTimer(); |
32b8ec41 | 32 | |
1acd70f9 VS |
33 | virtual bool Start(int millisecs = -1, bool oneShot = FALSE); |
34 | virtual void Stop(); | |
32b8ec41 | 35 | |
1acd70f9 | 36 | virtual bool IsRunning() const; |
32b8ec41 | 37 | |
1acd70f9 VS |
38 | // implementation |
39 | static void NotifyTimers(); | |
32b8ec41 | 40 | |
1acd70f9 VS |
41 | protected: |
42 | void Init(); | |
32b8ec41 VZ |
43 | |
44 | private: | |
1acd70f9 VS |
45 | wxTimerDesc *m_desc; |
46 | ||
47 | static wxTimerScheduler *ms_scheduler; | |
48 | static size_t ms_timersCnt; | |
49 | ||
32b8ec41 VZ |
50 | DECLARE_ABSTRACT_CLASS(wxTimer) |
51 | }; | |
52 | ||
1acd70f9 | 53 | #endif // __WX_TIMER_H__ |