| 1427 | } |
| 1428 | |
| 1429 | void 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 | |
| 1452 | wxString LWSlider::GetStringValue() const |
| 1453 | { |
no test coverage detected