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

Constructor & Destructor Documentation

◆ ScrollBar()

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

Definition at line 330 of file ProjectWindow.cpp.

331 : wxScrollBar(parent, id, wxDefaultPosition, wxDefaultSize, style)
332 {
333 }

Member Function Documentation

◆ OnSetFocus()

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

Definition at line 335 of file ProjectWindow.cpp.

336 {
337 wxWindow *w = e.GetWindow();
338 if (w != NULL) {
339 w->SetFocus();
340 }
341 }

◆ SetScrollbar()

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

Definition at line 351 of file ProjectWindow.cpp.

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}

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