]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/gtk/timer.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Id: $Id$ | |
6 | // Copyright: (c) 1998 Robert Roebling | |
7 | // Licence: wxWindows licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | ||
11 | #ifndef __GTKTIMERH__ | |
12 | #define __GTKTIMERH__ | |
13 | ||
14 | #ifdef __GNUG__ | |
15 | #pragma interface "timer.h" | |
16 | #endif | |
17 | ||
18 | //----------------------------------------------------------------------------- | |
19 | // wxTimer | |
20 | //----------------------------------------------------------------------------- | |
21 | ||
22 | class wxTimer : public wxTimerBase | |
23 | { | |
24 | public: | |
25 | wxTimer() { Init(); } | |
26 | wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id) | |
27 | { Init(); } | |
28 | ~wxTimer(); | |
29 | ||
30 | virtual bool Start( int millisecs = -1, bool oneShot = FALSE ); | |
31 | virtual void Stop(); | |
32 | ||
33 | virtual bool IsRunning() const { return m_tag != -1; } | |
34 | ||
35 | protected: | |
36 | void Init(); | |
37 | ||
38 | int m_tag; | |
39 | ||
40 | private: | |
41 | DECLARE_ABSTRACT_CLASS(wxTimer) | |
42 | }; | |
43 | ||
44 | #endif // __GTKTIMERH__ |