MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / next_widget

Function next_widget

src/ui/manager.cpp:1640–1659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1638}
1639
1640static Widget* next_widget(Widget* widget)
1641{
1642 if (!widget->children().empty())
1643 return UI_FIRST_WIDGET(widget->children());
1644
1645 while (widget->parent()->type() != kManagerWidget) {
1646 WidgetsList::const_iterator begin = widget->parent()->children().begin();
1647 WidgetsList::const_iterator end = widget->parent()->children().end();
1648 WidgetsList::const_iterator it = std::find(begin, end, widget);
1649
1650 ASSERT(it != end);
1651
1652 if ((it+1) != end)
1653 return *(it+1);
1654 else
1655 widget = widget->parent();
1656 }
1657
1658 return NULL;
1659}
1660
1661static int cmp_left(Widget* widget, int x, int y)
1662{

Callers 2

focusFirstChildMethod · 0.85
move_focusFunction · 0.85

Calls 5

emptyMethod · 0.45
typeMethod · 0.45
parentMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected