| 1468 | } |
| 1469 | |
| 1470 | std::vector<UIWidget*> UIWidget::querySelectorAll( const CSS::StyleSheetSelector& selector ) { |
| 1471 | std::vector<UIWidget*> widgets; |
| 1472 | |
| 1473 | if ( !isClosing() && selector.select( this ) ) { |
| 1474 | widgets.push_back( this ); |
| 1475 | } |
| 1476 | |
| 1477 | Node* child = mChild; |
| 1478 | |
| 1479 | while ( NULL != child ) { |
| 1480 | if ( child->isWidget() ) { |
| 1481 | std::vector<UIWidget*> foundWidgets = |
| 1482 | child->asType<UIWidget>()->querySelectorAll( selector ); |
| 1483 | |
| 1484 | if ( !foundWidgets.empty() ) |
| 1485 | widgets.insert( widgets.end(), foundWidgets.begin(), foundWidgets.end() ); |
| 1486 | } |
| 1487 | |
| 1488 | child = child->getNextNode(); |
| 1489 | } |
| 1490 | |
| 1491 | return widgets; |
| 1492 | } |
| 1493 | |
| 1494 | bool UIWidget::checkPropertyDefinition( const StyleSheetProperty& property ) { |
| 1495 | if ( property.getPropertyDefinition() == NULL ) { |