| 1319 | } |
| 1320 | |
| 1321 | void AudioDisplay::OnScrollTimer(wxTimerEvent &event) |
| 1322 | { |
| 1323 | if (!audio_marker) return; |
| 1324 | |
| 1325 | int rel_x = RelativeXFromTime(audio_marker->GetPosition()); |
| 1326 | int width = GetClientSize().GetWidth(); |
| 1327 | |
| 1328 | // If the dragged object is outside the visible area, scroll it into |
| 1329 | // view with a 5% margin |
| 1330 | if (rel_x < 0) |
| 1331 | { |
| 1332 | ScrollBy(rel_x - width / 20); |
| 1333 | } |
| 1334 | else if (rel_x >= width) |
| 1335 | { |
| 1336 | ScrollBy(rel_x - width + width / 20); |
| 1337 | } |
| 1338 | } |
| 1339 | |
| 1340 | void AudioDisplay::OnStyleRangesChanged() |
| 1341 | { |
nothing calls this directly
no test coverage detected