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
|
2001-06-26 17:05:06 -04:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __WX_TIMER_H__
|
|
|
|
#define __WX_TIMER_H__
|
|
|
|
|
2002-08-31 07:29:13 -04:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
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(); }
|
|
|
|
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__
|