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

Class ScrollBar

src/ProjectWindow.cpp:327–349  ·  view source on GitHub ↗

This wrapper prevents the scrollbars from retaining focus after being used. Otherwise, the only way back to the track panel is to click it and that causes your original location to be lost.

Source from the content-addressed store, hash-verified

325// used. Otherwise, the only way back to the track panel is to click it
326// and that causes your original location to be lost.
327class ScrollBar final : public wxScrollBar
328{
329public:
330 ScrollBar(wxWindow* parent, wxWindowID id, long style)
331 : wxScrollBar(parent, id, wxDefaultPosition, wxDefaultSize, style)
332 {
333 }
334
335 void OnSetFocus(wxFocusEvent & e)
336 {
337 wxWindow *w = e.GetWindow();
338 if (w != NULL) {
339 w->SetFocus();
340 }
341 }
342
343 void SetScrollbar(int position, int thumbSize,
344 int range, int pageSize,
345 bool refresh = true) override;
346
347private:
348 DECLARE_EVENT_TABLE()
349};
350
351void ScrollBar::SetScrollbar(int position, int thumbSize,
352 int range, int pageSize,

Callers 1

ProjectWindowMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected