| 458 | } |
| 459 | |
| 460 | void Notebook::HandleMouseButtonEvent( sf::Mouse::Button button, bool press, int /*x*/, int /*y*/ ) { |
| 461 | if( ( button != sf::Mouse::Button::Left ) ) { |
| 462 | return; |
| 463 | } |
| 464 | |
| 465 | float scroll_speed( Context::Get().GetEngine().GetProperty<float>( "ScrollSpeed", shared_from_this() ) ); |
| 466 | |
| 467 | m_scrolling_forward = false; |
| 468 | m_scrolling_backward = false; |
| 469 | |
| 470 | Invalidate(); |
| 471 | |
| 472 | if( m_forward_scroll_prelight && press ) { |
| 473 | m_scrolling_forward = true; |
| 474 | m_elapsed_time = ( 1.f / scroll_speed ); |
| 475 | return; |
| 476 | } |
| 477 | else if( m_backward_scroll_prelight && press ) { |
| 478 | m_scrolling_backward = true; |
| 479 | m_elapsed_time = ( 1.f / scroll_speed ); |
| 480 | return; |
| 481 | } |
| 482 | |
| 483 | if( !press ) { |
| 484 | return; |
| 485 | } |
| 486 | |
| 487 | if( m_prelight_tab < 0 ) { |
| 488 | return; |
| 489 | } |
| 490 | |
| 491 | SetCurrentPage( m_prelight_tab ); |
| 492 | } |
| 493 | |
| 494 | bool Notebook::HandleAdd( Widget::Ptr child ) { |
| 495 | auto allowed = false; |
nothing calls this directly
no outgoing calls
no test coverage detected