home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wxos2240.zip / wxWindows-2.4.0 / include / wx / generic / timer.h < prev    next >
C/C++ Source or Header  |  2002-08-31  |  1KB  |  50 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name:        timer.h
  3. // Purpose:     Generic implementation of wxTimer class
  4. // Author:      Vaclav Slavik
  5. // Id:          $Id: timer.h,v 1.2 2002/08/31 11:29:12 GD Exp $
  6. // Copyright:   (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
  7. // Licence:     wxWindows licence
  8. /////////////////////////////////////////////////////////////////////////////
  9.  
  10.  
  11. #ifndef __WX_TIMER_H__
  12. #define __WX_TIMER_H__
  13.  
  14. #if defined(__GNUG__) && !defined(__APPLE__)
  15.     #pragma interface "timer.h"
  16. #endif
  17.  
  18. //-----------------------------------------------------------------------------
  19. // wxTimer
  20. //-----------------------------------------------------------------------------
  21.  
  22. class wxTimerDesc;
  23.  
  24. class WXDLLEXPORT wxTimer : public wxTimerBase
  25. {
  26. public:
  27.     wxTimer() { Init(); }
  28.     wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id)
  29.         { Init(); }
  30.     ~wxTimer();
  31.  
  32.     virtual bool Start(int millisecs = -1, bool oneShot = FALSE);
  33.     virtual void Stop();
  34.  
  35.     virtual bool IsRunning() const;
  36.  
  37.     // implementation
  38.     static void NotifyTimers();
  39.  
  40. protected:
  41.     void Init();
  42.  
  43. private:
  44.     wxTimerDesc *m_desc;
  45.     
  46.     DECLARE_ABSTRACT_CLASS(wxTimer)
  47. };
  48.  
  49. #endif // __WX_TIMER_H__
  50.