Audacity 3.2.0
Public Member Functions | List of all members
anonymous_namespace{ProjectWindow.cpp}::ScrollBar Class Referencefinal
Inheritance diagram for anonymous_namespace{ProjectWindow.cpp}::ScrollBar:
[legend]
Collaboration diagram for anonymous_namespace{ProjectWindow.cpp}::ScrollBar:
[legend]

Public Member Functions

 ScrollBar (wxWindow *parent, wxWindowID id, long style)
 
void OnSetFocus (wxFocusEvent &e)
 
void SetScrollbar (int position, int thumbSize, int range, int pageSize, bool refresh=true) override
 

Detailed Description

Definition at line 336 of file ProjectWindow.cpp.

Constructor & Destructor Documentation

◆ ScrollBar()

anonymous_namespace{ProjectWindow.cpp}::ScrollBar::ScrollBar ( wxWindow *  parent,
wxWindowID  id,
long  style 
)
inline

Definition at line 339 of file ProjectWindow.cpp.

340 : wxScrollBar(parent, id, wxDefaultPosition, wxDefaultSize, style)
341 {
342 }

Member Function Documentation

◆ OnSetFocus()

void anonymous_namespace{ProjectWindow.cpp}::ScrollBar::OnSetFocus ( wxFocusEvent &  e)
inline

Definition at line 344 of file ProjectWindow.cpp.

345 {
346 wxWindow *w = e.GetWindow();
347 if (w != NULL) {
348 w->SetFocus();
349 }
350 }

◆ SetScrollbar()

void anonymous_namespace{ProjectWindow.cpp}::ScrollBar::SetScrollbar ( int  position,
int  thumbSize,
int  range,
int  pageSize,
bool  refresh = true 
)
override

Definition at line 360 of file ProjectWindow.cpp.

363{
364 // Mitigate flashing of scrollbars by refreshing only when something really changes.
365
366 // PRL: This may have been made unnecessary by other fixes for flashing, see
367 // commit ac05b190bee7dd0000bce56edb0e5e26185c972f
368
369 auto changed =
370 position != GetThumbPosition() ||
371 thumbSize != GetThumbSize() ||
372 range != GetRange() ||
373 pageSize != GetPageSize();
374 if (!changed)
375 return;
376
377 wxScrollBar::SetScrollbar(position, thumbSize, range, pageSize, refresh);
378}

The documentation for this class was generated from the following file: