scrtimer.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/univ/scrtimer.h
  3. // Purpose: wxScrollTimer: small helper class for wxScrollArrow/Thumb
  4. // Author: Vadim Zeitlin
  5. // Modified by:
  6. // Created: 18.02.01
  7. // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
  8. // Licence: wxWindows licence
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_UNIV_SCRTIMER_H
  11. #define _WX_UNIV_SCRTIMER_H
  12. // NB: this class is implemented in scrolbar.cpp
  13. #include "wx/defs.h"
  14. #if wxUSE_TIMER
  15. #include "wx/timer.h"
  16. // ----------------------------------------------------------------------------
  17. // wxScrollTimer: the timer used when the arrow or scrollbar shaft is kept
  18. // pressed
  19. // ----------------------------------------------------------------------------
  20. class WXDLLIMPEXP_CORE wxScrollTimer : public wxTimer
  21. {
  22. public:
  23. // default ctor
  24. wxScrollTimer();
  25. // start generating the events
  26. void StartAutoScroll();
  27. // the base class method
  28. virtual void Notify();
  29. protected:
  30. // to implement in derived classes: perform the scroll action and return
  31. // true to continue scrolling or false to stop
  32. virtual bool DoNotify() = 0;
  33. // should we skip the next timer event?
  34. bool m_skipNext;
  35. };
  36. #endif // wxUSE_TIMER
  37. #endif // _WX_UNIV_SCRTIMER_H