| 2509 | } |
| 2510 | |
| 2511 | UIWidget* UIWidget::getNextTabWidget() const { |
| 2512 | UIWidget* widget = getNextWidget(); |
| 2513 | if ( widget ) { |
| 2514 | return widget; |
| 2515 | } |
| 2516 | UIWidget* found = NULL; |
| 2517 | UIWidget* possible = NULL; |
| 2518 | const Node* start = this; |
| 2519 | Node* container = getWindowContainer(); |
| 2520 | while ( start ) { |
| 2521 | if ( start->isVisible() && start->isEnabled() ) { |
| 2522 | Node* next = start->getNextNode(); |
| 2523 | while ( next ) { |
| 2524 | if ( next->isVisible() && next->isEnabled() && next->isWidget() ) { |
| 2525 | possible = next->asType<UIWidget>(); |
| 2526 | if ( possible->isTabFocusable() ) { |
| 2527 | return possible; |
| 2528 | } |
| 2529 | found = possible->getNextWidget(); |
| 2530 | if ( found ) { |
| 2531 | return found; |
| 2532 | } |
| 2533 | } |
| 2534 | next = next->getNextNode(); |
| 2535 | } |
| 2536 | if ( start->getParent() == container && container->getFirstWidget() ) { |
| 2537 | return container->asType<UIWidget>()->getNextTabWidget(); |
| 2538 | } |
| 2539 | } |
| 2540 | start = start->getParent(); |
| 2541 | } |
| 2542 | return NULL; |
| 2543 | } |
| 2544 | |
| 2545 | void UIWidget::onFocusPrevWidget() { |
| 2546 | if ( !isTabStop() ) { |
nothing calls this directly
no test coverage detected