| 358 | } |
| 359 | |
| 360 | void Scrollbar::OnTimerExpired() |
| 361 | { |
| 362 | if (mouse_down_mode == mouse_down_thumb_drag) |
| 363 | return; |
| 364 | |
| 365 | mouse_down_timer->Start(100, false); |
| 366 | |
| 367 | double last_position = position; |
| 368 | position += last_step_size; |
| 369 | if (position >= scroll_max) |
| 370 | position = scroll_max - 1; |
| 371 | |
| 372 | if (position < scroll_min) |
| 373 | position = scroll_min; |
| 374 | |
| 375 | if (position != last_position) |
| 376 | { |
| 377 | InvokeScrollEvent(FuncScrollOnMouseDown); |
| 378 | |
| 379 | if (UpdatePartPositions()) |
| 380 | Update(); |
| 381 | } |
| 382 | } |
| 383 | |
| 384 | void Scrollbar::OnEnableChanged() |
| 385 | { |