1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2000-02-05 01:57:38 +00:00
|
|
|
// Name: wx/gtk/timer.h
|
1998-05-20 14:01:55 +00:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-29 18:03:18 +00:00
|
|
|
// Id: $Id$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2000-02-05 01:57:38 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GTKTIMERH__
|
|
|
|
#define __GTKTIMERH__
|
|
|
|
|
2002-09-07 12:28:46 +00:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
1999-11-12 19:19:38 +00:00
|
|
|
#pragma interface "timer.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxTimer
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
1999-11-12 19:19:38 +00:00
|
|
|
class wxTimer : public wxTimerBase
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1998-10-12 13:09:15 +00:00
|
|
|
public:
|
2000-02-05 01:57:38 +00:00
|
|
|
wxTimer() { Init(); }
|
|
|
|
wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id)
|
|
|
|
{ Init(); }
|
1998-10-12 13:09:15 +00:00
|
|
|
~wxTimer();
|
|
|
|
|
|
|
|
virtual bool Start( int millisecs = -1, bool oneShot = FALSE );
|
|
|
|
virtual void Stop();
|
|
|
|
|
1999-11-12 19:19:38 +00:00
|
|
|
virtual bool IsRunning() const { return m_tag != -1; }
|
1998-10-12 13:09:15 +00:00
|
|
|
|
|
|
|
protected:
|
2000-02-05 01:57:38 +00:00
|
|
|
void Init();
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
int m_tag;
|
1998-10-12 13:09:15 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_ABSTRACT_CLASS(wxTimer)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKTIMERH__
|