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

Method getPrevTabWidget

src/eepp/ui/uiwidget.cpp:2477–2509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2475}
2476
2477UIWidget* 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
2511UIWidget* UIWidget::getNextTabWidget() const {
2512 UIWidget* widget = getNextWidget();

Callers

nothing calls this directly

Calls 8

getPrevNodeMethod · 0.80
isWidgetMethod · 0.80
getPrevWidgetMethod · 0.80
isVisibleMethod · 0.45
isEnabledMethod · 0.45
isTabFocusableMethod · 0.45
getParentMethod · 0.45
getFirstWidgetMethod · 0.45

Tested by

no test coverage detected