widgetNext returns the next widget in the tree, including Parts, which are considered to come after Children. returns nil if no more.
(w Widget)
| 454 | // including Parts, which are considered to come after Children. |
| 455 | // returns nil if no more. |
| 456 | func widgetNext(w Widget) Widget { |
| 457 | wb := w.AsWidget() |
| 458 | if !wb.HasChildren() && wb.Parts == nil { |
| 459 | return widgetNextSibling(w) |
| 460 | } |
| 461 | if wb.HasChildren() { |
| 462 | return wb.Child(0).(Widget) |
| 463 | } |
| 464 | if wb.Parts != nil { |
| 465 | return widgetNext(wb.Parts.This.(Widget)) |
| 466 | } |
| 467 | return nil |
| 468 | } |
| 469 | |
| 470 | // widgetNextSibling returns next sibling or nil if none, |
| 471 | // including Parts, which are considered to come after Children. |
no test coverage detected