bool m_hasDrawnWindow;
- DECLARE_NO_COPY_CLASS(wxScrollHelperEvtHandler)
+ wxDECLARE_NO_COPY_CLASS(wxScrollHelperEvtHandler);
};
#if wxUSE_TIMER
int m_pos,
m_orient;
- DECLARE_NO_COPY_CLASS(wxAutoScrollTimer)
+ wxDECLARE_NO_COPY_CLASS(wxAutoScrollTimer);
};
// ============================================================================
{
// and then send a pseudo mouse-move event to refresh the selection
wxMouseEvent event2(wxEVT_MOTION);
- wxGetMousePosition(&event2.m_x, &event2.m_y);
+ event2.SetPosition(wxGetMousePosition());
// the mouse event coordinates should be client, not screen as
// returned by wxGetMousePosition
// in wxSHOW_SB_NEVER case don't show the scrollbar even if it's needed, in
// wxSHOW_SB_ALWAYS case show the scrollbar even if it's not needed by
// passing a special range value to SetScrollbar()
- int range wxDUMMY_INITIALIZE(0);
+ int range;
switch ( visibility )
{
case wxSHOW_SB_NEVER:
range = 0;
break;
+ case wxSHOW_SB_ALWAYS:
+ range = scrollUnits ? scrollUnits : -1;
+ break;
+
+ default:
+ wxFAIL_MSG( wxS("unknown scrollbar visibility") );
+ // fall through
+
case wxSHOW_SB_DEFAULT:
range = scrollUnits;
break;
- case wxSHOW_SB_ALWAYS:
- range = scrollUnits ? scrollUnits : -1;
- break;
}
m_win->SetScrollbar(orient, scrollPosition, scrollLinesPerPage, range);