]>
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 | #ifndef _WX_GTK_TIMER_H_ | |
11 | #define _WX_GTK_TIMER_H_ | |
12 | ||
13 | //----------------------------------------------------------------------------- | |
14 | // wxTimer | |
15 | //----------------------------------------------------------------------------- | |
16 | ||
17 | class WXDLLIMPEXP_CORE wxTimer : public wxTimerBase | |
18 | { | |
19 | public: | |
20 | wxTimer() { Init(); } | |
21 | wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id) | |
22 | { Init(); } | |
23 | virtual ~wxTimer(); | |
24 | ||
25 | virtual bool Start(int millisecs = -1, bool oneShot = false); | |
26 | virtual void Stop(); | |
27 | ||
28 | virtual bool IsRunning() const { return m_sourceId != 0; } | |
29 | ||
30 | private: | |
31 | void Init(); | |
32 | ||
33 | unsigned m_sourceId; | |
34 | ||
35 | DECLARE_ABSTRACT_CLASS(wxTimer) | |
36 | }; | |
37 | ||
38 | #endif // _WX_GTK_TIMER_H_ |