X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a290fa5a7deebe9d96c0c0089d18e27d4bd9b624..ef419e3b4550534df66e25c034a9babbcef54b92:/src/univ/scrthumb.cpp?ds=sidebyside diff --git a/src/univ/scrthumb.cpp b/src/univ/scrthumb.cpp index c5a2460e92..a6c0e02284 100644 --- a/src/univ/scrthumb.cpp +++ b/src/univ/scrthumb.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: univ/scrthumb.cpp +// Name: src/univ/scrthumb.cpp // Purpose: wxScrollThumb and related classes // Author: Vadim Zeitlin // Modified by: @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "univscrthumb.h" -#endif - #include "wx/wxprec.h" #ifdef __BORLANDC__ @@ -29,9 +25,9 @@ #ifndef WX_PRECOMP #include "wx/window.h" - #include "wx/renderer.h" #endif // WX_PRECOMP +#include "wx/renderer.h" #include "wx/univ/scrtimer.h" #include "wx/univ/scrthumb.h" @@ -63,7 +59,9 @@ struct WXDLLEXPORT wxScrollThumbCaptureData m_window->ReleaseMouse(); } +#if wxUSE_TIMER delete m_timerScroll; +#endif // wxUSE_TIMER } // the thumb part being held pressed @@ -87,6 +85,8 @@ struct WXDLLEXPORT wxScrollThumbCaptureData // wxScrollTimer: the timer used when the arrow is kept pressed // ---------------------------------------------------------------------------- +#if wxUSE_TIMER + class wxScrollThumbTimer : public wxScrollTimer { public: @@ -124,6 +124,8 @@ protected: int m_inc; }; +#endif // wxUSE_TIMER + // ============================================================================ // implementation // ============================================================================ @@ -196,6 +198,7 @@ bool wxScrollThumb::HandleMouse(const wxMouseEvent& event) const // generate an additional event if we start dragging the thumb m_control->OnThumbDragStart(GetThumbPos(event)); } +#if wxUSE_TIMER else // not the thumb { // start timer for auto scrolling when the user presses the mouse @@ -203,6 +206,7 @@ bool wxScrollThumb::HandleMouse(const wxMouseEvent& event) const m_captureData->m_timerScroll = new wxScrollThumbTimer(m_control, shaftPart); } +#endif // wxUSE_TIMER } // release mouse if the *same* button went up else if ( HasCapture() && (btn == m_captureData->m_btnCapture) )