| 2475 | } |
| 2476 | |
| 2477 | UIWidget* UIWidget::getPrevTabWidget() const { |
| 2478 | UIWidget* widget = getPrevWidget(); |
| 2479 | if ( widget ) { |
| 2480 | return widget; |
| 2481 | } |
| 2482 | UIWidget* found = NULL; |
| 2483 | UIWidget* possible = NULL; |
| 2484 | const Node* start = this; |
| 2485 | Node* container = getWindowContainer(); |
| 2486 | while ( start ) { |
| 2487 | if ( start->isVisible() && start->isEnabled() ) { |
| 2488 | Node* next = start->getPrevNode(); |
| 2489 | while ( next ) { |
| 2490 | if ( next->isVisible() && next->isEnabled() && next->isWidget() ) { |
| 2491 | possible = next->asType<UIWidget>(); |
| 2492 | if ( possible->isTabFocusable() ) { |
| 2493 | return possible; |
| 2494 | } |
| 2495 | found = possible->getPrevWidget(); |
| 2496 | if ( found ) { |
| 2497 | return found; |
| 2498 | } |
| 2499 | } |
| 2500 | next = next->getPrevNode(); |
| 2501 | } |
| 2502 | if ( start->getParent() == container && container->getFirstWidget() ) { |
| 2503 | return container->asType<UIWidget>()->getPrevTabWidget(); |
| 2504 | } |
| 2505 | } |
| 2506 | start = start->getParent(); |
| 2507 | } |
| 2508 | return NULL; |
| 2509 | } |
| 2510 | |
| 2511 | UIWidget* UIWidget::getNextTabWidget() const { |
| 2512 | UIWidget* widget = getNextWidget(); |
nothing calls this directly
no test coverage detected