| 1638 | } |
| 1639 | |
| 1640 | static 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 | |
| 1661 | static int cmp_left(Widget* widget, int x, int y) |
| 1662 | { |
no test coverage detected