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