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$
|
2002-02-14 15:30:34 -05:00
|
|
|
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
|
2001-06-26 17:05:06 -04:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __WX_TIMER_H__
|
|
|
|
#define __WX_TIMER_H__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#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(); }
|
|
|
|
wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id)
|
|
|
|
{ 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__
|