]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: 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 | |
16 | #endif | |
17 | ||
18 | #include "wx/defs.h" | |
19 | #include "wx/object.h" | |
20 | ||
21 | //----------------------------------------------------------------------------- | |
22 | // derived classes | |
23 | //----------------------------------------------------------------------------- | |
24 | ||
25 | class wxTimer; | |
26 | ||
27 | //----------------------------------------------------------------------------- | |
28 | // wxTimer | |
29 | //----------------------------------------------------------------------------- | |
30 | ||
31 | class wxTimer: public wxObject | |
32 | { | |
33 | public: | |
34 | wxTimer(); | |
35 | ~wxTimer(); | |
36 | ||
37 | int Interval() const { return m_time; } | |
38 | ||
39 | bool OneShot() const { return m_oneShot; } | |
40 | ||
41 | virtual bool Start( int millisecs = -1, bool oneShot = FALSE ); | |
42 | virtual void Stop(); | |
43 | ||
44 | virtual void Notify() = 0; // override this | |
45 | ||
46 | protected: | |
47 | int m_tag; | |
48 | int m_time; | |
49 | bool m_oneShot; | |
50 | ||
51 | private: | |
52 | DECLARE_ABSTRACT_CLASS(wxTimer) | |
53 | }; | |
54 | ||
55 | #endif // __GTKTIMERH__ |