focusableInThis returns the first Focusable element within this widget
()
| 512 | |
| 513 | // focusableInThis returns the first Focusable element within this widget |
| 514 | func (wb *WidgetBase) focusableInThis() Widget { |
| 515 | var foc Widget |
| 516 | wb.WidgetWalkDown(func(cw Widget, cwb *WidgetBase) bool { |
| 517 | if !cwb.AbilityIs(abilities.Focusable) { |
| 518 | return tree.Continue |
| 519 | } |
| 520 | foc = cw |
| 521 | return tree.Break // done |
| 522 | }) |
| 523 | return foc |
| 524 | } |
| 525 | |
| 526 | // focusNext moves the focus onto the next item |
| 527 | func (wb *WidgetBase) focusNext() { |
no test coverage detected