1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: timer.h
|
|
|
|
// Purpose: wxTimer class
|
1999-10-17 23:30:47 -04:00
|
|
|
// Author: David Webster
|
1999-07-29 01:11:30 -04:00
|
|
|
// Modified by:
|
1999-10-17 23:30:47 -04:00
|
|
|
// Created: 10/17/99
|
1999-07-29 01:11:30 -04:00
|
|
|
// RCS-ID: $Id$
|
1999-10-17 23:30:47 -04:00
|
|
|
// Copyright: (c) David Webster
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_TIMER_H_
|
|
|
|
#define _WX_TIMER_H_
|
|
|
|
|
|
|
|
#include "wx/object.h"
|
|
|
|
|
1999-11-14 23:50:09 -05:00
|
|
|
class WXDLLEXPORT wxTimer: public wxTimerBase
|
1999-07-29 01:11:30 -04:00
|
|
|
{
|
1999-10-17 23:30:47 -04:00
|
|
|
friend void wxProcessTimer(wxTimer& timer);
|
|
|
|
|
1999-07-29 01:11:30 -04:00
|
|
|
public:
|
2000-11-28 17:12:58 -05:00
|
|
|
wxTimer() { Init(); }
|
|
|
|
wxTimer( wxEvtHandler* pOwner
|
|
|
|
,int nId = -1
|
|
|
|
)
|
|
|
|
: wxTimerBase( pOwner
|
|
|
|
,nId
|
|
|
|
)
|
|
|
|
{ Init(); }
|
1999-07-29 01:11:30 -04:00
|
|
|
~wxTimer();
|
|
|
|
|
2002-07-09 01:03:04 -04:00
|
|
|
virtual void Notify(void);
|
1999-11-14 23:50:09 -05:00
|
|
|
virtual bool Start( int nMilliseconds = -1
|
|
|
|
,bool bOneShot = FALSE
|
|
|
|
);
|
|
|
|
virtual void Stop(void);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
1999-11-14 23:50:09 -05:00
|
|
|
inline virtual bool IsRunning(void) const { return m_ulId != 0L; }
|
2002-07-11 18:14:39 -04:00
|
|
|
inline int GetTimerId(void) const { return m_idTimer; }
|
1999-07-29 01:11:30 -04:00
|
|
|
|
|
|
|
protected:
|
2000-11-28 17:12:58 -05:00
|
|
|
void Init(void);
|
|
|
|
|
1999-11-14 23:50:09 -05:00
|
|
|
ULONG m_ulId;
|
|
|
|
HAB m_Hab;
|
1999-07-29 01:11:30 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_ABSTRACT_CLASS(wxTimer)
|
|
|
|
};
|
|
|
|
|
2000-11-28 17:12:58 -05:00
|
|
|
extern ULONG wxTimerProc( HWND WXUNUSED(hwnd)
|
|
|
|
,ULONG
|
|
|
|
,int nIdTimer
|
|
|
|
,ULONG
|
|
|
|
);
|
1999-07-29 01:11:30 -04:00
|
|
|
#endif
|
|
|
|
// _WX_TIMER_H_
|