]>
Commit | Line | Data |
---|---|---|
0e320a79 DW |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: timer.h | |
3 | // Purpose: wxTimer class | |
d90895ac | 4 | // Author: David Webster |
0e320a79 | 5 | // Modified by: |
d90895ac | 6 | // Created: 10/17/99 |
0e320a79 | 7 | // RCS-ID: $Id$ |
d90895ac DW |
8 | // Copyright: (c) David Webster |
9 | // Licence: wxWindows licence | |
0e320a79 DW |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_TIMER_H_ | |
13 | #define _WX_TIMER_H_ | |
14 | ||
0e320a79 DW |
15 | #include "wx/object.h" |
16 | ||
9ed0fac8 | 17 | class WXDLLEXPORT wxTimer: public wxTimerBase |
0e320a79 | 18 | { |
d90895ac DW |
19 | friend void wxProcessTimer(wxTimer& timer); |
20 | ||
0e320a79 | 21 | public: |
b9cf5e6d DW |
22 | wxTimer() { Init(); } |
23 | wxTimer( wxEvtHandler* pOwner | |
24 | ,int nId = -1 | |
25 | ) | |
26 | : wxTimerBase( pOwner | |
27 | ,nId | |
28 | ) | |
29 | { Init(); } | |
0e320a79 DW |
30 | ~wxTimer(); |
31 | ||
6c0fdfbb | 32 | virtual void Notify(void); |
9ed0fac8 DW |
33 | virtual bool Start( int nMilliseconds = -1 |
34 | ,bool bOneShot = FALSE | |
35 | ); | |
36 | virtual void Stop(void); | |
0e320a79 | 37 | |
9ed0fac8 | 38 | inline virtual bool IsRunning(void) const { return m_ulId != 0L; } |
0e320a79 DW |
39 | |
40 | protected: | |
b9cf5e6d DW |
41 | void Init(void); |
42 | ||
9ed0fac8 DW |
43 | ULONG m_ulId; |
44 | HAB m_Hab; | |
0e320a79 DW |
45 | |
46 | private: | |
47 | DECLARE_ABSTRACT_CLASS(wxTimer) | |
48 | }; | |
49 | ||
b9cf5e6d DW |
50 | extern ULONG wxTimerProc( HWND WXUNUSED(hwnd) |
51 | ,ULONG | |
52 | ,int nIdTimer | |
53 | ,ULONG | |
54 | ); | |
0e320a79 DW |
55 | #endif |
56 | // _WX_TIMER_H_ |