]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/timer.h
wxMovieCtrl - for playing movies - mac carbon QT 3 MSW-compatable implementation...
[wxWidgets.git] / include / wx / msw / timer.h
CommitLineData
2bda0e17
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: timer.h
3// Purpose: wxTimer class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_TIMER_H_
13#define _WX_TIMER_H_
2bda0e17 14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
0470b1e6 16 #pragma interface "timer.h"
2bda0e17
KB
17#endif
18
0470b1e6 19class WXDLLEXPORT wxTimer : public wxTimerBase
2bda0e17 20{
c085e333
VZ
21friend void wxProcessTimer(wxTimer& timer);
22
03f38c58 23public:
ed791986 24 wxTimer() { Init(); }
bfbb0b4c 25 wxTimer(wxEvtHandler *owner, int id = wxID_ANY) : wxTimerBase(owner, id)
ed791986 26 { Init(); }
03f38c58
VZ
27 ~wxTimer();
28
bfbb0b4c 29 virtual bool Start(int milliseconds = -1, bool oneShot = false);
0470b1e6 30 virtual void Stop();
03f38c58 31
0470b1e6 32 virtual bool IsRunning() const { return m_id != 0; }
03f38c58 33
c085e333 34protected:
ed791986
VZ
35 void Init();
36
97f278b4 37 unsigned long m_id;
03f38c58
VZ
38
39private:
fc7a2a60 40 DECLARE_DYNAMIC_CLASS_NO_COPY(wxTimer)
2bda0e17
KB
41};
42
2bda0e17 43#endif
bbcdf8bc 44 // _WX_TIMERH_