Update updates the widget and all of its children by running [WidgetBase.UpdateWidget] and [WidgetBase.Style] on each one, and triggering a new layout pass with [WidgetBase.NeedsLayout]. It is the main way that end users should trigger widget updates, and it is guaranteed to fully update a widget to
()
| 54 | // call [WidgetBase.AsyncLock] and [WidgetBase.AsyncUnlock] before and |
| 55 | // after this, respectively. |
| 56 | func (wb *WidgetBase) Update() { //types:add |
| 57 | if DebugSettings.UpdateTrace { |
| 58 | fmt.Println("\tDebugSettings.UpdateTrace Update:", wb) |
| 59 | } |
| 60 | wb.WidgetWalkDown(func(cw Widget, cwb *WidgetBase) bool { |
| 61 | cwb.UpdateWidget() |
| 62 | cw.Style() |
| 63 | return tree.Continue |
| 64 | }) |
| 65 | wb.NeedsLayout() |
| 66 | } |
| 67 | |
| 68 | // UpdateRender is the same as [WidgetBase.Update], except that it calls |
| 69 | // [WidgetBase.NeedsRender] instead of [WidgetBase.NeedsLayout]. |
no test coverage detected