MCPcopy Create free account
hub / github.com/SpartanJ/eepp / querySelectorAll

Method querySelectorAll

src/eepp/ui/uiwidget.cpp:1470–1492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1468}
1469
1470std::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
1494bool UIWidget::checkPropertyDefinition( const StyleSheetProperty& property ) {
1495 if ( property.getPropertyDefinition() == NULL ) {

Callers 3

UIBuildSettingsMethod · 0.80
updateOSMethod · 0.80
UTESTFunction · 0.80

Calls 8

push_backMethod · 0.80
isWidgetMethod · 0.80
getNextNodeMethod · 0.80
selectMethod · 0.45
emptyMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by 1

UTESTFunction · 0.64