MCPcopy Create free account
hub / github.com/audacity/audacity / SetScrollbar

Method SetScrollbar

src/ProjectWindow.cpp:351–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349};
350
351void ScrollBar::SetScrollbar(int position, int thumbSize,
352 int range, int pageSize,
353 bool refresh)
354{
355 // Mitigate flashing of scrollbars by refreshing only when something really changes.
356
357 // PRL: This may have been made unnecessary by other fixes for flashing, see
358 // commit ac05b190bee7dd0000bce56edb0e5e26185c972f
359
360 auto changed =
361 position != GetThumbPosition() ||
362 thumbSize != GetThumbSize() ||
363 range != GetRange() ||
364 pageSize != GetPageSize();
365 if (!changed)
366 return;
367
368 wxScrollBar::SetScrollbar(position, thumbSize, range, pageSize, refresh);
369}
370
371BEGIN_EVENT_TABLE(ScrollBar, wxScrollBar)
372 EVT_SET_FOCUS(ScrollBar::OnSetFocus)

Callers 4

SetVerticalScrollbarMethod · 0.80
DrawPlotMethod · 0.80
RecalcMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected