#if wxUSE_SCROLLBAR
+#include "wx/scrolbar.h"
+
#ifndef WX_PRECOMP
#include "wx/timer.h"
-
#include "wx/dcclient.h"
- #include "wx/scrolbar.h"
#include "wx/validate.h"
+ #include "wx/log.h"
#endif
#include "wx/univ/scrtimer.h"
#include "wx/univ/renderer.h"
#include "wx/univ/inphand.h"
#include "wx/univ/theme.h"
-#include "wx/log.h"
#define WXDEBUG_SCROLLBAR
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
{
return true;
}
+/* static */
+wxInputHandler *wxScrollBar::GetStdInputHandler(wxInputHandler *handlerDef)
+{
+ static wxStdScrollBarInputHandler
+ s_handler(wxTheme::Get()->GetRenderer(), handlerDef);
+
+ return &s_handler;
+}
+
// ============================================================================
// scroll bar input handler
// ============================================================================
{
// 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);
#endif // wxUSE_SCROLLBAR
+#if wxUSE_TIMER
+
// ----------------------------------------------------------------------------
// wxScrollTimer
// ----------------------------------------------------------------------------
(void)DoNotify();
}
}
+
+#endif // wxUSE_TIMER