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

Method GetStringValue

src/widgets/ASlider.cpp:1452–1471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1450}
1451
1452wxString LWSlider::GetStringValue() const
1453{
1454 switch(mStyle)
1455 {
1456 case FRAC_SLIDER:
1457 return wxString::Format(wxT("%.0f"), mCurrentValue * 100);
1458 case PERCENT_SLIDER:
1459 return wxString::Format(wxT("%.0f%%"), mCurrentValue * 100.0f);
1460 case DB_SLIDER:
1461 return wxString::Format(wxT("%.0f"), mCurrentValue);
1462 case PAN_SLIDER:
1463 return wxString::Format(wxT("%.0f"), mCurrentValue * 100);
1464 case SPEED_SLIDER:
1465 return wxString::Format(wxT("%.0f"), mCurrentValue * 100 );
1466 case VEL_SLIDER:
1467 return wxString::Format(wxT("%.0f"), mCurrentValue);
1468 default:
1469 return {};
1470 }
1471}
1472
1473void LWSlider::OnKillFocus()
1474{

Callers 2

GetValueMethod · 0.45
GetValueMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected