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
|
|
|
|
// 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();
|
|
|
|
|
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; }
|
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_
|