timer.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/generic/private/timer.h
  3. // Purpose: Generic implementation of wxTimer class
  4. // Author: Vaclav Slavik
  5. // Copyright: (c) Vaclav Slavik
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. #ifndef _WX_GENERIC_PRIVATE_TIMER_H_
  9. #define _WX_GENERIC_PRIVATE_TIMER_H_
  10. #if wxUSE_TIMER
  11. #include "wx/private/timer.h"
  12. //-----------------------------------------------------------------------------
  13. // wxTimer
  14. //-----------------------------------------------------------------------------
  15. class wxTimerDesc;
  16. class WXDLLIMPEXP_BASE wxGenericTimerImpl : public wxTimerImpl
  17. {
  18. public:
  19. wxGenericTimerImpl(wxTimer* timer) : wxTimerImpl(timer) { Init(); }
  20. virtual ~wxGenericTimerImpl();
  21. virtual bool Start(int millisecs = -1, bool oneShot = false);
  22. virtual void Stop();
  23. virtual bool IsRunning() const;
  24. // implementation
  25. static void NotifyTimers();
  26. protected:
  27. void Init();
  28. private:
  29. wxTimerDesc *m_desc;
  30. };
  31. #endif // wxUSE_TIMER
  32. #endif // _WX_GENERIC_PRIVATE_TIMER_H_