]>
Commit | Line | Data |
---|---|---|
9b6dbb09 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: timer.h | |
3 | // Purpose: wxTimer class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_TIMER_H_ | |
13 | #define _WX_TIMER_H_ | |
14 | ||
12028905 | 15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
83df96d6 | 16 | #pragma interface "timer.h" |
9b6dbb09 JS |
17 | #endif |
18 | ||
0470b1e6 | 19 | class WXDLLEXPORT wxTimer : public wxTimerBase |
9b6dbb09 | 20 | { |
83df96d6 JS |
21 | friend void wxTimerCallback(wxTimer * timer); |
22 | ||
0470b1e6 | 23 | public: |
b3ddc4c2 GRG |
24 | wxTimer() { Init(); } |
25 | wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id) | |
83df96d6 | 26 | { Init(); } |
0470b1e6 | 27 | ~wxTimer(); |
83df96d6 | 28 | |
0470b1e6 VZ |
29 | virtual bool Start(int milliseconds = -1, bool oneShot = FALSE); |
30 | virtual void Stop(); | |
83df96d6 | 31 | |
0470b1e6 | 32 | virtual bool IsRunning() const { return m_id != 0; } |
83df96d6 | 33 | |
9b6dbb09 | 34 | protected: |
b3ddc4c2 | 35 | void Init(); |
83df96d6 | 36 | |
0470b1e6 | 37 | long m_id; |
83df96d6 | 38 | |
0470b1e6 VZ |
39 | private: |
40 | DECLARE_DYNAMIC_CLASS(wxTimer) | |
9b6dbb09 JS |
41 | }; |
42 | ||
9b6dbb09 | 43 | #endif |
83df96d6 | 44 | // _WX_TIMER_H_ |