2001-06-26 17:05:06 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: timer.h
|
2002-02-17 09:55:41 -05:00
|
|
|
// Purpose: Generic implementation of wxTimer class
|
2001-06-26 17:05:06 -04:00
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// Id: $Id$
|
2003-03-17 07:27:00 -05:00
|
|
|
// Copyright: (c) Vaclav Slavik
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2001-06-26 17:05:06 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __WX_TIMER_H__
|
|
|
|
#define __WX_TIMER_H__
|
|
|
|
|
2003-08-09 08:38:21 -04:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
2001-06-26 17:05:06 -04:00
|
|
|
#pragma interface "timer.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxTimer
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2001-11-11 13:59:30 -05:00
|
|
|
class wxTimerDesc;
|
|
|
|
|
2001-06-26 17:05:06 -04:00
|
|
|
class WXDLLEXPORT wxTimer : public wxTimerBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxTimer() { Init(); }
|
2003-10-26 22:42:30 -05:00
|
|
|
wxTimer(wxEvtHandler *owner, int timerid = -1) : wxTimerBase(owner, timerid)
|
2001-06-26 17:05:06 -04:00
|
|
|
{ Init(); }
|
2001-11-11 13:59:30 -05:00
|
|
|
~wxTimer();
|
2001-06-26 17:05:06 -04:00
|
|
|
|
2001-11-11 13:59:30 -05:00
|
|
|
virtual bool Start(int millisecs = -1, bool oneShot = FALSE);
|
|
|
|
virtual void Stop();
|
2001-06-26 17:05:06 -04:00
|
|
|
|
2001-11-11 13:59:30 -05:00
|
|
|
virtual bool IsRunning() const;
|
2001-06-26 17:05:06 -04:00
|
|
|
|
2001-11-11 13:59:30 -05:00
|
|
|
// implementation
|
|
|
|
static void NotifyTimers();
|
2001-06-26 17:05:06 -04:00
|
|
|
|
2001-11-11 13:59:30 -05:00
|
|
|
protected:
|
|
|
|
void Init();
|
2001-06-26 17:05:06 -04:00
|
|
|
|
|
|
|
private:
|
2001-11-11 13:59:30 -05:00
|
|
|
wxTimerDesc *m_desc;
|
|
|
|
|
2001-06-26 17:05:06 -04:00
|
|
|
DECLARE_ABSTRACT_CLASS(wxTimer)
|
|
|
|
};
|
|
|
|
|
2001-11-11 13:59:30 -05:00
|
|
|
#endif // __WX_TIMER_H__
|