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 338 of file ProjectWindow.cpp.

Constructor & Destructor Documentation

◆ ScrollBar()

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

Definition at line 341 of file ProjectWindow.cpp.

342 : wxScrollBar(parent, id, wxDefaultPosition, wxDefaultSize, style)
343 {
344 }

Member Function Documentation

◆ OnSetFocus()

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

Definition at line 346 of file ProjectWindow.cpp.

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

◆ SetScrollbar()

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

Definition at line 362 of file ProjectWindow.cpp.

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

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