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