X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4db172a3b318df9aff178eb6c5da149d56e0859..db71eb0640221199170ac9ea83371c2d467fa456:/src/univ/scrolbar.cpp diff --git a/src/univ/scrolbar.cpp b/src/univ/scrolbar.cpp index 1acda84783..c9f56e5c74 100644 --- a/src/univ/scrolbar.cpp +++ b/src/univ/scrolbar.cpp @@ -553,7 +553,7 @@ bool wxScrollBar::PerformAction(const wxControlAction& action, wxScrollEvent event(scrollType, this->GetId(), m_thumbPos, IsVertical() ? wxVERTICAL : wxHORIZONTAL); event.SetEventObject(this); - GetParent()->GetEventHandler()->ProcessEvent(event); + GetEventHandler()->ProcessEvent(event); } else // part of the window { @@ -589,6 +589,15 @@ bool wxScrollBar::ScrollPages(int nPages) return true; } +/* static */ +wxInputHandler *wxScrollBar::GetStdInputHandler(wxInputHandler *handlerDef) +{ + static wxStdScrollBarInputHandler + s_handler(wxTheme::Get()->GetRenderer(), handlerDef); + + return &s_handler; +} + // ============================================================================ // scroll bar input handler // ============================================================================ @@ -737,7 +746,7 @@ bool wxStdScrollBarInputHandler::HandleMouse(wxInputConsumer *consumer, { // is this a click event from an acceptable button? int btn = event.GetButton(); - if ( (btn != -1) && IsAllowedButton(btn) ) + if ( btn == wxMOUSE_BTN_LEFT ) { // determine which part of the window mouse is in wxScrollBar *scrollbar = wxStaticCast(consumer->GetInputWindow(), wxScrollBar); @@ -907,6 +916,8 @@ bool wxStdScrollBarInputHandler::HandleMouseMove(wxInputConsumer *consumer, #endif // wxUSE_SCROLLBAR +#if wxUSE_TIMER + // ---------------------------------------------------------------------------- // wxScrollTimer // ---------------------------------------------------------------------------- @@ -949,3 +960,5 @@ void wxScrollTimer::Notify() (void)DoNotify(); } } + +#endif // wxUSE_TIMER