HasStateWithin returns whether this widget or any of its children have the given state flag.
(state states.States)
| 70 | // HasStateWithin returns whether this widget or any |
| 71 | // of its children have the given state flag. |
| 72 | func (wb *WidgetBase) HasStateWithin(state states.States) bool { |
| 73 | got := false |
| 74 | wb.WidgetWalkDown(func(cw Widget, cwb *WidgetBase) bool { |
| 75 | if cwb.StateIs(state) { |
| 76 | got = true |
| 77 | return tree.Break |
| 78 | } |
| 79 | return tree.Continue |
| 80 | }) |
| 81 | return got |
| 82 | } |
nothing calls this directly
no test coverage detected