| 708 | } |
| 709 | |
| 710 | Widget::WidgetsList Widget::GetWidgetsByClass( const std::string& class_name ) { |
| 711 | WidgetsList result; |
| 712 | |
| 713 | for( const auto& root_widget : root_widgets ) { |
| 714 | if( root_widget->GetClass() == class_name ) { |
| 715 | result.push_back( root_widget->shared_from_this() ); |
| 716 | } |
| 717 | |
| 718 | auto container = std::dynamic_pointer_cast<Container>( |
| 719 | root_widget->shared_from_this() |
| 720 | ); |
| 721 | |
| 722 | if( container ) { |
| 723 | auto container_result = SearchContainerForClass( container, class_name ); |
| 724 | |
| 725 | // Splice the 2 vectors. |
| 726 | if( !container_result.empty() ) { |
| 727 | result.reserve( container_result.size() ); |
| 728 | result.insert( result.end(), container_result.begin(), container_result.end() ); |
| 729 | } |
| 730 | } |
| 731 | } |
| 732 | |
| 733 | return result; |
| 734 | } |
| 735 | |
| 736 | void Widget::HandleMouseMoveEvent( int /*x*/, int /*y*/ ) { |
| 737 | } |
nothing calls this directly
no test coverage detected