timer.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/motif/private/timer.h
  3. // Purpose: wxTimer class
  4. // Author: Julian Smart
  5. // Created: 17/09/98
  6. // Copyright: (c) Julian Smart
  7. // Licence: wxWindows licence
  8. /////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_MOTIF_PRIVATE_TIMER_H_
  10. #define _WX_MOTIF_PRIVATE_TIMER_H_
  11. #include "wx/private/timer.h"
  12. class WXDLLIMPEXP_CORE wxMotifTimerImpl : public wxTimerImpl
  13. {
  14. public:
  15. wxMotifTimerImpl(wxTimer* timer) : wxTimerImpl(timer) { m_id = 0; }
  16. virtual ~wxMotifTimerImpl();
  17. virtual bool Start(int milliseconds = -1, bool oneShot = false);
  18. virtual void Stop();
  19. virtual bool IsRunning() const { return m_id != 0; }
  20. // override this to rearm the timer if necessary (i.e. if not one shot) as
  21. // X timeouts are removed automatically when they expire
  22. virtual void Notify();
  23. protected:
  24. // common part of Start() and Notify()
  25. void DoStart();
  26. long m_id;
  27. };
  28. #endif // _WX_MOTIF_PRIVATE_TIMER_H_