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

Method SendUpdate

src/widgets/ASlider.cpp:1429–1450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1427}
1428
1429void LWSlider::SendUpdate( float newValue )
1430{
1431 mCurrentValue = newValue;
1432
1433 FormatPopWin();
1434
1435 Refresh();
1436
1437 // Update the project's status bar as well
1438 if (mTipPanel) {
1439 auto tip = GetTip(mCurrentValue);
1440 auto pProject = FindProjectFromWindow( mParent );
1441 if (pProject)
1442 ProjectStatus::Get( *pProject ).Set( tip );
1443 }
1444
1445 wxCommandEvent e( wxEVT_COMMAND_SLIDER_UPDATED, mID );
1446 int intValue = (int)( ( mCurrentValue - mMinValue ) * 1000.0f /
1447 ( mMaxValue - mMinValue ) );
1448 e.SetInt( intValue );
1449 mParent->GetEventHandler()->ProcessEvent(e);
1450}
1451
1452wxString LWSlider::GetStringValue() const
1453{

Callers 1

TipWindowClass · 0.80

Calls 4

FindProjectFromWindowFunction · 0.85
GetFunction · 0.85
ProcessEventMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected